/* ==========================================================================
   Tailscale Portal - Modern Responsive Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-border: #bfdbfe;

    --secondary: #475569;
    --secondary-hover: #334155;

    --success: #10b981;
    --success-hover: #059669;
    --success-light: #ecfdf5;
    --success-border: #a7f3d0;

    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --warning-border: #fde68a;

    --danger: #ef4444;
    --danger-light: #fef2f2;
    --danger-border: #fecaca;

    --dark-bg: #0f172a;
    --dark-surface: #1e293b;
    --dark-card: #1e293b;
    --dark-text: #f8fafc;

    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --border-radius: 12px;

    --text-color: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', Consolas, 'SF Mono', Menlo, monospace;

    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.07), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 30px -5px rgba(15, 23, 42, 0.12);

    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

main.container {
    flex: 1;
    padding-top: 24px;
    padding-bottom: 48px;
}

/* ==========================================================================
   Navigation Bar (Header)
   ========================================================================== */
.topbar {
    background: var(--dark-bg);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 68px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}

.logo-link:hover {
    opacity: 0.95;
}

.logo-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #3b82f6;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0;
    color: #ffffff;
}

.logo-badge {
    background: rgba(37, 99, 235, 0.25);
    border: 1px solid rgba(96, 165, 250, 0.4);
    color: #93c5fd;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    margin-left: 6px;
    vertical-align: middle;
}

/* Desktop Nav */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.desktop-nav a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.desktop-nav a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.desktop-nav a.active {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.35);
    border: 1px solid rgba(96, 165, 250, 0.3);
}

/* Mobile Nav Toggle Button */
.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.mobile-nav-toggle:hover,
.mobile-nav-toggle:focus {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.mobile-nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #fff;
    border-radius: 2px;
    transition: var(--transition);
    margin: 2.5px 0;
}

.mobile-nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
    display: none;
    background: var(--dark-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 20px 24px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 999;
}

