/* Custom properties and variables for premium design */
:root {
    --bg-color: #0b111a;
    --sidebar-bg: #070c14;
    --card-bg: #0e1622;
    --card-border: #182535;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent: #1e80ff;
    --accent-hover: #3590ff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --radius: 8px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    min-height: 100vh;
    overflow-y: auto;
}

/* --- LOGIN SCREEN --- */
#login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: 
        radial-gradient(at 10% 20%, rgba(30, 128, 255, 0.08) 0px, transparent 50%),
        radial-gradient(at 90% 80%, rgba(63, 185, 80, 0.04) 0px, transparent 50%);
    background-attachment: fixed;
    padding: 1.5rem;
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin-top: 0.5rem;
}

.login-logo span {
    color: var(--accent);
}

/* --- MAIN DASHBOARD SCREEN --- */
#dashboard-screen {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 270px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar.collapsed {
    transform: translateX(-270px);
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.active-area-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 4px;
}

.active-area-select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius);
    width: 100%;
    font-size: 0.9rem;
    outline: none;
}

.active-area-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.search-bar {
    position: relative;
    margin-top: 0.5rem;
}

.search-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 8px 12px;
    padding-right: 40px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
}

.search-shortcut {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--card-border);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

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

.menu-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: var(--radius);
    margin-bottom: 4px;
    transition: all 0.2s;
}

.menu-item.active {
    background: rgba(30, 128, 255, 0.1);
    color: var(--text-primary);
    border-left: 3px solid var(--accent);
}

.menu-item:hover:not(.active) {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.menu-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Profile Section at Bottom */
.profile-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: auto;
}

.profile-info {
    margin-bottom: 12px;
}

.profile-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.profile-email {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-logout {
    width: 100%;
    background: rgba(248, 81, 73, 0.1);
    color: var(--danger);
    border: 1px solid rgba(248, 81, 73, 0.2);
    padding: 8px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
}

/* Content Area */
.content-area {
    margin-left: 270px;
    flex-grow: 1;
    padding: 1.5rem;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.content-area.collapsed {
    margin-left: 0;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--card-border);
}

.header-icon {
    background: rgba(30, 128, 255, 0.1);
    color: var(--accent);
    padding: 8px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-title h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-title p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Three-Column Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr) 310px;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

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

@media (max-width: 1366px) {
    .content-area:not(.collapsed) .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Card Style */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: -8px;
    margin-bottom: 12px;
}

/* Deliverables Section */
.deliverable-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.deliverable-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.deliverable-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 70%;
}

.badge-status {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

.status-ontrack { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.status-atrisk { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.status-pending { background: rgba(139, 148, 158, 0.15); color: var(--text-secondary); }

.progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s;
}

.bar-ontrack { background: var(--success); }
.bar-atrisk { background: var(--warning); }
.bar-pending { background: var(--text-secondary); }

/* KPI mini cards */
.kpi-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.kpi-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kpi-left h3 {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 4px;
}

.kpi-left .kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.kpi-right {
    text-align: right;
    font-size: 0.8rem;
}

.trend-up { color: var(--danger); }
.trend-down { color: var(--success); }

/* Alerts and List Items */
.list-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px;
    border-bottom: 1px solid var(--card-border);
    font-size: 0.8rem;
}

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

.item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.icon-blue { color: var(--accent); }
.icon-orange { color: var(--warning); }
.icon-red { color: var(--danger); }

.item-details {
    display: flex;
    flex-direction: column;
}

.item-text {
    font-weight: 600;
    color: var(--text-primary);
}

.item-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Strategic Initiatives section (bottom layout) */
.strategic-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.strategic-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

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

.strategic-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}

.strategic-card h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.strategic-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Forms & buttons */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 8px 12px;
    outline: none;
    font-size: 0.85rem;
}

.form-control:focus {
    border-color: var(--accent);
}

.btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

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

/* --- CLICKABLE CARDS HOVER --- */
.card.clickable, .deliverable-item.clickable, .list-item.clickable, .strategic-card.clickable {
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.card.clickable:hover, .strategic-card.clickable:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 128, 255, 0.1);
}

.deliverable-item.clickable:hover, .list-item.clickable:hover {
    border-color: var(--accent);
    background: rgba(30, 128, 255, 0.05);
}

/* --- MODAL SYSTEM --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--card-border);
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Modal specific elements */
.modal-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.modal-table th, .modal-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--card-border);
    font-size: 0.85rem;
}

.modal-table th {
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.modal-table td {
    color: var(--text-primary);
}

.modal-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    margin-top: 1.25rem;
}

.modal-text {
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Hide scrollbars globally */
* {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
*::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

