/* SECURE NXG Cyber Emerald & Slate Stylesheet */
:root {
    color-scheme: dark;
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --primary-subtle: rgba(16, 185, 129, 0.12);
    --primary-rgb: 16, 185, 129;
    --bs-primary: #10b981;
    --bs-primary-rgb: 16, 185, 129;
    --bs-primary-bg-subtle: rgba(16, 185, 129, 0.12);
    --bs-primary-border-subtle: rgba(16, 185, 129, 0.25);
    --bs-primary-text-emphasis: #059669;
    --bs-link-color: #10b981;
    --bs-link-hover-color: #34d399;
    --accent: #f97316;
    --accent-dark: #ea580c;
    --bg-base: #04120f;
    --bg-surface: #0a1f1a;
    --bg-glass: rgba(10, 31, 26, 0.75);
    --border-glass: rgba(16, 185, 129, 0.15);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

/* Bootstrap Utility Overrides for Cyber Emerald Theme */
.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
    color: #ffffff !important;
}

.bg-primary-subtle {
    background-color: rgba(16, 185, 129, 0.12) !important;
    color: var(--primary) !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

.border-primary-subtle {
    border-color: rgba(16, 185, 129, 0.25) !important;
}

.btn-link.text-primary {
    color: var(--primary) !important;
}

.btn-link.text-primary:hover {
    color: var(--primary-light) !important;
}

body {
    background: radial-gradient(circle at 50% 0%, #03201a 0%, #04120f 100%) no-repeat fixed;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.4);
}

/* Symmetric Topbar */
.sem-topbar {
    background: rgba(4, 18, 15, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 0.82rem;
    padding: 6px 0;
}

.sem-toplink {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.2s ease;
}

.sem-toplink:hover {
    color: var(--primary);
    text-decoration: none;
}

.sem-toplink-button {
    background: none;
    border: none;
    padding: 0;
}

/* Brandbar */
.sem-brandbar {
    background: rgba(5, 20, 16, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    color: #fff;
    padding: 16px 0;
}

.sem-login-title {
    font-size: 1.3rem;
    letter-spacing: 0.15em;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.sem-login-subtitle {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Sidebar Layout */
.sem-sidebar {
    width: 260px;
    height: 100vh;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-glass);
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    padding: 20px 14px 16px;
    z-index: 100;
    transition: left 0.3s ease;
    overflow: hidden;
}

.sidebar-menu-wrapper {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    margin-bottom: 8px;
}

.sidebar-menu-wrapper::-webkit-scrollbar {
    width: 4px;
}
.sidebar-menu-wrapper::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-menu-wrapper::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.2);
    border-radius: 4px;
}
.sidebar-menu-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.4);
}

.sidebar-footer {
    flex-shrink: 0;
    padding-top: 8px;
}

.sem-content {
    margin-left: 260px;
    width: calc(100% - 260px);
    min-height: 100vh;
    padding: 40px;
    position: relative;
    z-index: 10;
    transition: margin-left 0.3s ease, width 0.3s ease;
}

/* Sidebar Menu Items */
.sem-sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sem-sidebar-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.sem-sidebar-item.active > a,
.sem-sidebar-item > a:hover {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

/* Collapsible Submenu */
.sem-sidebar-submenu {
    list-style: none;
    padding-left: 36px;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sem-sidebar-submenu a {
    display: block;
    padding: 8px 12px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sem-sidebar-submenu li.active a,
.sem-sidebar-submenu a:hover {
    color: var(--primary);
    background: rgba(16, 185, 129, 0.05);
}

/* Header bar for mobile devices */
.sem-mobile-header {
    display: none;
    height: 60px;
    background: rgba(10, 31, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-glass);
    padding: 0 20px;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
}

.sem-mobile-brand {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Responsive Overrides */
@media (max-width: 991.98px) {
    .sem-sidebar {
        left: -260px;
    }
    .sem-sidebar.show {
        left: 0;
    }
    .sem-content {
        margin-left: 0;
        width: 100%;
        padding: 24px;
    }
    .sem-mobile-header {
        display: flex;
    }
}

/* Premium Card Overrides */
.card {
    background: rgba(10, 31, 26, 0.4) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass) !important;
    color: var(--text-main);
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(16, 185, 129, 0.3) !important;
    box-shadow: 0 15px 30px rgba(4, 18, 15, 0.6), 0 0 20px rgba(16, 185, 129, 0.03);
}

.card-header {
    background: rgba(255, 255, 255, 0.02) !important;
    border-bottom: 1px solid var(--border-glass) !important;
    font-weight: 600;
}

/* Tables & Lists */
.table {
    color: #cbd5e1 !important;
    background-color: transparent !important;
    --bs-table-bg: transparent !important;
    border-color: var(--border-glass) !important;
}

.table th,
.table > :not(caption) > thead > tr > th {
    background: rgba(255, 255, 255, 0.02) !important;
    color: var(--primary) !important;
    border-bottom: 2px solid var(--border-glass) !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.table td,
.table > :not(caption) > tbody > tr > td {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
    vertical-align: middle;
    color: #cbd5e1 !important;
}

.table tr {
    background: transparent !important;
}

.table-hover tbody tr:hover td {
    background-color: rgba(16, 185, 129, 0.08) !important;
    color: #fff !important;
}

/* Glass Inputs & Forms */
.form-control, .form-select {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    border-radius: 10px !important;
    padding: 0.6rem 1rem;
    transition: all 0.2s ease;
    color-scheme: dark;
}
.form-control::placeholder, .form-select::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
    opacity: 1;
}

.form-control:focus, .form-select:focus {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25) !important;
}

/* Select & Dropdown Options Theme Styling */
select, .form-select {
    color-scheme: dark;
}

select option, .form-select option {
    background-color: #0b1329 !important;
    color: #f8fafc !important;
}

select optgroup, .form-select optgroup {
    background-color: #0b1329 !important;
    color: #94a3b8 !important;
}

.input-group-text {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--primary) !important;
}

/* Button Micro-interactions */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    color: #fff !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    padding: 0.6rem 1.5rem !important;
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2) !important;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #047857 100%) !important;
    border-color: var(--primary-dark) !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4) !important;
    transform: translateY(-2px);
    color: #fff !important;
}