.mobile-nav-drawer.open {
    display: block;
    animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav-links a {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    min-height: 48px;
}

.mobile-nav-links a:hover,
.mobile-nav-links a:active {
    background: rgba(37, 99, 235, 0.2);
    color: #fff;
}

.mobile-nav-links a.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ==========================================================================
   Cards & Content Blocks
   ========================================================================== */
.card {
    background: var(--card-bg);
    margin-top: 24px;
    padding: 28px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card h2 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.5px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    border: none;
    background: var(--primary);
    color: #ffffff;
    padding: 12px 22px;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
    min-height: 44px;
    user-select: none;
    text-align: center;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn.secondary {
    background: #e2e8f0;
    color: #334155;
    box-shadow: none;
}

.btn.secondary:hover {
    background: #cbd5e1;
    color: #0f172a;
}

.btn-primary {
    background: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-success {
    background: var(--success);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    background: var(--success-hover);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.btn-small {
    padding: 8px 14px;
    font-size: 13px;
    min-height: 36px;
    border-radius: 8px;
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    background: linear-gradient(135deg, #0b1329 0%, #1e293b 100%);
    color: white;
    padding: 48px 24px;
    text-align: center;
    border-radius: 18px;
    margin-top: 16px;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    max-width: 820px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    margin: 0 0 14px 0;
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    color: #93c5fd;
    margin-bottom: 14px;
    font-weight: 600;
}

.hero-description {
    font-size: 16px;
    color: #cbd5e1;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 680px;
}

/* ==========================================================================
   Features Grid
   ========================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
    margin: 28px 0;
}

.feature-card {
    background: #f8fafc;
    padding: 22px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: #93c5fd;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: #ffffff;
}

.feature-icon {
    font-size: 36px;
    margin-bottom: 12px;
    line-height: 1;
}

.feature-card h4 {
    margin: 0 0 6px 0;
    color: #0f172a;
    font-size: 16px;
    font-weight: 700;
}

.feature-card p {
    margin: 0;
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Features List */
.features-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.features-list li {
    padding: 10px 14px 10px 38px;
    position: relative;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    line-height: 1.4;
}

.features-list li::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

/* ==========================================================================
   Steps Grid
   ========================================================================== */
.steps-container {
    margin-top: 28px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.step-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.step-card:hover {
    border-color: #93c5fd;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 14px;
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.step-card h4 {
    margin: 0 0 8px 0;
    color: #0f172a;
    font-size: 17px;
    font-weight: 700;
}

.step-card p {
    margin: 0 0 18px 0;
    font-size: 14px;
    color: var(--text-muted);
    flex-grow: 1;
}

.step-card .btn {
    width: 100%;
}

/* CTA Container */
.cta-container,
.cta-footer {
    margin-top: 28px;
    text-align: center;
}

.cta-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* ==========================================================================
   Notice Banners & Alerts
   ========================================================================== */
.banner-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14.5px;
    line-height: 1.5;
}

.banner-notice-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.banner-notice-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.banner-notice-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.banner-icon {
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 1px;
}

.banner-text strong {
    display: block;
    font-size: 15px;
    margin-bottom: 3px;
}

.routing-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
}

/* ==========================================================================
   Forms & Controls
   ========================================================================== */
.form-grid {
    display: grid;
    gap: 20px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14.5px;
    color: #334155;
}

input[type="text"],
input[type="number"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 15px;
    color: #0f172a;
    background: #ffffff;
    transition: var(--transition);
    min-height: 46px;
    box-sizing: border-box;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

small {
    display: block;
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--text-muted);
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #e0e7ff;
    border-radius: 50%;
    font-size: 11px;
    color: #4338ca;
    cursor: help;
    font-weight: bold;
}

/* Checkbox Cards */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 8px 0;
}

.checkbox-card {
    background: #f8fafc;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.checkbox-card:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.checkbox-card:has(input:checked) {
    border-color: #93c5fd;
    background: #eff6ff;
}

.checkbox-card label {
    margin-bottom: 0;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-card small {
    margin-left: 24px;
    margin-top: 0;
}

/* ==========================================================================
   Result Box & Instructions
   ========================================================================== */
.result-box {
    margin-top: 24px;
    padding: 22px;
    border-radius: 14px;
    background: #ffffff;
    border: 1.5px solid #bfdbfe;
    box-shadow: var(--shadow-md);
}

.result-box h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 18px;
    color: #1e40af;
}

.hidden {
    display: none !important;
}

.instructions-box {
    margin-top: 18px;
    padding: 20px;
    border-radius: 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.instructions-box h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #166534;
    font-size: 16px;
}

.instructions-text {
    margin-top: 16px;
    padding: 14px;
    background: #ffffff;
    border-radius: 10px;
    border-left: 4px solid #22c55e;
    box-shadow: var(--shadow-sm);
}

.instructions-text h5 {
    margin: 0 0 10px 0;
    color: #166534;
    font-size: 14px;
}

.instructions-text ol {
    margin: 0;
    padding-left: 20px;
}

.instructions-text li {
    margin: 6px 0;
    font-size: 14px;
    color: #374151;
}

/* Code Blocks */
.code-block-wrapper {
    position: relative;
    margin: 14px 0;
}

.code-block {
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 10px;
    margin: 10px 0;
    font-family: var(--font-mono);
    font-size: 13.5px;
    overflow-x: auto;
    line-height: 1.5;
    border: 1px solid #334155;
    position: relative;
}

.code-block p {
    margin: 0 0 8px 0;
    color: #94a3b8;
    font-size: 13px;
    font-family: var(--font-sans);
    font-weight: 600;
}

.code-block code {
    color: #4ade80;
    display: block;
    word-break: break-all;
    white-space: pre-wrap;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.code-title {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
}

.command-textarea,
#generatedKey {
    font-family: var(--font-mono);
    font-size: 13px;
    background: #0f172a;
    color: #4ade80;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 12px;
    width: 100%;
    resize: none;
    line-height: 1.4;
}

.command-textarea:focus,
#generatedKey:focus {
    outline: none;
    border-color: #60a5fa;
}

.copy-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

/* ==========================================================================
   Setup Guide Styles
   ========================================================================== */
.setup-header {
    background: linear-gradient(135deg, #0b1329 0%, #1e293b 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.setup-header h1 {
    color: white;
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.setup-header p {
    color: #cbd5e1;
    font-size: 15.5px;
    margin: 0;
    line-height: 1.6;
}

/* OS Tabs (Segmented Control) */
.os-tabs {
    display: flex;
    gap: 8px;
    margin: 24px 0 0 0;
    background: #e2e8f0;
    padding: 6px;
    border-radius: 14px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 15px;
    color: #475569;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
}

.tab-btn:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.5);
}

.tab-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Setup Step Cards */
.setup-step {
    margin: 20px 0;
    padding: 20px 22px;
    border-left: 4px solid var(--primary);
    background: #f8fafc;
    border-radius: 12px;
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.setup-step.warning-step {
    border-left-color: var(--warning);
    background: #fffbeb;
    border-top-color: #fef3c7;
    border-right-color: #fef3c7;
    border-bottom-color: #fef3c7;
}

.setup-step.no-gui-step {
    border-left-color: #10b981;
    background: #f0fdf4;
    border-top-color: #dcfce7;
    border-right-color: #dcfce7;
    border-bottom-color: #dcfce7;
}

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

.step-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    font-weight: 700;
}

.step-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    background: #e0e7ff;
    color: #3730a3;
}

.step-content {
    margin-top: 10px;
}

.step-content ol,
.step-content ul {
    margin: 10px 0;
    padding-left: 22px;
}

.step-content li {
    margin: 8px 0;
    line-height: 1.6;
    font-size: 14.5px;
    color: #334155;
}

/* Info Boxes in Setup */
.info-box {
    background: #f8fafc;
    padding: 18px 20px;
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin: 14px 0;
}

.info-box.routing-box {
    border-left-color: #10b981;
    background: #f0fdf4;
    border-top-color: #bbf7d0;
    border-right-color: #bbf7d0;
    border-bottom-color: #bbf7d0;
}

.info-box h4 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #0f172a;
    font-size: 16px;
    font-weight: 700;
}

.info-box p {
    margin: 6px 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.info-box ul {
    margin: 8px 0;
    padding-left: 20px;
}

.info-box li {
    margin: 5px 0;
    color: #475569;
    font-size: 13.5px;
}

/* ==========================================================================
   Logs View (Responsive Table & Mobile Cards)
   ========================================================================== */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #ffffff;
}

th, td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #f8fafc;
}

