/* 
 * ระบบบริหารจัดการงานพัฒนาหลักสูตร โดย ฝ่ายพัฒนาหลักสูตร 1 สศป. บช.ศ. ตร.
 * Stylesheet: Glassmorphism Theme (Default), Light Pastel Theme, Dark Theme
 */

:root {
    --app-font-scale: 1;
    --font-main: 'Sarabun', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Prompt', var(--font-main);
    
    /* Apple Light Frosted Glass (Default) */
    --bg-page: #F6F8FB;
    --bg-gradient: radial-gradient(at 0% 0%, rgba(214, 232, 255, 0.75) 0px, transparent 55%),
                   radial-gradient(at 100% 0%, rgba(238, 228, 255, 0.65) 0px, transparent 50%),
                   radial-gradient(at 50% 100%, rgba(224, 242, 254, 0.6) 0px, transparent 55%),
                   linear-gradient(180deg, #F8FAFD 0%, #EEF4FA 100%);
    --card-bg: rgba(255, 255, 255, 0.78);
    --card-border: rgba(255, 255, 255, 0.85);
    --card-border-glow: rgba(2, 132, 199, 0.45);
    --card-shadow: 0 10px 32px -4px rgba(15, 23, 42, 0.07), 0 4px 12px -2px rgba(15, 23, 42, 0.04), inset 0 1px 1px rgba(255, 255, 255, 0.95);
    --backdrop-blur: blur(28px) saturate(190%);
    
    --text-primary: #0F172A;
    --text-secondary: #334155;
    --text-muted: #64748B;
    --text-accent: #0284C7;
    --text-gold: #B45309;
    
    --input-bg: rgba(255, 255, 255, 0.92);
    --input-border: rgba(203, 213, 225, 0.85);
    --input-text: #0F172A;
    --input-focus-border: #0284C7;
    
    --inner-card-bg: rgba(248, 250, 252, 0.75);
    --inner-card-border: rgba(226, 232, 240, 0.85);
    --inner-card-text: #0F172A;

    --btn-gold: #0071E3;
    --btn-gold-text: #FFFFFF;
    --btn-danger: #DC2626;
    --btn-success: #16A34A;
    --btn-blue: #0284C7;
    
    --chart-track: rgba(15, 23, 42, 0.09);
    --chart-accent: #0284C7;
    --chart-text: #0F172A;
}

/* Glassmorphism Light (Apple Crystal Frosted Glass) */
body.theme-glass, body.theme-light {
    --bg-page: #F6F8FB;
    --bg-gradient: radial-gradient(at 0% 0%, rgba(214, 232, 255, 0.75) 0px, transparent 55%),
                   radial-gradient(at 100% 0%, rgba(238, 228, 255, 0.65) 0px, transparent 50%),
                   radial-gradient(at 50% 100%, rgba(224, 242, 254, 0.6) 0px, transparent 55%),
                   linear-gradient(180deg, #F8FAFD 0%, #EEF4FA 100%);
    --card-bg: rgba(255, 255, 255, 0.78);
    --card-border: rgba(255, 255, 255, 0.85);
    --card-border-glow: rgba(2, 132, 199, 0.45);
    --card-shadow: 0 10px 32px -4px rgba(15, 23, 42, 0.07), 0 4px 12px -2px rgba(15, 23, 42, 0.04), inset 0 1px 1px rgba(255, 255, 255, 0.95);
    --backdrop-blur: blur(28px) saturate(190%);
    
    --text-primary: #0F172A;
    --text-secondary: #334155;
    --text-muted: #64748B;
    --text-accent: #0284C7;
    --text-gold: #B45309;
    
    --input-bg: rgba(255, 255, 255, 0.92);
    --input-border: rgba(203, 213, 225, 0.85);
    --input-text: #0F172A;
    --input-focus-border: #0284C7;
    
    --inner-card-bg: rgba(248, 250, 252, 0.75);
    --inner-card-border: rgba(226, 232, 240, 0.85);
    --inner-card-text: #0F172A;

    --btn-gold: #0071E3;
    --btn-gold-text: #FFFFFF;
    
    --chart-track: rgba(15, 23, 42, 0.09);
    --chart-accent: #0284C7;
    --chart-text: #0F172A;
}

/* Glassmorphism Dark (Apple Obsidian Smoked Glass) */
body.theme-dark {
    --bg-page: #070B14;
    --bg-gradient: radial-gradient(at 0% 0%, rgba(30, 58, 138, 0.38) 0px, transparent 55%),
                   radial-gradient(at 100% 0%, rgba(88, 28, 135, 0.32) 0px, transparent 50%),
                   radial-gradient(at 50% 100%, rgba(15, 23, 42, 0.85) 0px, transparent 60%),
                   linear-gradient(180deg, #070B14 0%, #0F172A 100%);
    --card-bg: rgba(15, 23, 42, 0.74);
    --card-border: rgba(255, 255, 255, 0.12);
    --card-border-glow: rgba(56, 189, 248, 0.45);
    --card-shadow: 0 14px 40px -4px rgba(0, 0, 0, 0.5), 0 4px 16px -2px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.16);
    --backdrop-blur: blur(28px) saturate(200%);
    
    --text-primary: #FFFFFF;
    --text-secondary: #E2E8F0;
    --text-muted: #94A3B8;
    --text-accent: #38BDF8;
    --text-gold: #FBBF24;
    
    --input-bg: rgba(15, 23, 42, 0.65);
    --input-border: rgba(255, 255, 255, 0.16);
    --input-text: #FFFFFF;
    --input-focus-border: #38BDF8;
    
    --inner-card-bg: rgba(24, 34, 53, 0.7);
    --inner-card-border: rgba(255, 255, 255, 0.1);
    --inner-card-text: #F8FAFC;

    --btn-gold: #0284C7;
    --btn-gold-text: #FFFFFF;
    
    --chart-track: rgba(255, 255, 255, 0.14);
    --chart-accent: #38BDF8;
    --chart-text: #FFFFFF;
}

html {
    font-size: calc(16px * var(--app-font-scale, 1));
    scroll-behavior: smooth;
    overflow-x: hidden;
    overflow-y: auto;
    max-width: 100%;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background: var(--bg-gradient);
    background-color: var(--bg-page);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    padding: 24px 16px;
    display: flex;
    justify-content: center;
    transition: background 0.3s ease, color 0.3s ease;
    overflow: visible !important;
    max-width: 100%;
}

.container {
    width: 100%;
    max-width: 1360px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-sizing: border-box;
    overflow-x: clip;
}

/* Prevent any text or title from overflowing screen */
h1, h2, h3, h4, h5, h6,
.brand-title,
.brand-subtitle,
#welcomeProjectTitleText,
#activeProjectTitle,
#welcomeProjectMetaText,
#activeProjectMetaText,
.inner-info-box,
.step-title,
.doughnut-card-title {
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    max-width: 100%;
}

/* Glassmorphism Frosted Cards */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 22px;
    box-shadow: var(--card-shadow);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.glass-card:hover {
    border-color: var(--card-border-glow);
}

/* Header & Banner */
.brand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.brand-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-gold);
    line-height: 1.3;
}

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