.btn-outline-primary {
    color: var(--primary) !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
    background: rgba(16, 185, 129, 0.05) !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important;
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #cbd5e1 !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    padding: 0.6rem 1.5rem !important;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px);
    color: #fff !important;
}

/* Badges & Accents */
.badge {
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    letter-spacing: 0.3px;
}

.badge.bg-primary {
    background-color: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.badge.bg-primary-subtle {
    background-color: rgba(16, 185, 129, 0.12) !important;
    color: var(--primary) !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
}

.badge.bg-secondary {
    background-color: rgba(148, 163, 184, 0.12) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.badge.bg-success {
    background-color: rgba(16, 185, 129, 0.12) !important;
    color: var(--primary) !important;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge.bg-danger {
    background-color: rgba(239, 68, 68, 0.12) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge.bg-warning {
    background-color: rgba(245, 158, 11, 0.12) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Login & Signup Page Layouts (Forest Green Glassmorphism) */
.sem-login-bg {
    min-height: 100vh;
    background: radial-gradient(circle at top left, #03201a 0%, #04120f 65%);
    position: relative;
    color: #f1f5f9;
}

.sem-login-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.12) 0%, transparent 40%),
                radial-gradient(circle at 80% 80%, rgba(249, 115, 22, 0.08) 0%, transparent 40%);
    pointer-events: none;
}

.sem-login-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.sem-login-card {
    width: 100%;
    max-width: 440px;
    border-radius: 18px;
    background: rgba(10, 31, 26, 0.85) !important;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
    padding: 32px 32px 24px 32px;
    box-shadow: 0 20px 40px rgba(4, 18, 15, 0.8), 0 0 30px rgba(16, 185, 129, 0.05);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.sem-login-card:hover {
    border-color: rgba(16, 185, 129, 0.35) !important;
    box-shadow: 0 25px 50px rgba(4, 18, 15, 0.9), 0 0 40px rgba(16, 185, 129, 0.08);
}

.sem-login-brand {
    text-align: center;
    margin-bottom: 24px;
}

.sem-login-title {
    font-size: 1.3rem;
    letter-spacing: 0.15em;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.sem-login-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 6px;
    color: var(--text-main);
}

.sem-login-body {
    margin-top: 18px;
}

.sem-login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Custom premium input group with icon inside */
.input-group-custom {
    display: flex;
    align-items: center;
    background: rgba(4, 18, 15, 0.5) !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
    border-radius: 10px !important;
    transition: all 0.25s ease;
    height: 44px;
    margin-bottom: 16px;
}

.input-group-custom:focus-within {
    border-color: var(--accent) !important;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.25) !important;
    background: rgba(4, 18, 15, 0.7) !important;
}

.input-group-custom .input-group-text {
    background: transparent !important;
    border: none !important;
    color: var(--primary) !important;
    padding-left: 14px;
    padding-right: 8px;
    display: flex;
    align-items: center;
}

.input-group-custom .form-control {
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    padding: 0.6rem 12px 0.6rem 0 !important;
    height: 100% !important;
    box-shadow: none !important;
    font-size: 0.95rem;
}

.input-group-custom .form-control::placeholder {
    color: rgba(255, 255, 255, 0.3) !important;
}

/* Override browser default autofill styles */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #051512 inset !important;
    -webkit-text-fill-color: #ffffff !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Form elements customization */
.form-select.custom-select {
    background-color: rgba(4, 18, 15, 0.5) !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
    color: #fff !important;
    border-radius: 10px !important;
    height: 44px !important;
    padding: 0 14px !important;
    transition: all 0.25s ease;
}

.form-select.custom-select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.25) !important;
}

.form-select.custom-select option {
    background-color: #051410 !important;
    color: #fff !important;
}

/* Clerk-style premium Google button */
.btn-google-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    font-weight: 600;
    border-radius: 10px;
    height: 44px;
    width: 100%;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 0.92rem;
}

