/* Modern Theme System for Connect Portal */

/* ===== Theme Variables ===== */
:root {
    /* Light Mode (Red #de0c15 / White) */
    --primary-color: #de0c15;
    --primary-hover: #b80a11;
    --secondary-color: #ff3b45;
    --accent-color: #ff6b73;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #e2e8f0;
    --bg-hover: #cbd5e1;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --border-color: #cbd5e1;
    --border-hover: #94a3b8;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    
    --header-bg: rgba(255, 255, 255, 0.95);
    --header-border: rgba(222, 12, 21, 0.15);
    --header-accent: #de0c15;
    --card-gradient: linear-gradient(135deg, #ff3b45 0%, #ff6b73 100%);
}

[data-theme="dark"] {
    /* Dark Mode (Black / Gray with Red #de0c15 accents) */
    --primary-color: #de0c15;
    --primary-hover: #ff3b45;
    --secondary-color: #b80a11;
    --accent-color: #ff6b73;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-hover: #475569;
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --border-color: #334155;
    --border-hover: #475569;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.4);
    
    --header-bg: rgba(30, 41, 59, 0.95);
    --header-border: rgba(222, 12, 21, 0.3);
    --header-accent: #de0c15;
    --card-gradient: linear-gradient(135deg, #de0c15 0%, #ff3b45 100%);
}

/* ===== Base Styles ===== */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background 0.3s, color 0.3s;
}

/* ===== Scrollbar Styling ===== */
/* Light Mode Scrollbar */
:root {
    scrollbar-color: #cbd5e1 #f8fafc;
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #f8fafc;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 6px;
    border: 2px solid #f8fafc;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Dark Mode Scrollbar */
[data-theme="dark"] {
    scrollbar-color: #475569 #1e293b;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #1e293b;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 6px;
    border: 2px solid #1e293b;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ===== Header ===== */
.header {
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: white;
    padding: 0.5rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid var(--header-accent);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 55px;
    transition: all 0.3s ease;
}

.header-content {
    max-width: 100%;
    margin: 0;
    padding: 0 1.5rem 0 2rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo { 
    display: flex; 
    align-items: center; 
    gap: 0.75rem; 
}

.logo-text { 
    font-size: 1.25rem; 
    font-weight: 700;
    background: linear-gradient(135deg, var(--header-accent) 0%, #ff3b45 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.version {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.2rem 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    letter-spacing: 0.5px;
}

/* ===== Header Controls - Unified Button Style ===== */
.header-controls { 
    display: flex; 
    gap: 10px; 
    align-items: center; 
}

.header-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(222, 12, 21, 0.15);
}

.avatar { 
    font-size: 13px; 
}

/* ===== User Menu ===== */
.user-menu { 
    position: relative; 
    display: inline-block; 
}

.dropdown { 
    position: absolute; 
    right: 0; 
    top: 46px; 
    background: var(--bg-secondary); 
    border: 1px solid var(--border-color); 
    border-radius: 12px; 
    min-width: 240px; 
    box-shadow: var(--shadow-lg); 
    z-index: 2000;
    overflow: hidden;
}

.dropdown-item { 
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary); 
    text-decoration: none; 
    transition: all 0.2s ease;
    font-size: 14px;
}

.dropdown-item [data-icon] {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.dropdown-item:hover { 
    background: var(--bg-tertiary); 
    color: var(--primary-color);
}

.dropdown-item:hover [data-icon] {
    opacity: 1;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
    opacity: 0.5;
}

.dropdown-item.logout-item {
    color: #dc2626;
}

.dropdown-item.logout-item [data-icon] {
    color: #dc2626;
}

.dropdown-item.logout-item:hover {
    background: #fef2f2;
    color: #991b1b;
}

[data-theme="dark"] .dropdown-item.logout-item:hover {
    background: #7f1d1d;
    color: #fecaca;
}

.user-dropdown {
    min-width: 220px;
}

/* ===== Notification Menu ===== */
.notification-menu {
    position: relative;
    display: inline-block;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #dc2626;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
    transition: background 0.3s ease;
}

.notification-dropdown {
    min-width: 360px;
    max-height: 480px;
    display: flex;
    flex-direction: column;
}

.notification-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.notification-settings-btn {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
    color: var(--text-secondary);
}

.notification-settings-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.notification-settings-btn .settings-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-list {
    overflow: hidden;
}

.notification-empty {
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.notification-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: var(--bg-tertiary);
}

.notification-item.unread {
    background: rgba(59, 130, 246, 0.05);
}

[data-theme="dark"] .notification-item.unread {
    background: rgba(59, 130, 246, 0.1);
}

.notification-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--bg-tertiary);
}

.notification-icon.info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.notification-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.notification-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.notification-icon.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notification-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.notification-view-all {
    display: block;
    text-align: center;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: color 0.2s;
}

.notification-view-all:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ===== Layout Container ===== */
.layout-container {
    display: flex;
    padding-top: 55px; /* Header height */
    min-height: calc(100vh - 55px - 37px); /* Viewport - Header - Footer */
}

/* ===== Sidebar Navigation ===== */
.sidebar {
    width: 240px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    transition: width 0.3s ease;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 55px;
    left: 0;
    bottom: 0;
    z-index: 900;
    overflow-y: auto;
}

.sidebar:not(.active) {
    width: 60px;
}

.sidebar-header {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.sidebar-nav {
    flex: 1;
    padding: 0.5rem 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    margin: 0;
}

/* ============================================================================
   SIDEBAR LINK STYLES - MANAGED IN menu.css
   ============================================================================
   All sidebar-link styles have been moved to menu.css for better organization.
   DO NOT add sidebar-link styles here to prevent conflicts.
   ============================================================================ */

.sidebar-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: currentColor;
    transition: all 0.2s;
}

.sidebar-text {
    opacity: 1;
    transition: opacity 0.2s;
}

.sidebar:not(.active) .sidebar-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

/* Old sidebar collapsed styles - MANAGED IN menu.css */

/* ===== Main Content ===== */
.main {
    flex: 1;
    padding: 2rem;
    margin-left: 240px;
    width: calc(100% - 240px);
    min-height: calc(100vh - 55px - 37px); /* Header (55px) + Footer (~37px) */
    transition: margin-left 0.3s ease, width 0.3s ease;
}

/* Adjust main content when sidebar is collapsed */
body.sidebar-collapsed .main {
    margin-left: 60px;
    width: calc(100% - 60px);
}

body.sidebar-collapsed .footer {
    margin-left: 60px;
}

/* ===== Dashboard Cards ===== */
.dashboard { 
    display: block; 
}

.welcome-card {
    background: var(--card-gradient);
    color: white;
    padding: 2.5rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.welcome-card h1 { 
    font-size: 2rem; 
    margin-bottom: 0.5rem; 
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.stat-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.stat-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== Loading ===== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--primary-color);
    font-size: 1.1rem;
    padding: 3rem;
}

.spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Error ===== */
.error {
    background: #fee2e2;
    color: #991b1b;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #fecaca;
}

[data-theme="dark"] .error {
    background: #450a0a;
    color: #fecaca;
    border-color: #7f1d1d;
}

/* ===== Personal Area ===== */
.personal-container {
    max-width: 900px;
    margin: 0 auto;
}

.page-title {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.personal-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.section-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.section-content {
    margin-top: 1.5rem;
}

/* ===== Forms ===== */
.personal-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-input:read-only {
    background: var(--bg-tertiary);
    cursor: not-allowed;
}

.form-hint {
    display: block;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

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

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

.form-message {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-weight: 500;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

[data-theme="dark"] .form-message.success {
    background: #0f5132;
    color: #d1e7dd;
    border-color: #0a3622;
}

[data-theme="dark"] .form-message.error {
    background: #842029;
    color: #f8d7da;
    border-color: #58151c;
}

[data-theme="dark"] .form-message.info {
    background: #055160;
    color: #cff4fc;
    border-color: #033a47;
}

/* ===== Password Strength ===== */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s;
}

.strength-weak .strength-fill {
    background: #dc2626;
}

.strength-medium .strength-fill {
    background: #f59e0b;
}

.strength-strong .strength-fill {
    background: #10b981;
}

.strength-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.strength-weak .strength-text {
    color: #dc2626;
}

.strength-medium .strength-text {
    color: #f59e0b;
}

.strength-strong .strength-text {
    color: #10b981;
}

.password-requirements {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.password-requirements small {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-requirements li {
    color: var(--text-muted);
    padding: 0.25rem 0;
    font-size: 0.875rem;
}

.password-requirements li::before {
    content: "○ ";
    margin-right: 0.5rem;
}

.password-requirements li.valid {
    color: #10b981;
}

.password-requirements li.valid::before {
    content: "✓ ";
}

/* ===== Notifications ===== */
.notification-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.notification-info h4 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.notification-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

/* ===== Toggle Switch ===== */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-hover);
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== MFA Status ===== */
.mfa-status {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    margin-bottom: 1rem;
}

.status-enabled {
    background: #d1fae5;
    color: #065f46;
}

.status-disabled {
    background: #fee2e2;
    color: #991b1b;
}

[data-theme="dark"] .status-enabled {
    background: #065f46;
    color: #d1fae5;
}

[data-theme="dark"] .status-disabled {
    background: #7f1d1d;
    color: #fecaca;
}

.status-icon {
    font-size: 1.2rem;
}

.mfa-steps {
    margin-top: 1.5rem;
}

.mfa-step {
    margin-bottom: 2rem;
}

.mfa-step h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.qr-container {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.qr-placeholder {
    background: var(--bg-primary);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
}

.qr-placeholder code {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
}

/* ===== Notifications Page ===== */
.notifications-page {
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.notifications-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.notifications-table-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

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

.notifications-table thead {
    background: var(--bg-tertiary);
    border-bottom: 2px solid var(--border-color);
}

.notifications-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notifications-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.notifications-table tbody tr:last-child {
    border-bottom: none;
}

.notifications-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.notifications-table td {
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.notification-row.unread {
    background: rgba(59, 130, 246, 0.05);
    font-weight: 500;
}

[data-theme="dark"] .notification-row.unread {
    background: rgba(59, 130, 246, 0.08);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
}

.status-indicator.unread {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.status-indicator.read {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.notification-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.notification-type-badge.info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.notification-type-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.notification-type-badge.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.notification-type-badge.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.notification-title-cell {
    font-weight: 600;
    color: var(--text-primary);
}

.notification-message-cell {
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-time-cell {
    white-space: nowrap;
    color: var(--text-muted);
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    transition: transform 0.2s;
    opacity: 0.7;
}

.btn-icon:hover {
    opacity: 1;
    transform: scale(1.2);
}

.btn-icon.btn-delete:hover {
    filter: hue-rotate(320deg);
}

.notifications-empty-state {
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.notifications-empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.notifications-empty-state p {
    color: var(--text-muted);
}

/* ===== Notification Settings Page ===== */
.notification-settings-page {
    max-width: 900px;
    margin: 0 auto;
}

.settings-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.settings-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.settings-card-header h2 {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.settings-card-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.settings-card-body {
    padding: 1rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.setting-item:hover {
    background: var(--bg-secondary);
}

.setting-info {
    flex: 1;
}

.setting-label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.setting-description {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.setting-item-inline {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    margin-top: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 6px;
}

.setting-time {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-time label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.setting-time input[type="time"] {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: 0.3s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.page-actions {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 0;
    justify-content: flex-start;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header-content,
    .nav-content,
    .main {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .nav-list {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .header-controls {
        gap: 8px;
    }

    .header-btn {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .footer-content {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* On mobile, adjust for collapsed sidebar by default */
    .main {
        margin-left: 60px;
        width: calc(100% - 60px);
    }

    .footer {
        margin-left: 60px;
    }

    .sidebar {
        width: 60px;
    }

    .sidebar.active {
        width: 240px;
    }

    /* Notifications table responsive */
    .notifications-table {
        font-size: 0.75rem;
    }
    
    .notifications-table th,
    .notifications-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .notification-message-cell {
        max-width: 150px;
    }
    
    .notifications-actions {
        flex-direction: column;
    }
    
    .notification-dropdown {
        min-width: 320px;
        right: -50px;
    }
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 0.5rem 0;
    margin-left: 240px;
    transition: margin-left 0.3s ease;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.footer-divider {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-info {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
}

/* Body keeps standard flow for fixed header/sidebar */

/* ===== Legal Pages (Imprint, Privacy, Terms) ===== */
.legal-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.legal-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--primary-color);
}

.legal-header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.legal-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0.5rem 0;
}

.legal-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.legal-content {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.legal-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.legal-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.legal-section h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.legal-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

.legal-section strong {
    color: var(--text-primary);
    font-weight: 600;
}

.legal-list {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.legal-list li {
    color: var(--text-secondary);
    padding: 0.5rem 0 0.5rem 2rem;
    position: relative;
    line-height: 1.6;
}

.legal-list li::before {
    content: "•";
    color: var(--primary-color);
    font-size: 1.5rem;
    position: absolute;
    left: 0.5rem;
    top: 0.25rem;
}

.legal-list li strong {
    color: var(--primary-color);
}


/* ============================================================================
   SIDEBAR SECTION STYLES - MANAGED IN menu.css
   ============================================================================
   All sidebar-section, sidebar-submenu, and related styles have been moved 
   to menu.css for better organization and to prevent style conflicts.
   DO NOT add sidebar section styles here.
   ============================================================================ */

/* Responsive sidebar sections - MANAGED IN menu.css */