.key-cell {
    font-family: var(--font-mono);
    font-size: 12px;
    word-break: break-all;
    max-width: 240px;
}

/* Mobile Log Cards */
.mobile-logs-list {
    display: none;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}

.log-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.log-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
}

.log-card-name {
    font-weight: 700;
    font-size: 16px;
    color: #0f172a;
}

.log-card-time {
    font-size: 12px;
    color: var(--text-muted);
}

.log-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}

.log-card-label {
    color: var(--text-muted);
    font-weight: 500;
}

.log-card-val {
    color: #1e293b;
    font-weight: 600;
}

.log-key-box {
    background: #0f172a;
    color: #4ade80;
    font-family: var(--font-mono);
    font-size: 11.5px;
    padding: 10px;
    border-radius: 8px;
    word-break: break-all;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.log-key-box button {
    background: #334155;
    border: none;
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    margin-top: auto;
    font-size: 13.5px;
    color: var(--text-muted);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Optimization
   ========================================================================== */
@media (max-width: 900px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .form-row-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .mobile-nav-toggle {
        display: flex;
    }

    .topbar-inner {
        height: 60px;
    }

    .logo-text {
        font-size: 18px;
    }

    .hero {
        padding: 36px 18px;
        border-radius: 14px;
        margin-top: 12px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 17px;
    }

    .hero-description {
        font-size: 14.5px;
    }

    .card {
        padding: 20px 16px;
        margin-top: 16px;
        border-radius: 12px;
    }

    .card h2 {
        font-size: 20px;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .features-list {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn {
        width: 100%;
    }

    .os-tabs {
        width: 100%;
        max-width: 100%;
        padding: 4px;
        gap: 4px;
    }

    .tab-btn {
        font-size: 14px;
        padding: 10px 8px;
        min-height: 42px;
    }

    .setup-step {
        padding: 16px 14px;
        margin: 16px 0;
    }

    .setup-step h3 {
        font-size: 16px;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }

    /* Switch to mobile cards for logs */
    .table-wrap {
        display: none;
    }

    .mobile-logs-list {
        display: flex;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 24px;
    }

    .tab-btn {
        font-size: 13px;
        gap: 4px;
    }
}

/* ==========================================================================
   Modal Dialog Styles
   ========================================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: #ffffff;
    max-width: 440px;
    width: 100%;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    position: relative;
    animation: modalScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}