.btn-google-custom:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.text-slate-300 {
    color: #cbd5e1 !important;
}

.text-slate-400 {
    color: #94a3b8 !important;
}

/* Sidebar Brand Section */
.sidebar-brand {
    margin-bottom: 30px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.12);
}

.sidebar-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
}

.sidebar-subtitle {
    font-size: 0.72rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* Sidebar Footer & Operator Profile Section */
.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
}

/* Scrollable Wrapper for Navigation Menu */
.sidebar-menu-wrapper {
    overflow-y: auto;
    flex-grow: 1;
    margin-bottom: 16px;
    padding-right: 4px;
}

/* Thin premium scrollbar for menu container */
.sidebar-menu-wrapper::-webkit-scrollbar {
    width: 4px;
}
.sidebar-menu-wrapper::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-menu-wrapper::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.2);
    border-radius: 2px;
}
.sidebar-menu-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.4);
}

.operator-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(16, 185, 129, 0.04);
    border: 1px solid rgba(16, 185, 129, 0.1);
    padding: 12px;
    border-radius: 12px;
}

.operator-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.operator-info {
    flex-grow: 1;
    min-width: 0;
}

.operator-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.operator-role {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.btn-operator-logout {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-operator-logout:hover {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
}

/* Standard Console Light Theme Override */
body.light-theme {
    background-color: #f8fafc;
    color: #0f172a;
}

/* Standard Console Light Theme Override */
body.light-theme {
    background: #f8fafc !important;
    background-color: #f8fafc !important;
    color: #0f172a;
}

body.light-theme .sem-sidebar {
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
}

body.light-theme .sidebar-title {
    color: #059669;
}

body.light-theme .sem-sidebar-item a {
    color: #334155;
}

body.light-theme .sem-sidebar-item.active > a,
body.light-theme .sem-sidebar-item > a:hover {
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

body.light-theme .sem-sidebar-submenu a {
    color: #64748b;
}

body.light-theme .sem-sidebar-submenu li.active a,
body.light-theme .sem-sidebar-submenu a:hover {
    color: #059669;
    background: rgba(16, 185, 129, 0.05);
}

body.light-theme .operator-avatar {
    background: #059669;
}

body.light-theme .operator-name {
    color: #0f172a;
}

body.light-theme .operator-role {
    color: #64748b;
}

.license-quota-box {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--text-muted);
}
.license-quota-box div {
    color: #10b981;
}

body.light-theme .session-timer-box {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #059669 !important;
}

body.light-theme .license-quota-box {
    background: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    color: #166534 !important;
}

body.light-theme .license-quota-box div {
    color: #047857 !important;
}

body.light-theme .sidebar-menu-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}

body.light-theme .sidebar-menu-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

body.light-theme .card,
body.light-theme .sem-stat-card,
body.light-theme .sem-table-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
    color: #334155 !important;
}