/* Circular Avatars */
.avatar-circle {
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid #38BDF8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
    background: #0F2942;
    flex-shrink: 0;
}

.avatar-sm { width: 34px; height: 34px; font-size: 1.1rem; }
.avatar-md { width: 44px; height: 44px; font-size: 1.4rem; }
.avatar-lg { width: 76px; height: 76px; font-size: 2.2rem; }

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* User Status Bar */
.user-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 18px;
    background: #F0F9FF;
    border-radius: 14px;
    border: 1px solid #BAE6FD;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.08);
}

body.theme-dark .user-bar {
    background: rgba(11, 25, 56, 0.6);
    border-color: var(--card-border);
    box-shadow: none;
}

body.theme-light .user-bar {
    background: #E0F2FE;
    border-color: #BAE6FD;
}

.user-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Buttons & Pills */
.btn {
    font-family: var(--font-heading);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-gold {
    background: var(--btn-gold);
    color: var(--btn-gold-text);
}

.btn-gold:hover {
    background: #F59E0B;
}

.btn-danger {
    background: var(--btn-danger);
    color: #FFFFFF;
}

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

.btn-success {
    background: var(--btn-success);
    color: #FFFFFF;
}

.btn-blue {
    background: var(--btn-blue);
    color: #FFFFFF;
}

.btn-glass {
    background: var(--card-bg);
    color: var(--text-accent);
    border: 1px solid var(--card-border);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.btn-glass:hover {
    background: rgba(2, 132, 199, 0.12);
    border-color: var(--card-border-glow);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.78rem;
}

/* Form Inputs */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.form-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-accent);
}

.form-input {
    font-family: var(--font-main);
    width: 100%;
    padding: 10px 14px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: var(--input-text);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    border-color: #38BDF8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

/* Tabs & Filters */
.tab-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/* Horizontal Smooth-Scrolling Scale Tab Strips (Mobile & Tablet Optimized) */
.tab-scroll-strip,
#welcomeGanttScaleTabs,
#ganttScaleTabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    gap: 8px !important;
    padding: 4px 2px 8px 2px !important;
    touch-action: pan-x pan-y !important;
}

.tab-scroll-strip::-webkit-scrollbar,
#welcomeGanttScaleTabs::-webkit-scrollbar,
#ganttScaleTabs::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

#welcomeGanttScaleTabs .tab-btn,
#ganttScaleTabs .tab-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

