﻿:root {
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 24px;
    background: #111827;
    color: #f3f4f6;
}

h1,
h2,
h3 {
    margin-top: 0;
}

p {
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.nav-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

    .nav-links a {
        text-decoration: none;
        color: #f3f4f6;
        background: #1f2937;
        border: 1px solid #374151;
        padding: 10px 14px;
        border-radius: 8px;
        font-weight: 600;
    }

        .nav-links a.active {
            background: #2563eb;
            border-color: #2563eb;
        }

.session-chip {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(340px, 1fr);
    gap: 20px;
    align-items: center;
    background: #1f2937;
    border: 1px solid #374151;
    padding: 18px 20px;
    border-radius: 14px;
    min-width: 720px;
}

.session-summary {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    height: 100%;
}

.session-line {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 38px;
}

.session-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9ca3af;
    line-height: 1.2;
}

.session-line span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: 15px;
    color: #f9fafb;
    line-height: 1.2;
    display: flex;
    align-items: center;
    min-height: 38px;
}

.auth-controls {
    min-width: 0;
    display: flex;
    align-items: center;
    height: 100%;
}

.auth-state-group {
    min-width: 0;
    width: 100%;
}

.auth-state-signed-out {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto auto;
    gap: 10px;
    align-items: center;
}

    .auth-state-signed-out input[type="email"],
    .auth-state-signed-out input[type="password"] {
        width: 100%;
        min-width: 0;
    }

.auth-state-signed-in {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.hidden {
    display: none !important;
}

.page-subtitle,
.subtitle {
    margin-bottom: 24px;
    color: #9ca3af;
    line-height: 1.6;
}

.card,
.plan-card {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
}

.plan-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .plan-card.current {
        border-color: #2563eb;
        box-shadow: 0 0 0 1px #2563eb inset;
    }

    .plan-card ul {
        flex-grow: 1;
    }

.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 18px;
}

.col-12 {
    grid-column: span 12;
}

.col-8 {
    grid-column: span 8;
}

.col-6 {
    grid-column: span 6;
}

.col-4 {
    grid-column: span 4;
}

.col-3 {
    grid-column: span 3;
}

.col-2 {
    grid-column: span 2;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="file"],
textarea,
select {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #4b5563;
    background: #111827;
    color: #f9fafb;
    padding: 10px 12px;
    font-size: 14px;
}

textarea {
    min-height: 220px;
    resize: vertical;
    font-family: Consolas, monospace;
}

.output {
    min-height: 280px;
}

.btn-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

button,
.link-btn {
    background: #2563eb;
    color: white;
    border: none;
    text-decoration: none;
    border-radius: 10px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 600;
    display: inline-block;
}

    button.secondary,
    .link-btn.secondary {
        background: #374151;
    }

    button.success {
        background: #059669;
    }

    button:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    font-size: 18px;
    line-height: 1;
    background: #374151;
}

    .icon-btn:hover {
        background: #4b5563;
    }

.muted {
    color: #9ca3af;
    font-size: 13px;
}

.small {
    font-size: 12px;
}

.error-box,
.warning-box,
.success-box,
.info-box,
.message-box {
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
    white-space: pre-wrap;
}

.error-box {
    background: #450a0a;
    border: 1px solid #991b1b;
    color: #fecaca;
}

.warning-box {
    background: #3f2f00;
    border: 1px solid #a16207;
    color: #fde68a;
}

.success-box {
    background: #052e16;
    border: 1px solid #15803d;
    color: #bbf7d0;
}

