/* Geist variable fonts */
@font-face {
    font-family: 'Geist Sans';
    src: url('https://cdn.jsdelivr.net/npm/geist@1.5.1/dist/fonts/geist-sans/Geist-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: 'Geist Mono';
    src: url('https://cdn.jsdelivr.net/npm/geist@1.5.1/dist/fonts/geist-mono/GeistMono-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
}

:root {
    /* Geist light theme colors */
    --geist-primary: #171717;
    --geist-secondary: #4d4d4d;
    --geist-tertiary: #006bff;
    --geist-background-100: #ffffff;
    --geist-background-200: #fafafa;
    --geist-gray-100: #f2f2f2;
    --geist-gray-200: #ebebeb;
    --geist-gray-300: #e6e6e6;
    --geist-gray-400: #eaeaea;
    --geist-gray-500: #c9c9c9;
    --geist-gray-600: #a8a8a8;
    --geist-gray-700: #8f8f8f;
    --geist-gray-800: #7d7d7d;
    --geist-gray-900: #4d4d4d;
    --geist-gray-1000: #171717;
    --geist-gray-alpha-100: rgba(0, 0, 0, 0.05);
    --geist-gray-alpha-200: rgba(0, 0, 0, 0.08);
    --geist-gray-alpha-300: rgba(0, 0, 0, 0.10);
    --geist-gray-alpha-400: rgba(0, 0, 0, 0.08);
    --geist-gray-alpha-500: rgba(0, 0, 0, 0.21);
    --geist-gray-alpha-600: rgba(0, 0, 0, 0.24);
    --geist-gray-alpha-700: rgba(0, 0, 0, 0.44);
    --geist-gray-alpha-800: rgba(0, 0, 0, 0.51);
    --geist-gray-alpha-900: rgba(0, 0, 0, 0.70);
    --geist-gray-alpha-1000: rgba(0, 0, 0, 0.91);
    --geist-blue-100: #f0f7ff;
    --geist-blue-200: #e9f4ff;
    --geist-blue-300: #dfefff;
    --geist-blue-400: #cae7ff;
    --geist-blue-500: #94ccff;
    --geist-blue-600: #48aeff;
    --geist-blue-700: #006bff;
    --geist-blue-800: #0059ec;
    --geist-blue-900: #005ff2;
    --geist-blue-1000: #002359;
    --geist-red-100: #ffeeef;
    --geist-red-200: #ffe8ea;
    --geist-red-300: #ffe3e4;
    --geist-red-400: #ffd7d6;
    --geist-red-500: #ffb1b3;
    --geist-red-600: #ff676d;
    --geist-red-700: #fc0035;
    --geist-red-800: #ea001d;
    --geist-red-900: #d8001b;
    --geist-red-1000: #47000c;
    --geist-amber-100: #fff6de;
    --geist-amber-200: #fff4cf;
    --geist-amber-300: #fff1c1;
    --geist-amber-400: #ffdc73;
    --geist-amber-500: #ffc543;
    --geist-amber-600: #ffa600;
    --geist-amber-700: #ffae00;
    --geist-amber-800: #ff9300;
    --geist-amber-900: #aa4d00;
    --geist-amber-1000: #561900;
    --geist-green-100: #ecfdec;
    --geist-green-200: #e5fce7;
    --geist-green-300: #d3fad1;
    --geist-green-400: #b9f5bc;
    --geist-green-500: #82eb8d;
    --geist-green-600: #4ce15e;
    --geist-green-700: #28a948;
    --geist-green-800: #279141;
    --geist-green-900: #107d32;
    --geist-green-1000: #003a00;
    --geist-purple-100: #f3e8ff;
    --geist-purple-200: #ede2fe;
    --geist-purple-300: #e4d4fd;
    --geist-purple-400: #d4b5fc;
    --geist-purple-500: #bf93f9;
    --geist-purple-600: #a371f7;
    --geist-purple-700: #8957e5;
    --geist-purple-800: #7c3aed;
    --geist-purple-900: #6e40c9;
    --geist-purple-1000: #2e1065;

    /* Component tokens */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-card: 0 2px 2px rgba(0, 0, 0, 0.04);
    --shadow-popover: 0 1px 1px rgba(0, 0, 0, 0.02), 0 4px 8px -4px rgba(0, 0, 0, 0.04), 0 16px 24px -8px rgba(0, 0, 0, 0.06);

    /* Legacy variables for admin.html compatibility */
    --border: var(--geist-gray-400);
    --muted: var(--geist-gray-100);
    --muted-foreground: var(--geist-gray-700);
    --destructive: var(--geist-red-700);
    --primary: var(--geist-gray-1000);

    /* Focus ring */
    --focus-ring: 0 0 0 2px var(--geist-background-100), 0 0 0 4px var(--geist-blue-700);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Geist Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--geist-background-200);
    color: var(--geist-primary);
    margin: 0;
    padding: 40px 16px;
    min-height: 100vh;
    line-height: 24px;
}

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

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

.card {
    background: var(--geist-background-100);
    border: 1px solid var(--geist-gray-alpha-400);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 24px;
}

.card-title {
    font-size: 24px;
    font-weight: 600;
    line-height: 32px;
    letter-spacing: -0.96px;
    margin: 0 0 8px;
    color: var(--geist-gray-1000);
}

.card-subtitle {
    font-size: 14px;
    line-height: 20px;
    color: var(--geist-gray-900);
    margin: 0 0 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    color: var(--geist-gray-1000);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font-family: inherit;
    font-size: 14px;
    line-height: 20px;
    color: var(--geist-primary);
    background: var(--geist-background-100);
    border: 1px solid var(--geist-gray-alpha-400);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input::placeholder {
    color: var(--geist-gray-700);
}

.form-input:hover {
    border-color: var(--geist-gray-alpha-500);
}

.form-input:focus {
    border-color: var(--geist-blue-700);
    box-shadow: 0 0 0 2px var(--geist-background-100), 0 0 0 4px var(--geist-blue-700);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    outline: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:focus-visible {
    box-shadow: 0 0 0 2px var(--geist-background-100), 0 0 0 4px var(--geist-blue-700);
}

.btn-primary {
    color: var(--geist-background-100);
    background: var(--geist-gray-1000);
    border-color: var(--geist-gray-1000);
}

.btn-primary:hover {
    background: var(--geist-gray-900);
    border-color: var(--geist-gray-900);
}

.btn-primary:disabled {
    color: var(--geist-gray-600);
    background: var(--geist-gray-200);
    border-color: var(--geist-gray-200);
    cursor: not-allowed;
}

.btn-secondary {
    color: var(--geist-gray-1000);
    background: var(--geist-background-100);
    border-color: var(--geist-gray-alpha-400);
}

.btn-secondary:hover {
    background: var(--geist-gray-100);
    border-color: var(--geist-gray-alpha-500);
}

.btn-tertiary {
    color: var(--geist-gray-1000);
    background: transparent;
    border-color: transparent;
}

.btn-tertiary:hover {
    background: var(--geist-gray-alpha-100);
}

.btn-danger {
    color: var(--geist-background-100);
    background: var(--geist-red-800);
    border-color: var(--geist-red-800);
}

.btn-danger:hover {
    background: var(--geist-red-900);
    border-color: var(--geist-red-900);
}

.btn-sm {
    height: 32px;
    padding: 0 10px;
    font-size: 13px;
    line-height: 16px;
}

.result {
    margin-top: 24px;
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    display: none;
}

.result-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    margin: 0 0 12px;
}

.result-success {
    background: var(--geist-green-100);
    border-color: var(--geist-green-400);
}

.result-success .result-title {
    color: var(--geist-green-900);
}

.result-error {
    background: var(--geist-red-100);
    border-color: var(--geist-red-400);
}

.result-error .result-title {
    color: var(--geist-red-900);
}

.result-warning {
    background: var(--geist-amber-100);
    border: 1px solid var(--geist-amber-400);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 20px;
    color: var(--geist-amber-1000);
}

.result-warning .result-title {
    color: var(--geist-amber-900);
}

.credential {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--geist-gray-alpha-200);
    font-size: 14px;
    line-height: 20px;
}

.credential:last-child {
    border-bottom: none;
}

.credential-label {
    color: var(--geist-gray-900);
    flex-shrink: 0;
}

.credential-value {
    font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-weight: 500;
    word-break: break-all;
    text-align: right;
    color: var(--geist-gray-1000);
}

.hint {
    margin-top: 24px;
    padding: 12px;
    background: var(--geist-blue-100);
    border: 1px solid var(--geist-blue-300);
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 20px;
    color: var(--geist-blue-1000);
}

.hint strong {
    font-weight: 600;
    color: var(--geist-blue-900);
}

.nav {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    line-height: 20px;
}

.nav a {
    color: var(--geist-gray-900);
    text-decoration: none;
}

.nav a:hover {
    color: var(--geist-gray-1000);
    text-decoration: underline;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
}

.status-pending {
    background: var(--geist-amber-100);
    color: var(--geist-amber-900);
}

.status-active {
    background: var(--geist-green-100);
    color: var(--geist-green-900);
}

.status-summary {
    display: flex;
    gap: 24px;
    padding: 14px 16px;
    background: var(--geist-gray-100);
    border: 1px solid var(--geist-gray-alpha-200);
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    line-height: 20px;
    color: var(--geist-gray-900);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.online {
    background: var(--geist-green-600);
    box-shadow: 0 0 0 3px var(--geist-green-100);
}

.status-dot.offline {
    background: var(--geist-gray-500);
    box-shadow: 0 0 0 3px var(--geist-gray-100);
}

.status-extra {
    font-size: 12px;
    color: var(--geist-gray-700);
    font-family: 'Geist Mono', monospace;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.info-section {
    min-width: 0;
}

@media (max-width: 600px) {
    .info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .status-summary {
        flex-direction: column;
        gap: 10px;
    }

    .container-wide {
        max-width: 440px;
    }
    body {
        padding: 24px 12px;
    }

    .card {
        padding: 20px;
    }

    .card-title {
        font-size: 20px;
        line-height: 26px;
        letter-spacing: -0.4px;
    }

    .credential {
        gap: 8px;
    }

    .credential-value {
        font-size: 13px;
    }
}

.info-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 8px;
}

.info-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.info-header-left img {
    display: block;
}

.info-header-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--geist-gray-1000);
    white-space: nowrap;
}