/* Project Selection Tabs (Wrap Gracefully, Never Fall Off Screen) */
#welcomeProjectTabsContainer,
#projectTabsBar,
#ganttProjectTabsBar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

#welcomeProjectTabsContainer .tab-btn,
#projectTabsBar .tab-btn,
#ganttProjectTabsBar .tab-btn {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    text-align: left !important;
    line-height: 1.4 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.tab-btn {
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #E0F2FE;
    color: #0369A1;
    border: 1px solid #BAE6FD;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: #BAE6FD;
    color: #0C4A6E;
    border-color: #7DD3FC;
}

.tab-btn.active {
    background: #0284C7;
    color: #FFFFFF;
    border-color: #0284C7;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

body.theme-dark .tab-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #CBD5E1;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

body.theme-dark .tab-btn.active {
    background: #FBBF24;
    color: #060C1B;
    border-color: #FBBF24;
}

/* ========================================================================= */
/* Gantt Timeline Visual Chart (เหมือนใน Android App 100%) */
/* ========================================================================= */
.gantt-scroll-container {
    border-radius: 14px;
    border: 1px solid #BAE6FD;
    margin-top: 14px;
    background: #FFFFFF;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.06);
}

body.theme-dark .gantt-scroll-container {
    background: rgba(6, 12, 27, 0.65);
    border-color: var(--card-border);
    box-shadow: none;
}

.gantt-viewport {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    position: relative;
}

/* Left Frozen Column */
.gantt-left-col {
    width: 260px;
    min-width: 260px;
    position: sticky;
    left: 0;
    z-index: 5;
    background: rgba(248, 250, 252, 0.98);
    backdrop-filter: blur(12px);
    border-right: 2px solid #BAE6FD;
    box-shadow: 4px 0 12px rgba(2, 132, 199, 0.06);
}

body.theme-dark .gantt-left-col {
    background: rgba(11, 21, 40, 0.95);
    border-right: 2px solid var(--card-border);
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.25);
}

.gantt-left-header {
    height: 58px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%);
    border-bottom: 2px solid #0284C7;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #FFFFFF;
}

.gantt-left-header span, .gantt-left-header div, .gantt-left-header strong {
    color: #FFFFFF !important;
}

body.theme-dark .gantt-left-header {
    background: rgba(17, 28, 53, 0.95);
    border-bottom: 2px solid var(--card-border);
}