.info-box,
.message-box {
    background: #0c4a6e;
    border: 1px solid #0284c7;
    color: #dbeafe;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

th,
td {
    border: 1px solid #374151;
    padding: 8px;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

th {
    background: #111827;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    display: block;
}

.drop-zone {
    border: 2px dashed #4b5563;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    background: #0f172a;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
    cursor: pointer;
}

    .drop-zone.dragover {
        border-color: #60a5fa;
        background: #172554;
        transform: scale(1.01);
    }

.file-meta {
    margin-top: 8px;
    padding: 10px 12px;
    border: 1px solid #374151;
    border-radius: 8px;
    background: #111827;
}

.tooltip-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #374151;
    color: #d1d5db;
    font-size: 11px;
    font-weight: bold;
    cursor: help;
    border: 1px solid #4b5563;
}

.locked-control-wrapper {
    position: relative;
    display: block;
}

    .locked-control-wrapper.locked {
        cursor: not-allowed;
    }

        .locked-control-wrapper.locked::after {
            content: attr(data-lock-message);
            position: absolute;
            left: 0;
            bottom: calc(100% + 8px);
            background: #111827;
            border: 1px solid #4b5563;
            color: #f3f4f6;
            padding: 8px 10px;
            border-radius: 8px;
            font-size: 12px;
            line-height: 1.4;
            white-space: normal;
            width: 220px;
            opacity: 0;
            pointer-events: none;
            transform: translateY(4px);
            transition: opacity 0.15s ease, transform 0.15s ease;
            z-index: 20;
            box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
        }

        .locked-control-wrapper.locked:hover::after,
        .locked-control-wrapper.locked:focus-within::after {
            opacity: 1;
            transform: translateY(0);
        }

        .locked-control-wrapper.locked select {
            pointer-events: none;
        }

.badge,
.pill {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 14px;
}

    .badge.current,
    .pill {
        background: #1d4ed8;
        color: white;
    }

.price {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

ul {
    margin: 0;
    padding-left: 18px;
}

li {
    margin-bottom: 8px;
    color: #d1d5db;
}

.section-title {
    margin-top: 28px;
    margin-bottom: 14px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

    .section-header h2 {
        margin-bottom: 0;
    }

.section-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
}

.copy-feedback {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(5, 150, 105, 0.18);
    border: 1px solid rgba(5, 150, 105, 0.45);
    color: #d1fae5;
}

pre {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 14px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: Consolas, monospace;
    font-size: 13px;
}

code {
    font-family: Consolas, monospace;
}

.endpoint {
    border-top: 1px solid #374151;
    padding-top: 18px;
    margin-top: 18px;
    min-width: 0;
}

.accordion-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.accordion-item {
    border: 1px solid #374151;
    border-radius: 12px;
    background: #111827;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    background: transparent;
    border: none;
    color: #f3f4f6;
    padding: 16px 18px;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

    .accordion-header:hover {
        background: rgba(255, 255, 255, 0.03);
    }

.accordion-title {
    flex: 1;
}

.accordion-icon {
    font-size: 18px;
    line-height: 1;
    color: #9ca3af;
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

.accordion-item.open .accordion-icon {
    transform: rotate(45deg);
    color: #f3f4f6;
}

.accordion-content {
    display: none;
    padding: 10px 18px 18px 18px;
    color: #d1d5db;
    line-height: 1.6;
}

.accordion-item.open .accordion-content {
    display: block;
}

.http-url {
    display: inline-block;
    margin-left: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(29, 78, 216, 0.22);
    border: 1px solid rgba(37, 99, 235, 0.5);
    color: #dbeafe;
    font-family: Consolas, monospace;
    font-size: 13px;
    line-height: 1.2;
    vertical-align: middle;
}

.endpoint .grid > div,
.card .grid > div {
    min-width: 0;
}

.endpoint pre,
.card pre {
    max-width: 100%;
    overflow-x: auto;
}

.endpoint strong.http-url {
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 1100px) {
    .session-chip {
        grid-template-columns: 1fr;
        min-width: 0;
        width: 100%;
    }

    .auth-state-signed-out {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .col-8,
    .col-6,
    .col-4,
    .col-3,
    .col-2 {
        grid-column: span 12;
    }

    .top-nav {
        align-items: stretch;
    }

    .auth-state-signed-out {
        grid-template-columns: 1fr;
    }

    .auth-state-signed-in {
        justify-content: flex-start;
    }

    .session-line {
        grid-template-columns: 1fr;
        gap: 4px;
        min-height: auto;
    }

        .session-line span:last-child {
            min-height: auto;
        }

    .section-header-left {
        flex-wrap: wrap;
        min-height: auto;
    }
}