.info-header-email {
    font-size: 12px;
    color: var(--geist-gray-700);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
    flex-shrink: 0;
}

.info-header-signout {
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .info-header-email { display: none; }
}

.site-footer {
    text-align: center;
    padding: 20px 0;
    font-size: 12px;
    color: var(--geist-gray-600);
}

.section-header {
    font-size: 15px;
    font-weight: 600;
    line-height: 22px;
    margin: 0 0 6px;
    color: var(--geist-gray-1000);
}

.section-desc {
    font-size: 13px;
    line-height: 18px;
    color: var(--geist-gray-700);
    margin: 0 0 10px;
}

.tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    line-height: 16px;
}

.tag-blue {
    color: var(--geist-blue-900);
    background: var(--geist-blue-100);
}

.tag-purple {
    color: var(--geist-purple-900);
    background: var(--geist-purple-100);
}

.tag-green {
    color: var(--geist-green-900);
    background: var(--geist-green-100);
}

.divider {
    border: none;
    border-top: 1px dashed var(--geist-gray-alpha-300);
    margin: 12px 0;
}

.cred-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    font-size: 14px;
    line-height: 20px;
    border-bottom: 1px solid var(--geist-gray-alpha-200);
}

.cred-row-last {
    border-bottom: none;
}

.cred-row .credential-label {
    color: var(--geist-gray-700);
    flex-shrink: 0;
}

.cred-row .credential-value {
    text-align: right;
    word-break: break-all;
}

.cred-section-divider {
    border-top: 1px solid var(--geist-gray-alpha-500);
    margin: 20px 0;
}

.source-group {
    margin-bottom: 8px;
}

.source-group:last-child {
    margin-bottom: 0;
}

.source-group-label {
    margin-bottom: 4px;
}

.source-group + .source-group {
    padding-top: 8px;
    border-top: 1px solid var(--geist-gray-alpha-400);
}

.mono {
    font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

.code-block {
    font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    line-height: 1.5;
    background: var(--geist-gray-100);
    border: 1px solid var(--geist-gray-alpha-200);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    word-break: break-all;
    white-space: pre-wrap;
    color: var(--geist-gray-1000);
}