.gantt-left-row {
    height: 64px;
    padding: 8px 14px;
    border-bottom: 1px solid #E0F2FE;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

body.theme-dark .gantt-left-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Right Timeline Canvas/Grid */
.gantt-timeline-area {
    position: relative;
    display: flex;
    flex-direction: column;
}

.gantt-header-row {
    height: 58px;
    display: flex;
    border-bottom: 2px solid #BAE6FD;
    position: sticky;
    top: 0;
    z-index: 3;
}

body.theme-dark .gantt-header-row {
    border-bottom: 2px solid var(--card-border);
}

.gantt-header-cell {
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid #BAE6FD;
    text-align: left;
    background: #E0F2FE;
}

body.theme-dark .gantt-header-cell {
    background: rgba(15, 23, 42, 0.85);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.gantt-header-title {
    font-size: 0.76rem;
    font-weight: 700;
    color: #0369A1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.theme-dark .gantt-header-title {
    color: var(--text-gold);
}

.gantt-header-sub {
    font-size: 0.70rem;
    color: #075985;
    font-weight: 500;
    white-space: nowrap;
}

.gantt-step-row {
    height: 64px;
    position: relative;
    border-bottom: 1px solid #E0F2FE;
    display: flex;
    align-items: center;
    contain: layout paint;
}

body.theme-dark .gantt-step-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Column Grid Stripes Behind Steps */
.gantt-grid-stripes {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    pointer-events: none;
    z-index: 1;
}

.gantt-grid-cell {
    border-right: 1px solid #E0F2FE;
    height: 100%;
    contain: strict;
}

.gantt-grid-cell.even {
    background: rgba(224, 242, 254, 0.35);
}

body.theme-dark .gantt-grid-cell {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

body.theme-dark .gantt-grid-cell.even {
    background: rgba(15, 23, 42, 0.35);
}

/* Timeline Duration Track & Progress Bar (Visual Gantt Bar) */
.gantt-duration-track {
    position: absolute;
    top: 14px;
    height: 36px;
    border-radius: 10px;
    background: #E0F2FE;
    border: 1.5px solid #7DD3FC;
    z-index: 2;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.12);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gantt-duration-track:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

body.theme-dark .gantt-duration-track {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.gantt-progress-fill {
    height: 100%;
    border-radius: 9px;
    transition: width 0.3s ease;
}

.gantt-bar-text {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #0C4A6E;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
    pointer-events: none;
    z-index: 3;
}

body.theme-dark .gantt-bar-text {
    color: #FFFFFF;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.gantt-bar-text.inside-dark {
    color: #FFFFFF !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9) !important;
}

/* Bottom Scroll Slider Indicator */
.gantt-slider-row {
    padding: 10px 16px;
    background: #F0F9FF;
    border-top: 1px solid #BAE6FD;
    display: flex;
    align-items: center;
    gap: 12px;
}

body.theme-dark .gantt-slider-row {
    background: rgba(11, 21, 40, 0.85);
    border-top: 1px solid var(--card-border);
}

.gantt-slider-input {
    flex: 1;
    cursor: pointer;
    accent-color: #0071E3;
}

/* Status Modal Options */
.status-option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid var(--card-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-option-item:hover {
    background: rgba(30, 41, 59, 0.85);
    border-color: var(--text-gold);
    transform: translateX(4px);
}

body.theme-light .status-option-item {
    background: #FFFFFF;
    border-color: #BAE6FD;
}

body.theme-light .status-option-item:hover {
    background: #E0F2FE;
    border-color: #0284C7;
}

/* Inner Info Card / Box (Glasmorphism Light Blue Tone with High Contrast Text) */
.inner-info-box, .inner-info-card {
    background: #F0F9FF;
    border: 1.5px solid #BAE6FD;
    color: #0C4A6E;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.05);
}

body.theme-glass .inner-info-box,
body.theme-glass .inner-info-card,
body.theme-light .inner-info-box,
body.theme-light .inner-info-card,
:root .inner-info-box,
:root .inner-info-card {
    background: #F0F9FF !important;
    border: 1.5px solid #BAE6FD !important;
    color: #0C4A6E !important;
}

body.theme-glass .inner-info-box strong,
body.theme-glass .inner-info-card strong,
body.theme-light .inner-info-box strong,
body.theme-light .inner-info-card strong,
body.theme-glass .inner-info-box strong,
body.theme-light .inner-info-box strong,
body.theme-glass .inner-info-card strong,
body.theme-light .inner-info-card strong {
    color: #0369A1 !important;
}

body.theme-dark .inner-info-box strong,
body.theme-dark .inner-info-card strong {
    color: #38BDF8 !important;
}

body.theme-dark .inner-info-box,
body.theme-dark .inner-info-card {
    background: rgba(14, 31, 61, 0.6) !important;
    border: 1px solid var(--card-border) !important;
    color: var(--text-primary) !important;
}

/* Doughnut Analytics Card - High Contrast Frosted in Light & Deep Obsidian Navy in Dark */
#welcomeDoughnutCard,
#progressDoughnutCard {
    border-radius: 18px !important;
    padding: 18px !important;
    transition: all 0.25s ease !important;
}

body.theme-glass #welcomeDoughnutCard,
body.theme-light #welcomeDoughnutCard,
body.theme-glass #progressDoughnutCard,
body.theme-light #progressDoughnutCard {
    background: rgba(255, 255, 255, 0.88) !important;
    border: 1.5px solid #BAE6FD !important;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.08) !important;
    color: #0F172A !important;
}

body.theme-glass #welcomeDoughnutCard strong,
body.theme-light #welcomeDoughnutCard strong,
body.theme-glass #progressDoughnutCard strong,
body.theme-light #progressDoughnutCard strong {
    color: #0C4A6E !important;
}

body.theme-dark #welcomeDoughnutCard,
body.theme-dark #progressDoughnutCard {
    background: #0B192C !important;
    border: 1.5px solid #1E3A8A !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(2, 6, 23, 0.4) !important;
}

body.theme-dark #welcomeDoughnutCard strong,
body.theme-dark #progressDoughnutCard strong {
    color: #FFFFFF !important;
}

/* Glassmorphism Light theme: High contrast dark text on light backgrounds */
body.theme-glass #activeProjectMetaCard,
body.theme-light #activeProjectMetaCard {
    background: #F0F9FF !important;
    border: 1.5px solid #BAE6FD !important;
    color: #0C4A6E !important;
}

body.theme-glass #activeProjectTitle,
body.theme-light #activeProjectTitle {
    color: #0369A1 !important;
}

body.theme-glass #activeProjectMetaText,
body.theme-light #activeProjectMetaText {
    color: #1E293B !important;
}

body.theme-glass #projectPermissionNoticeText,
body.theme-light #projectPermissionNoticeText {
    background: #E0F2FE !important;
    border: 1.5px solid #BAE6FD !important;
    border-left: 4px solid #0284C7 !important;
    color: #0369A1 !important;
    font-weight: 600 !important;
}

body.theme-glass #pdfReportQuickSummaryText,
body.theme-light #pdfReportQuickSummaryText {
    background: #E0F2FE !important;
    border: 1.5px solid #BAE6FD !important;
    color: #0369A1 !important;
}

