/* TVR PMO — Luxury Light Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #FAFAF7;
    --bg-secondary: #F2F0EB;
    --bg-card: #FFFFFF;
    --navy: #1B2A4A;
    --navy-light: #2C3E5A;
    --gold: #C5A572;
    --gold-light: #D4BC94;
    --gold-dark: #A68B5B;
    --text-primary: #2C2C2C;
    --text-secondary: #6B6B6B;
    --text-light: #999999;
    --border: #E5E2DC;
    --border-light: #F0EDE8;
    --success: #7BAE7F;
    --success-bg: #F0F8F0;
    --warning: #D4A843;
    --warning-bg: #FDF8ED;
    --danger: #C76B6B;
    --danger-bg: #FDF0F0;
    --info: #5B8DB8;
    --info-bg: #EDF4FA;
    --not-started-bg: #F5F5F5;
    --shadow-sm: 0 1px 3px rgba(27, 42, 74, 0.06);
    --shadow-md: 0 4px 12px rgba(27, 42, 74, 0.08);
    --shadow-lg: 0 8px 30px rgba(27, 42, 74, 0.12);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.2s ease;
}

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

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Header Strip */
.header {
    background: var(--navy);
    padding: 12px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header-logo {
    height: 28px;
    opacity: 0.95;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-nav a, .header-nav button {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border: none;
    background: none;
    cursor: pointer;
}

.header-nav a:hover, .header-nav button:hover,
.header-nav a.active, .header-nav button.active {
    color: #fff;
    background: rgba(255,255,255,0.12);
}

.header-user {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid rgba(255,255,255,0.15);
}

.header-user span {
    color: var(--gold-light);
    font-weight: 500;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.status-completed {
    background: var(--success-bg);
    color: #4A7D4E;
}

.status-on-track {
    background: var(--info-bg);
    color: #3A6E8F;
}

.status-delayed {
    background: var(--danger-bg);
    color: #A04545;
}

.status-not-started {
    background: var(--not-started-bg);
    color: #888;
}

.status-in-progress {
    background: var(--warning-bg);
    color: #8B7332;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.card-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.1;
}

.card-subtitle {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--navy);
    color: #fff;
}

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

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

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

.btn-outline {
    background: transparent;
    color: var(--navy);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--navy);
    background: rgba(27, 42, 74, 0.04);
}

/* Form inputs */
.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: var(--transition);
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(197, 165, 114, 0.15);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.progress-fill.success { background: var(--success); }
.progress-fill.warning { background: var(--warning); }
.progress-fill.danger { background: var(--danger); }
.progress-fill.info { background: var(--info); }
.progress-fill.navy { background: var(--navy); }
.progress-fill.gold { background: var(--gold); }

/* Tables */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.85rem;
}

.data-table thead th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
}

.data-table tbody tr:hover {
    background: rgba(197, 165, 114, 0.04);
}

.data-table .group-header {
    background: var(--navy);
    color: #fff;
}

.data-table .group-header td {
    padding: 12px 20px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    border-bottom: none;
    border-left: 4px solid var(--gold);
    white-space: normal;
    word-break: normal;
    overflow: visible;
}

.data-table .group-header .milestone-target {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.7;
    margin-left: 12px;
}

.data-table .subgroup-header {
    background: rgba(197, 165, 114, 0.08);
}

.data-table .subgroup-header td {
    padding: 10px 16px 10px 36px;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--navy);
    border-bottom: 1px solid var(--border-light);
    border-left: 3px solid var(--gold-light);
    white-space: normal;
    word-break: normal;
    overflow: visible;
}

/* Inline status select */
.status-select {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 3px 24px 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    transition: var(--transition);
}

.status-select:hover {
    border-color: var(--border);
}

.status-select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(197, 165, 114, 0.15);
}

.status-select.completed { background-color: var(--success-bg); color: #4A7D4E; }
.status-select.on-track { background-color: var(--info-bg); color: #3A6E8F; }
.status-select.delayed { background-color: var(--danger-bg); color: #A04545; }
.status-select.not-started { background-color: var(--not-started-bg); color: #888; }
.status-select.in-progress { background-color: var(--warning-bg); color: #8B7332; }

/* Filters bar */
.filters-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.filter-chip {
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    background: transparent;
    color: var(--text-secondary);
}

.filter-chip:hover {
    border-color: var(--gold);
    color: var(--gold-dark);
}

.filter-chip.active {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

.search-input {
    padding: 6px 12px 6px 32px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8rem;
    width: 220px;
    background: var(--bg-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23999'%3E%3Cpath d='M8 3a5 5 0 104.38 7.5h.01L16 14.1 14.6 15.5l-3.6-3.62A5 5 0 008 3zm0 1.5a3.5 3.5 0 110 7 3.5 3.5 0 010-7z'/%3E%3C/svg%3E") no-repeat 10px center;
    background-size: 14px;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(197, 165, 114, 0.15);
    width: 280px;
}

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }

@media (max-width: 1200px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-7 { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4, .grid-7 {
        grid-template-columns: 1fr;
    }
    .filters-bar { padding: 10px; }
    .search-input, .search-input:focus { width: 100%; }
}

/* Gold accent line */
.gold-line {
    width: 40px;
    height: 2px;
    background: var(--gold);
    margin-bottom: 12px;
}

/* Section title */
.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 16px;
}

/* Area color indicators */
.area-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.area-dot.construction { background: #E67E22; }
.area-dot.engineering { background: #3498DB; }
.area-dot.finance { background: #27AE60; }
.area-dot.it { background: #9B59B6; }
.area-dot.marketing { background: #E91E63; }
.area-dot.operations { background: #F39C12; }
.area-dot.security { background: #34495E; }

/* Progress ring (for report) */
.progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
}

.progress-ring svg {
    transform: rotate(-90deg);
}

.progress-ring .ring-bg {
    fill: none;
    stroke: var(--bg-secondary);
    stroke-width: 8;
}

.progress-ring .ring-fill {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.progress-ring .ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--navy);
}

/* Utility */
.text-gold { color: var(--gold); }
.text-navy { color: var(--navy); }
.text-muted { color: var(--text-secondary); }
.text-small { font-size: 0.75rem; }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-top: 16px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.hidden { display: none !important; }

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}
