:root {
    --ta-bg: #f8fafc;
    --ta-surface: #ffffff;
    --ta-primary: #00AEEF;
    --ta-primary-glow: rgba(0, 174, 239, 0.15);
    --ta-secondary: #0ea5e9;
    --ta-accent: #38bdf8;
    --ta-text: #0f172a;
    --ta-text-muted: #64748b;
    --ta-border: #e2e8f0;
    --ta-glass: rgba(255, 255, 255, 0.8);
    --ta-radius: 12px;
    --ta-font-xs: 0.65rem;
    --ta-font-sm: 0.75rem;
    --ta-font-base: 0.9rem;
    --ta-font-md: 1.1rem;
    --ta-font-lg: 1.5rem;
    --ta-font-xl: 2.25rem;
}

@media (max-width: 768px) {
    :root {
        --ta-font-xs: 0.6rem;
        --ta-font-sm: 0.7rem;
        --ta-font-base: 0.85rem;
        --ta-font-md: 1rem;
        --ta-font-lg: 1.25rem;
        --ta-font-xl: 1.75rem;
    }
}

body {
    background-color: var(--ta-bg);
    color: var(--ta-text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Modern Header */
.ta-header {
    background: var(--ta-glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ta-border);
    padding: 0.75rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

@media (max-width: 991px) {
    .ta-header {
        padding: 0.5rem 1rem;
    }
}

/* Light Mode Logo Fix */
.navbar-brand img {
    filter: brightness(0); /* Makes the white logo black/dark */
    opacity: 0.9;
}

.ta-nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.ta-nav-link {
    color: var(--ta-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    position: relative;
    padding: 0.5rem 0;
}

.ta-nav-link:hover, .ta-nav-link.active {
    color: var(--ta-primary);
}

.ta-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--ta-primary);
}

/* Modern Buttons */
.btn-ta-primary {
    background: linear-gradient(135deg, var(--ta-primary), var(--ta-secondary));
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: var(--ta-radius);
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(0, 174, 239, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-ta-sm {
    padding: 0.4rem 1rem !important;
    font-size: 0.75rem !important;
}

.btn-ta-icon {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
}

.btn-ta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 174, 239, 0.3);
    color: white;
}

.btn-ta-secondary {
    background: #0f172a;
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: var(--ta-radius);
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: all 0.4s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-ta-secondary:hover {
    background: #1e293b;
    transform: translateY(-2px);
    color: white;
}

.btn-ta-outline {
    background: transparent;
    border: 1px solid var(--ta-border);
    color: var(--ta-text);
    padding: 0.6rem 1.5rem;
    border-radius: var(--ta-radius);
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-ta-outline:hover {
    background: #f1f5f9;
    border-color: var(--ta-text-muted);
    color: var(--ta-text);
}

/* Modern Cards */
.ta-card {
    background: var(--ta-surface);
    border: 1px solid var(--ta-border);
    border-radius: var(--ta-radius);
    padding: 1.5rem;
    height: 100%;
    transition: all 0.4s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
    .ta-card {
        padding: 1rem;
    }
}

.ta-card:hover {
    border-color: rgba(0, 174, 239, 0.3);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

/* Stats Cards */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--ta-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover::before {
    opacity: 1;
}

/* Typography */
h1, .h1 {
    color: var(--ta-text);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.text-gradient {
    color: var(--ta-text); /* Keep it simple in light mode */
}

/* Standardized Typography & Fields */
.ta-label {
    display: block;
    font-size: var(--ta-font-sm);
    text-transform: uppercase;
    font-weight: 700;
    color: var(--ta-text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.ta-input {
    display: block;
    width: 100% !important;
    box-sizing: border-box;
    background: #f8fafc !important;
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    padding: 0.8rem 1.2rem !important;
    font-size: var(--ta-font-base) !important;
    font-weight: 500 !important;
    color: var(--ta-text) !important;
    transition: all 0.2s ease !important;
    outline: none;
}

.ta-input:focus {
    background: white !important;
    border-color: var(--ta-primary) !important;
    box-shadow: 0 0 0 4px var(--ta-primary-glow) !important;
    outline: none !important;
}

.ta-h1 { font-size: var(--ta-font-xl); font-weight: 800; letter-spacing: -0.04em; }
.ta-h2 { font-size: var(--ta-font-lg); font-weight: 700; letter-spacing: -0.02em; }
.ta-h3 { font-size: var(--ta-font-md); font-weight: 700; color: var(--ta-primary); }

/* Tables */
.ta-table-container {
    background: var(--ta-surface);
    border: 1px solid var(--ta-border);
    border-radius: var(--ta-radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ta-table {
    width: 100%;
    border-collapse: collapse;
}

.ta-table th {
    background: #f8fafc;
    padding: 1.25rem;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--ta-text-muted);
    letter-spacing: 0.05em;
    border-bottom: 2px solid #f1f5f9;
}

.ta-table td {
    padding: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    color: #334155;
}

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

.ta-table tr:hover td {
    background: #fbfcfd;
}

/* Responsive Table Utility */
.ta-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .ta-table.stack-on-mobile thead {
        display: none;
    }
    .ta-table.stack-on-mobile tr {
        display: block;
        border-bottom: 1px solid #f1f5f9;
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }
    .ta-table.stack-on-mobile td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: none;
        padding: 0.25rem 0.75rem;
        text-align: right;
        font-size: 0.8rem !important;
    }
    .ta-table.stack-on-mobile td::before {
        content: attr(data-label);
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.6rem;
        color: var(--ta-text-muted);
        text-align: left;
        opacity: 0.7;
    }
    .ta-table.stack-on-mobile td:first-child {
        background: #f8fafc;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 0.5rem 0.75rem;
        border-radius: 8px 8px 0 0;
    }
    .ta-table.stack-on-mobile td:first-child::before {
        margin-bottom: 0.15rem;
    }
    .ta-table.stack-on-mobile .btn-ta-outline, 
    .ta-table.stack-on-mobile .btn-ta-primary {
        padding: 0.35rem 0.75rem;
        font-size: 0.7rem;
    }
}

.d-mobile-none {
    display: none !important;
}
@media (min-width: 769px) {
    .d-mobile-none {
        display: table-cell !important;
    }
}

/* Status Badges */
.ta-badge {
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.ta-badge-success { background: #dcfce7; color: #166534; }
.ta-badge-primary { background: #e0f2fe; color: #0369a1; }
.ta-badge-muted { background: #f1f5f9; color: #475569; }

/* Grid Pattern for Light */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image: linear-gradient(#e2e8f0 1px, transparent 1px), linear-gradient(90deg, #e2e8f0 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    mask-image: radial-gradient(circle at center, rgb(0 0 0 / 22%) 0%, transparent 100%);
}

/* Editorial Workspace */
.editorial-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 991px) {
    .editorial-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.vert-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: sticky;
    top: 100px;
}

@media (max-width: 991px) {
    .vert-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 1rem;
        white-space: nowrap;
        position: static;
        mask-image: linear-gradient(to right, black 85%, transparent 100%);
    }
    .vert-nav::-webkit-scrollbar { display: none; }
}

.vert-nav-link {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    color: var(--ta-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.vert-nav-link:hover {
    background: rgba(0, 174, 239, 0.05);
    color: var(--ta-primary);
}

.vert-nav-link.active {
    background: white;
    color: var(--ta-primary);
    border-color: var(--ta-border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

/* Section Card */
.section-workspace {
    background: white;
    border: 1px solid var(--ta-border);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px -15px rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
    .section-workspace {
        padding: 1rem;
        border-radius: 8px;
    }
}

.editor-heading {
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Auto-expanding Textarea */
.ta-editor {
    border: none;
    padding: 0;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #334155;
    resize: none;
    width: 100%;
    background: transparent;
    transition: all 0.3s ease;
}

.ta-editor:focus {
    outline: none;
    box-shadow: none;
}

/* Segmented Switcher */
.ta-switcher {
    display: inline-flex;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: 999px;
    gap: 0.15rem;
}

.ta-switcher .nav-link {
    border: none !important;
    border-radius: 999px !important;
    padding: 0.5rem 1.25rem !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--ta-text-muted) !important;
    transition: all 0.3s ease !important;
}

.ta-switcher .nav-link.active {
    background: var(--ta-primary) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(0, 174, 239, 0.25);
}

/* Animation Classes */
.gsap-reveal {
    opacity: 0;
    transform: translateY(20px);
}

/* Mobile Menu Styles */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-content {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 2001;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: -10px 0 40px rgba(0,0,0,0.1);
}

.mobile-nav-overlay.active .mobile-nav-content {
    right: 0;
}

.mobile-nav-link {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ta-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.mobile-nav-link:active {
    background: #f1f5f9;
}

.mobile-nav-link.active {
    background: var(--ta-primary-glow);
    color: var(--ta-primary);
}

.btn-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--ta-border);
    border-radius: 10px;
    padding: 0.5rem;
    color: var(--ta-text);
    cursor: pointer;
}

@media (max-width: 991px) {
    .btn-menu-toggle {
        display: block;
    }
}