body.theme-glass #projectComputedDaysBanner,
body.theme-glass #newStepDurationInfoBanner,
body.theme-glass #updateStepDurationInfoBanner,
body.theme-glass #pdfScopeCurrentBadge,
body.theme-light #projectComputedDaysBanner,
body.theme-light #newStepDurationInfoBanner,
body.theme-light #updateStepDurationInfoBanner,
body.theme-light #pdfScopeCurrentBadge {
    background: #E0F2FE !important;
    border: 1.5px solid #BAE6FD !important;
    border-left: 4px solid #0284C7 !important;
    color: #0369A1 !important;
    font-weight: 600 !important;
}

body.theme-glass .step-card,
body.theme-light .step-card {
    background: #FFFFFF !important;
    border: 1.5px solid #BAE6FD !important;
    border-left: 5px solid #0284C7 !important;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.06) !important;
}

body.theme-glass .step-card .step-title,
body.theme-light .step-card .step-title {
    color: #0C4A6E !important;
}

body.theme-glass .modal-box,
body.theme-light .modal-box {
    background: rgba(255, 255, 255, 0.96) !important;
    border: 1.5px solid #BAE6FD !important;
    box-shadow: 0 20px 60px rgba(2, 132, 199, 0.15) !important;
    color: #0F172A !important;
}

body.theme-glass .modal-box label,
body.theme-light .modal-box label {
    color: #1E293B !important;
}

body.theme-glass .modal-box input,
body.theme-glass .modal-box select,
body.theme-glass .modal-box textarea,
body.theme-light .modal-box input,
body.theme-light .modal-box select,
body.theme-light .modal-box textarea {
    background: #FFFFFF !important;
    border: 1.5px solid #BAE6FD !important;
    color: #0F172A !important;
}

/* Glassmorphism Dark theme: High contrast bright text on dark obsidian backgrounds */
body.theme-dark #activeProjectMetaCard {
    background: rgba(14, 31, 61, 0.7) !important;
    border: 1.5px solid var(--card-border) !important;
    color: #F8FAFC !important;
}

body.theme-dark #activeProjectTitle {
    color: #FBBF24 !important;
}

body.theme-dark #activeProjectMetaText {
    color: #E2E8F0 !important;
}

body.theme-dark #activeProjectMetaText strong {
    color: #38BDF8 !important;
}

body.theme-dark #projectPermissionNoticeText {
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1.5px solid rgba(56, 189, 248, 0.35) !important;
    border-left: 4px solid #38BDF8 !important;
    color: #E0F2FE !important;
}

body.theme-dark #pdfReportQuickSummaryText,
body.theme-dark #projectComputedDaysBanner,
body.theme-dark #newStepDurationInfoBanner,
body.theme-dark #updateStepDurationInfoBanner,
body.theme-dark #pdfScopeCurrentBadge {
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1.5px solid rgba(56, 189, 248, 0.35) !important;
    border-left: 4px solid #38BDF8 !important;
    color: #38BDF8 !important;
}

body.theme-dark .step-card {
    background: rgba(17, 34, 64, 0.7) !important;
    border: 1.5px solid var(--card-border) !important;
    border-left: 5px solid #38BDF8 !important;
    box-shadow: none !important;
}

body.theme-dark .step-card .step-title {
    color: #FFFFFF !important;
}

body.theme-dark .modal-box {
    background: rgba(11, 21, 40, 0.96) !important;
    border: 1.5px solid rgba(56, 189, 248, 0.35) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8) !important;
    color: #F8FAFC !important;
}

body.theme-dark .modal-box label {
    color: #38BDF8 !important;
}

body.theme-dark .modal-box input,
body.theme-dark .modal-box select,
body.theme-dark .modal-box textarea {
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
    color: #FFFFFF !important;
}

body.theme-dark #nearDeadlineBannerTitle {
    color: #FBBF24 !important;
}

body.theme-glass #nearDeadlineBannerTitle,
body.theme-light #nearDeadlineBannerTitle {
    color: #B45309 !important;
}

/* Universal high-contrast rules for elements with explicit light/white backgrounds in Dark Mode */
body.theme-dark [style*="background: #FFFFFF"],
body.theme-dark [style*="background: #ffffff"],
body.theme-dark [style*="background: #FFF"],
body.theme-dark [style*="background: #fff"],
body.theme-dark [style*="background: white"],
body.theme-dark [style*="background: #F0F9FF"],
body.theme-dark [style*="background: #E0F2FE"],
body.theme-dark [style*="background: #FEF3C7"],
body.theme-dark [style*="background: #DCFCE7"],
body.theme-dark [style*="background: #FEE2E2"],
body.theme-dark [style*="background: #DBEAFE"],
body.theme-dark [style*="background: #EDE9FE"],
body.theme-dark [style*="background: #D1FAE5"],
body.theme-dark [style*="background: #FFEDD5"] {
    color: #0F172A !important;
}