body.light-theme .sem-stat-card .label {
    color: #64748b;
}

body.light-theme .sem-stat-card .value {
    color: #0f172a;
}

body.light-theme .sem-stat-card.success {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.25) !important;
    color: #047857 !important;
}

body.light-theme .sem-stat-card.success .value {
    color: #047857 !important;
}

body.light-theme .sem-stat-card.danger {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
    color: #b91c1c !important;
}

body.light-theme .sem-stat-card.danger .value {
    color: #b91c1c !important;
}

body.light-theme .text-white {
    color: #0f172a !important;
}

body.light-theme .sem-page-title {
    color: #059669 !important;
}

body.light-theme .sem-updated-pill {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}

body.light-theme .sem-table-title {
    background: #f1f5f9;
    color: #0f172a;
    border-bottom: 1px solid #e2e8f0;
}

body.light-theme .table {
    color: #334155 !important;
}

body.light-theme .table th,
body.light-theme .table > :not(caption) > thead > tr > th {
    background: #f1f5f9 !important;
    color: #059669 !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

body.light-theme .table td,
body.light-theme .table > :not(caption) > tbody > tr > td {
    background: #ffffff !important;
    color: #334155 !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

body.light-theme .table-hover tbody tr:hover td,
body.light-theme .table-hover tbody tr:hover > :not(caption) > * {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

body.light-theme .glow-radial-1,
body.light-theme .glow-radial-2 {
    display: none !important;
}

body.light-theme .session-timer-box {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

/* Global Content Colors in Light Mode */
body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme h5,
body.light-theme h6 {
    color: #0f172a !important;
}

body.light-theme p,
body.light-theme label {
    color: #334155 !important;
}

body.light-theme span:not(.btn *, .btn-plan-cta *, .badge, [class*="badge"], [class*="btn"], .plan-price-num, .plan-price-cycle, #btnCustomPriceText) {
    color: #334155 !important;
}

body.light-theme .sem-page-subtitle {
    color: #64748b !important;
}

body.light-theme {
    color-scheme: light;
}

body.light-theme .form-control,
body.light-theme .form-select,
body.light-theme select {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    color-scheme: light;
}
body.light-theme .form-control::placeholder,
body.light-theme .form-select::placeholder {
    color: #94a3b8 !important;
    opacity: 1;
}

body.light-theme .form-control:focus,
body.light-theme .form-select:focus,
body.light-theme select:focus {
    border-color: #059669 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
}

body.light-theme select option,
body.light-theme .form-select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

body.light-theme select optgroup,
body.light-theme .form-select optgroup {
    background-color: #ffffff !important;
    color: #64748b !important;
}

/* Light theme overrides for standard badges */
body.light-theme .badge.bg-primary {
    background-color: #059669 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.2);
}

body.light-theme .badge.bg-primary-subtle {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: #047857 !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
}

body.light-theme .badge.bg-secondary {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

body.light-theme .badge.bg-success {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: #059669 !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

body.light-theme .badge.bg-warning {
    background-color: rgba(245, 158, 11, 0.1) !important;
    color: #d97706 !important;
    border: 1px solid rgba(245, 158, 11, 0.2) !important;
}

body.light-theme .badge.bg-danger {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: #dc3545 !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
}

/* Light Theme Overrides for Custom Input Groups */
body.light-theme .input-group-custom {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
}

body.light-theme .input-group-custom:focus-within {
    border-color: #059669 !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25) !important;
}

body.light-theme .input-group-custom .form-control {
    color: #0f172a !important;
}

body.light-theme .input-group-custom .form-control::placeholder {
    color: #94a3b8 !important;
}

body.light-theme .input-group-custom .input-group-text {
    color: #059669 !important;
}

/* Light Theme Button Overrides */
body.light-theme .btn-primary {
    background: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.2) !important;
}

body.light-theme .btn-primary:hover {
    background: #047857 !important;
    border-color: #047857 !important;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3) !important;
}

body.light-theme .btn-outline-primary {
    color: #059669 !important;
    border-color: rgba(5, 150, 105, 0.35) !important;
    background: rgba(16, 185, 129, 0.06) !important;
}

body.light-theme .btn-outline-primary:hover,
body.light-theme .btn-outline-primary:focus,
body.light-theme .btn-outline-primary:active {
    background: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25) !important;
}

body.light-theme .btn-secondary {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
}

body.light-theme .btn-secondary:hover {
    background: #cbd5e1 !important;
    color: #0f172a !important;
}

body.light-theme .btn-outline-warning {
    color: #d97706 !important;
    border-color: #f59e0b !important;
}
body.light-theme .btn-outline-warning:hover {
    background-color: #f59e0b !important;
    color: #fff !important;
}
body.light-theme .btn-outline-success {
    color: #059669 !important;
    border-color: #10b981 !important;
}
body.light-theme .btn-outline-success:hover {
    background-color: #10b981 !important;
    color: #fff !important;
}

/* Custom Page & Border Utilities */
.sem-page-desc {
    color: #94a3b8 !important;
    font-size: 0.85rem;
}
body.light-theme .sem-page-desc {
    color: #475569 !important;
}

.border-translucent {
    border: 1px solid rgba(16, 185, 129, 0.15) !important;
}
body.light-theme .border-translucent {
    border: 1px solid #e2e8f0 !important;
}

body.light-theme .form-text.text-muted {
    color: #64748b !important;
}

/* Ensure text-muted is readable in both modes */
.text-muted {
    color: #94a3b8 !important;
}
body.light-theme .text-muted {
    color: #64748b !important;
}

/* Policy Edit Page Themes */
.policy-tab-content {
    background: rgba(10, 31, 26, 0.4) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass) !important;
    color: var(--text-main) !important;
}
.policy-card {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: var(--text-main) !important;
    border-radius: 14px;
}
.policy-inner-card {
    background: rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px;
    color: var(--text-main) !important;
}
.policy-info-box {
    background: rgba(16, 185, 129, 0.05) !important;
    border: 1px dashed rgba(16, 185, 129, 0.2) !important;
    color: var(--text-muted) !important;
}
.policy-tab-link {
    color: var(--text-muted) !important;
    border: 1px solid transparent !important;
}
.policy-tab-link.active {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #10b981 !important;
    border-color: var(--border-glass) var(--border-glass) transparent !important;
}
.policy-text-slate {
    color: var(--text-main) !important;
}

/* Light Theme Overrides */
body.light-theme .policy-tab-content {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
}
body.light-theme .policy-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
}
body.light-theme .policy-inner-card {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
}
body.light-theme .policy-info-box {
    background: #f1f5f9 !important;
    border: 1px dashed #cbd5e1 !important;
    color: #475569 !important;
}
body.light-theme .policy-tab-link {
    color: #475569 !important;
}
body.light-theme .policy-tab-link.active {
    background: #f8fafc !important;
    color: #0f172a !important;
    border-color: #cbd5e1 #cbd5e1 transparent !important;
}
body.light-theme .policy-text-slate {
    color: #334155 !important;
}