body.theme-dark [style*="background: #FFFFFF"] strong,
body.theme-dark [style*="background: #ffffff"] strong,
body.theme-dark [style*="background: #FFF"] strong,
body.theme-dark [style*="background: #fff"] strong,
body.theme-dark [style*="background: white"] strong,
body.theme-dark [style*="background: #F0F9FF"] strong,
body.theme-dark [style*="background: #E0F2FE"] strong {
    color: #0F172A !important;
}

/* Ensure native select options on all platforms are consistently crisp white with black text */
select option {
    background: #FFFFFF !important;
    color: #0F172A !important;
}

.btn-cyan {
    background: linear-gradient(135deg, #06B6D4, #0891B2);
    color: #FFFFFF;
    border: none;
}
.btn-cyan:hover {
    background: linear-gradient(135deg, #0891B2, #0e7490);
}

/* Step Cards */
.step-card {
    background: #FFFFFF;
    border: 1.5px solid #BAE6FD;
    border-left: 5px solid #0071E3;
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.05);
}

body.theme-dark .step-card {
    background: rgba(17, 34, 64, 0.65);
    border: 1px solid var(--card-border);
    border-left: 5px solid #38BDF8;
    box-shadow: none;
}

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

.step-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
}

.progress-track {
    width: 100%;
    height: 8px;
    background: #E0F2FE;
    border-radius: 999px;
    overflow: hidden;
    margin: 4px 0;
}

body.theme-dark .progress-track {
    background: rgba(255, 255, 255, 0.12);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0284C7, #38BDF8);
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* Modal Dialog */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

body.theme-dark .modal-overlay {
    background: rgba(0, 0, 0, 0.7);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 20px;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
    backdrop-filter: var(--backdrop-blur);
    color: #1D1D1F;
}

body.theme-dark .modal-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border-glow);
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    color: var(--text-primary);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #E2E8F0;
}

body.theme-dark .modal-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-gold);
}

/* Preset Avatar Grid */
.avatar-presets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 14px 0;
}

.avatar-preset-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.78rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.avatar-preset-btn:hover, .avatar-preset-btn.selected {
    border-color: #38BDF8;
    background: rgba(56, 189, 248, 0.15);
    color: #FFFFFF;
}

/* Two-Column Auth Layout (Left: Welcome & Logo | Right: Login & Register) */
.auth-columns-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 20px;
    align-items: stretch;
}

@media (max-width: 900px) {
    .auth-columns-grid {
        grid-template-columns: 1fr;
    }
}

.auth-welcome-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 34px 28px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.90) 0%, rgba(240, 246, 255, 0.85) 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.05);
}

.auth-welcome-card::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(0, 113, 227, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.auth-welcome-logo {
    width: 130px;
    height: 130px;
    margin-bottom: 14px;
    filter: drop-shadow(0 6px 20px rgba(0,0,0,0.12));
    transition: transform 0.3s ease;
}

.auth-welcome-logo:hover {
    transform: scale(1.04);
}

.auth-welcome-title {
    font-family: var(--font-heading);
    color: var(--text-gold);
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.3;
}

.auth-welcome-sub {
    font-size: 0.98rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 14px;
}

.auth-gold-divider {
    width: 150px;
    height: 2.5px;
    background: linear-gradient(90deg, transparent, #9A6700, transparent);
    margin: 0 auto 16px auto;
}

.auth-welcome-banner {
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px solid rgba(154, 103, 0, 0.45);
    border-radius: 16px;
    padding: 14px 20px;
    width: 100%;
    margin-bottom: 18px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-welcome-text {
    color: #0B1938 !important;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.55;
    transition: color 0.3s ease;
}

body.theme-dark .auth-welcome-banner {
    background: rgba(11, 25, 56, 0.85) !important;
    border: 1.5px solid rgba(251, 191, 36, 0.45) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
}

body.theme-dark .auth-welcome-text {
    color: #FEF08A !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.auth-features-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    text-align: left;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #F0F9FF;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid #BAE6FD;
}

.auth-feature-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.auth-feature-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: #0284C7;
}

.auth-feature-desc {
    font-size: 0.78rem;
    color: #0F172A;
}

.auth-form-card {
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: rgba(255, 255, 255, 0.88);
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.05);
}

/* Font Zoom Controller Pill (Apple Pill Minimal Style) */
.font-zoom-pill {
    display: inline-flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border-radius: 999px;
    padding: 3px 6px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    user-select: none;
    transition: all 0.25s ease;
}

.font-zoom-pill:hover {
    border-color: var(--card-border-glow);
}

.font-zoom-pill .font-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.font-zoom-pill .font-btn:hover {
    background: rgba(2, 132, 199, 0.15);
    color: var(--text-accent);
}

.font-zoom-pill .font-btn:active {
    transform: scale(0.92);
}

.font-zoom-pill .font-percent {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 3px 8px;
    cursor: pointer;
    border-left: 1px solid var(--card-border);
    border-right: 1px solid var(--card-border);
    min-width: 48px;
    text-align: center;
    transition: all 0.18s ease;
}

.font-zoom-pill .font-percent:hover {
    color: var(--text-accent);
    background: rgba(2, 132, 199, 0.08);
    border-radius: 4px;
}

/* Doughnut & Analytics Visual Cards */
.doughnut-analytics-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    box-shadow: var(--card-shadow) !important;
    border-radius: 18px !important;
    backdrop-filter: var(--backdrop-blur) !important;
    -webkit-backdrop-filter: var(--backdrop-blur) !important;
    transition: all 0.25s ease;
}

.doughnut-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.doughnut-center-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    pointer-events: none;
    text-align: center;
    width: 100px;
    opacity: 0; /* Direct canvas rendering ensures 100% crisp, zero-glitch text */
}

.doughnut-card-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-gold);
}

body.theme-glass .doughnut-card-title,
body.theme-light .doughnut-card-title {
    color: #B45309;
}

body.theme-dark .doughnut-card-title {
    color: #FDE047;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Hidden Login & Register Top Drawer */
.auth-drawer {
    display: none;
    margin-bottom: 18px;
    animation: slideDownGlass 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.auth-drawer.open {
    display: grid !important;
}

@keyframes slideDownGlass {
    0% {
        opacity: 0;
        transform: translateY(-14px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Doughnut Center Contrast Text & Subtitle */
.doughnut-center-number {
    transition: color 0.25s ease, transform 0.2s ease;
}

body.theme-glass .doughnut-center-number,
body.theme-light .doughnut-center-number,
:root .doughnut-center-number {
    color: #0F172A !important;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
}

body.theme-dark .doughnut-center-number {
    color: #FFFFFF !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 0 14px rgba(56, 189, 248, 0.5);
}

.doughnut-center-sub {
    transition: color 0.25s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.theme-glass .doughnut-center-sub,
body.theme-light .doughnut-center-sub,
:root .doughnut-center-sub {
    color: #475569 !important;
}

body.theme-dark .doughnut-center-sub {
    color: #94A3B8 !important;
}

body.theme-dark .auth-welcome-card {
    background: rgba(15, 23, 42, 0.74) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}
body.theme-dark .auth-feature-item {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}
body.theme-dark .auth-feature-title {
    color: #38BDF8 !important;
}
body.theme-dark .auth-feature-desc {
    color: #E2E8F0 !important;
}
body.theme-glass .auth-feature-title,
body.theme-light .auth-feature-title {
    color: #0284C7 !important;
}
body.theme-glass .auth-feature-desc,
body.theme-light .auth-feature-desc {
    color: #1E293B !important;
}
body.theme-dark .auth-form-card {
    background: rgba(15, 23, 42, 0.74);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Responsive Styles for Desktop, Tablet, and Mobile (High-Performance GPU-Tuned) */
@media (max-width: 1024px) {
    :root, body.theme-glass, body.theme-light {
        --backdrop-blur: blur(8px) saturate(150%);
        --card-bg: rgba(255, 255, 255, 0.90);
    }
    body.theme-dark {
        --backdrop-blur: blur(8px) saturate(150%);
        --card-bg: rgba(15, 23, 42, 0.92);
    }
    body {
        background-attachment: scroll !important;
        transition: none !important;
        overflow: visible !important;
        overscroll-behavior-y: auto !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    * {
        -webkit-tap-highlight-color: transparent !important;
    }
    html {
        -webkit-overflow-scrolling: touch;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior-y: auto !important;
    }
    .glass-card,
    .doughnut-analytics-card,
    .gantt-scroll-container,
    .doughnut-wrapper,
    canvas {
        -webkit-backface-visibility: hidden !important;
        backface-visibility: hidden !important;
        transform: translate3d(0, 0, 0) !important;
    }
    .glass-card {
        box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    }
    .gantt-scroll-container,
    .gantt-viewport,
    #projectTabsBar,
    #ganttProjectTabsBar,
    #welcomeProjectTabsContainer {
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-x: contain !important;
        touch-action: pan-x pan-y !important;
    }
}

@media (max-width: 960px) {
    body {
        padding: 12px 8px;
    }
    .brand-header {
        flex-direction: column;
        align-items: stretch !important;
        gap: 12px !important;
    }
    .header-controls {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        width: 100%;
    }
    .brand-left {
        justify-content: flex-start;
    }
    .brand-title {
        font-size: 1.1rem !important;
    }
    .brand-subtitle {
        font-size: 0.78rem !important;
    }
    .glass-card {
        padding: 16px 14px;
        border-radius: 16px;
    }
    .gantt-left-col {
        width: 200px;
        min-width: 200px;
    }
}

@media (max-width: 640px) {
    :root, body.theme-glass, body.theme-light, body.theme-dark {
        --backdrop-blur: none !important;
    }
    .glass-card {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    body.theme-glass, body.theme-light {
        --card-bg: #FFFFFF;
    }
    body.theme-dark {
        --card-bg: #0F172A;
    }
    body {
        padding: 8px 6px;
    }
    .brand-logo {
        width: 44px;
        height: 44px;
    }
    .brand-title {
        font-size: 0.95rem !important;
    }
    .brand-subtitle {
        font-size: 0.72rem !important;
    }
    .header-controls {
        justify-content: center;
        gap: 6px;
    }
    .font-zoom-pill {
        padding: 2px 4px;
    }
    .font-zoom-pill .font-btn {
        padding: 3px 8px;
        font-size: 0.78rem;
    }
    .font-zoom-pill .font-percent {
        min-width: 40px;
        font-size: 0.74rem;
        padding: 2px 4px;
    }
    #themeToggleBtn {
        font-size: 0.8rem !important;
        padding: 6px 10px !important;
    }
    .gantt-left-col {
        width: 150px;
        min-width: 150px;
    }
    .doughnut-analytics-card {
        padding: 14px 10px !important;
    }
    .doughnut-flex-row {
        flex-direction: column !important;
        align-items: center !important;
        gap: 14px !important;
    }
    .doughnut-wrapper {
        margin: 0 auto !important;
    }
    #welcomeStatusPillsContainer,
    #statusPillsContainer {
        min-width: 100% !important;
        width: 100% !important;
    }
    .mobile-project-dropdown-wrap {
        display: block !important;
    }
    #welcomeProjectTabsContainer,
    #projectTabsBar,
    #ganttProjectTabsBar {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
    }
    #welcomeProjectTabsContainer .tab-btn,
    #projectTabsBar .tab-btn,
    #ganttProjectTabsBar .tab-btn {
        width: 100% !important;
        display: block !important;
        padding: 10px 14px !important;
        border-radius: 12px !important;
        font-size: 0.88rem !important;
        white-space: normal !important;
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    }
    .inner-info-box {
        padding: 12px 14px !important;
    }
}

/* ========================================================================= */
/* Backup & Disaster Recovery Center Styles */
/* ========================================================================= */
.backup-policy-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.84rem;
    margin: 10px 0 16px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.35);
}

.backup-policy-table th {
    background: #0B1938;
    color: #FEF08A;
    padding: 10px 14px;
    font-weight: 700;
    text-align: left;
    font-family: var(--font-heading);
    border-bottom: 2px solid #D4AF37;
}

.backup-policy-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(203, 213, 225, 0.3);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.8);
}

body.theme-dark .backup-policy-table td {
    background: rgba(15, 23, 42, 0.85);
    border-bottom: 1px solid rgba(51, 65, 85, 0.4);
    color: #F8FAFC;
}

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

.backup-tier-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
}

.backup-tier-daily { background: #E0F2FE; color: #0284C7; border: 1px solid #BAE6FD; }
.backup-tier-weekly { background: #EDE9FE; color: #6D28D9; border: 1px solid #DDD6FE; }
.backup-tier-monthly { background: #FEF3C7; color: #B45309; border: 1px solid #FDE68A; }
.backup-tier-yearly { background: #DCFCE7; color: #15803D; border: 1px solid #BBF7D0; }

body.theme-dark .backup-tier-daily { background: rgba(2, 132, 199, 0.25); color: #38BDF8; border: 1px solid #0284C7; }
body.theme-dark .backup-tier-weekly { background: rgba(109, 40, 217, 0.25); color: #C084FC; border: 1px solid #7C3AED; }
body.theme-dark .backup-tier-monthly { background: rgba(245, 158, 11, 0.25); color: #FBBF24; border: 1px solid #D97706; }
body.theme-dark .backup-tier-yearly { background: rgba(16, 185, 129, 0.25); color: #34D399; border: 1px solid #059669; }

.backup-preview-card {
    background: rgba(248, 250, 252, 0.85);
    border: 1.5px solid #BAE6FD;
    border-radius: 12px;
    padding: 14px;
    font-size: 0.84rem;
    line-height: 1.6;
}

body.theme-dark .backup-preview-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1.5px solid rgba(56, 189, 248, 0.35);
    color: #F8FAFC;
}

/* Print PDF Styles */
@media print {
    body {
        background: #FFFFFF !important;
        color: #000000 !important;
        padding: 0;
    }
    .no-print, .btn, .modal-overlay, .tab-row {
        display: none !important;
    }
    .glass-card, .step-card {
        background: #FFFFFF !important;
        border: 1px solid #CCCCCC !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        page-break-inside: avoid;
    }
    .gantt-scroll-container {
        overflow: visible !important;
    }
}
