/**
 * Badarshah Institute of Science & Technology
 * Office of the Chairman - Executive Management Portal Stylesheet
 * Ultra-Premium Executive Theme: Deep Emerald, Obsidian & Champagne Gold
 */

:root {
    --exec-primary: #064e3b;
    --exec-primary-dark: #022c22;
    --exec-primary-light: #059669;
    --exec-accent-gold: #d97706;
    --exec-accent-gold-light: #fef3c7;
    --exec-gold-bright: #fbbf24;
    --exec-slate-bg: #f8fafc;
    --exec-card-bg: #ffffff;
    --exec-text-main: #0f172a;
    --exec-text-muted: #64748b;
    --exec-border: #e2e8f0;
    --exec-border-focus: #059669;
    --exec-success: #10b981;
    --exec-warning: #f59e0b;
    --exec-danger: #ef4444;
    --exec-info: #0284c7;
    --exec-radius-sm: 8px;
    --exec-radius-md: 14px;
    --exec-radius-lg: 20px;
    --exec-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --exec-shadow-md: 0 4px 14px -2px rgba(6, 78, 59, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
    --exec-shadow-lg: 0 12px 30px -4px rgba(6, 78, 59, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.05);
    --exec-shadow-gold: 0 8px 25px -4px rgba(217, 119, 6, 0.25);
}

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

body.chairman-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--exec-slate-bg);
    color: var(--exec-text-main);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Layout Architecture */
.chairman-app {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar Navigation */
.chairman-sidebar {
    width: 290px;
    background: linear-gradient(180deg, #022c22 0%, #064e3b 55%, #033226 100%);
    color: #ffffff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
    transition: transform 0.3s ease;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.chairman-brand {
    padding: 1.75rem 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 14px;
}

.chairman-brand-crest {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffd043 0%, #f59e0b 100%);
    color: #022c22;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    flex-shrink: 0;
}

.chairman-brand-info h2 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin: 0;
}

.chairman-brand-info span {
    font-size: 0.74rem;
    color: #a7f3d0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
    margin-top: 3px;
}

/* Chairman Officer Profile Widget */
.chairman-profile-widget {
    margin: 1.25rem 1.25rem 0.5rem;
    padding: 1rem 1.15rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--exec-radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
}

.chairman-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #fbbf24;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.chairman-profile-widget .name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.chairman-profile-widget .title {
    font-size: 0.72rem;
    color: #fde68a;
    font-weight: 600;
    margin-top: 2px;
}

/* Sidebar Menu */
.chairman-nav {
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex-grow: 1;
}

.chairman-nav-heading {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 700;
    padding: 0.5rem 0.75rem 0.3rem;
    margin-top: 0.5rem;
}

.chairman-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 0.9rem;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--exec-radius-sm);
    transition: all 0.2s ease;
    position: relative;
}

.chairman-nav-item i {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
    color: #6ee7b7;
    transition: color 0.2s ease;
}

.chairman-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateX(3px);
}

.chairman-nav-item:hover i {
    color: #ffd043;
}

.chairman-nav-item.active {
    background: linear-gradient(135deg, rgba(255, 208, 67, 0.22) 0%, rgba(245, 158, 11, 0.15) 100%);
    color: #ffffff;
    border: 1px solid rgba(251, 191, 36, 0.35);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chairman-nav-item.active i {
    color: #ffd043;
}

.chairman-nav-badge {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 99px;
    font-weight: 700;
    line-height: 1;
}

.chairman-nav-badge.gold {
    background: #d97706;
    color: #ffffff;
}

.chairman-nav-badge.danger {
    background: #ef4444;
    color: #ffffff;
}

.chairman-sidebar-footer {
    padding: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.chairman-btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.65rem;
    border-radius: var(--exec-radius-sm);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.chairman-btn-site {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.chairman-btn-site:hover {
    background: rgba(255, 255, 255, 0.18);
}

.chairman-btn-logout {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.chairman-btn-logout:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #ffffff;
}

/* Main Workspace */
.chairman-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--exec-slate-bg);
}

/* Top Executive Header Strip */
.chairman-header {
    background: #ffffff;
    border-bottom: 1px solid var(--exec-border);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: var(--exec-shadow-sm);
}

.chairman-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-toggle-btn {
    display: none;
    background: none;
    border: 1px solid var(--exec-border);
    padding: 8px 12px;
    border-radius: var(--exec-radius-sm);
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--exec-text-main);
}

.chairman-header-title h1 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--exec-primary-dark);
    line-height: 1.2;
}

.chairman-header-title p {
    font-size: 0.78rem;
    color: var(--exec-text-muted);
    margin: 2px 0 0;
}

.chairman-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.executive-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #065f46;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 700;
}

.executive-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Page Content */
.chairman-content {
    padding: 2rem;
    flex-grow: 1;
}

/* Flash Messages */
.chairman-alert {
    padding: 1rem 1.25rem;
    border-radius: var(--exec-radius-sm);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

.chairman-alert.success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.chairman-alert.warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

/* Overview Banner */
.chairman-hero-banner {
    background: linear-gradient(135deg, #022c22 0%, #064e3b 60%, #047857 100%);
    border-radius: var(--exec-radius-lg);
    padding: 2rem 2.25rem;
    color: #ffffff;
    margin-bottom: 2rem;
    box-shadow: var(--exec-shadow-lg);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chairman-hero-banner::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.chairman-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.chairman-hero-title h2 {
    font-size: 1.85rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.chairman-hero-title p {
    color: #a7f3d0;
    font-size: 0.96rem;
    max-width: 650px;
    line-height: 1.6;
    margin: 0;
}

.chairman-hero-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.4);
    padding: 8px 16px;
    border-radius: 99px;
    color: #fde68a;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.chairman-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-exec-gold {
    background: linear-gradient(135deg, #ffd043 0%, #f59e0b 100%);
    color: #022c22;
    padding: 0.75rem 1.4rem;
    border-radius: var(--exec-radius-sm);
    font-weight: 800;
    font-size: 0.88rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--exec-shadow-gold);
    transition: all 0.2s ease;
}

.btn-exec-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4);
    color: #022c22;
}

.btn-exec-outline {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 1.3rem;
    border-radius: var(--exec-radius-sm);
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-exec-outline:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

/* KPI Stat Cards Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: #ffffff;
    border-radius: var(--exec-radius-md);
    padding: 1.4rem 1.5rem;
    box-shadow: var(--exec-shadow-md);
    border: 1px solid var(--exec-border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--exec-shadow-lg);
    border-color: #cbd5e1;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--exec-primary);
}

.kpi-card.gold::before { background: var(--exec-accent-gold); }
.kpi-card.success::before { background: var(--exec-success); }
.kpi-card.danger::before { background: var(--exec-danger); }
.kpi-card.info::before { background: var(--exec-info); }

.kpi-info h3 {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--exec-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.kpi-info .kpi-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--exec-primary-dark);
    line-height: 1.1;
    margin-bottom: 0.35rem;
}

.kpi-info .kpi-sub {
    font-size: 0.78rem;
    color: var(--exec-text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.kpi-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.kpi-icon-box.emerald {
    background: rgba(6, 78, 59, 0.1);
    color: #065f46;
}

.kpi-icon-box.gold {
    background: rgba(217, 119, 6, 0.12);
    color: #d97706;
}

.kpi-icon-box.blue {
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
}

.kpi-icon-box.red {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Content Panel Cards */
.exec-panel {
    background: #ffffff;
    border-radius: var(--exec-radius-md);
    box-shadow: var(--exec-shadow-md);
    border: 1px solid var(--exec-border);
    margin-bottom: 2rem;
    overflow: hidden;
}

.exec-panel-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--exec-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    background: #ffffff;
}

.exec-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.exec-panel-title h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--exec-primary-dark);
    margin: 0;
}

.exec-panel-title span {
    font-size: 0.78rem;
    color: var(--exec-text-muted);
    font-weight: 500;
}

.exec-panel-body {
    padding: 1.5rem;
}

/* Filter Controls Toolbar */
.filter-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    background: #f8fafc;
    padding: 1rem;
    border-radius: var(--exec-radius-sm);
    border: 1px solid var(--exec-border);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--exec-text-muted);
}

.filter-select, .filter-input {
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--exec-border);
    border-radius: var(--exec-radius-sm);
    font-size: 0.85rem;
    background: #ffffff;
    color: var(--exec-text-main);
    outline: none;
    transition: border-color 0.2s;
}

.filter-select:focus, .filter-input:focus {
    border-color: var(--exec-border-focus);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.filter-search {
    flex-grow: 1;
    min-width: 220px;
}

/* Data Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.exec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.exec-table th {
    background: #f8fafc;
    color: var(--exec-text-muted);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.85rem 1rem;
    border-bottom: 2px solid var(--exec-border);
    white-space: nowrap;
}

.exec-table td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid var(--exec-border);
    vertical-align: middle;
    color: var(--exec-text-main);
}

.exec-table tbody tr:hover {
    background-color: #f1f5f9;
}

/* Badge Pills */
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.badge-diploma {
    background: rgba(6, 78, 59, 0.1);
    color: #065f46;
    border: 1px solid rgba(6, 78, 59, 0.2);
}

.badge-asset {
    background: rgba(217, 119, 6, 0.12);
    color: #d97706;
    border: 1px solid rgba(217, 119, 6, 0.3);
}

.badge-tvet {
    background: rgba(2, 132, 199, 0.1);
    color: #0369a1;
    border: 1px solid rgba(2, 132, 199, 0.25);
}

.badge-status-approved {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.badge-status-pending {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fcd34d;
}

.badge-status-revision {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

/* Progress Meters */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
    position: relative;
    margin-top: 5px;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.5s ease;
}

.fill-emerald { background: linear-gradient(90deg, #10b981, #059669); }
.fill-gold { background: linear-gradient(90deg, #fbbf24, #d97706); }
.fill-blue { background: linear-gradient(90deg, #38bdf8, #0284c7); }
.fill-red { background: linear-gradient(90deg, #f87171, #dc2626); }

/* Financial Approval Stamp */
.chairman-seal {
    border: 2px dashed #059669;
    background: #ecfdf5;
    padding: 1.25rem;
    border-radius: var(--exec-radius-md);
    position: relative;
    margin-top: 1rem;
}

.chairman-seal-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: #059669;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 12px;
    border-radius: 99px;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

/* Modals */
.exec-modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.exec-modal-backdrop.open {
    display: flex;
}

.exec-modal {
    background: #ffffff;
    border-radius: var(--exec-radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 750px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

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

.exec-modal-header h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--exec-primary-dark);
}

.exec-modal-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--exec-text-muted);
    cursor: pointer;
}

.exec-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.exec-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--exec-border);
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Print Styles */
@media print {
    .chairman-sidebar, .chairman-header, .filter-toolbar, .no-print, .btn-exec-gold, .btn-exec-outline {
        display: none !important;
    }
    .chairman-main {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .chairman-content {
        padding: 0 !important;
    }
    .exec-panel {
        border: none !important;
        box-shadow: none !important;
    }
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .chairman-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
    }
    .chairman-sidebar.open {
        transform: translateX(0);
    }
    .mobile-toggle-btn {
        display: block;
    }
    .chairman-content {
        padding: 1.25rem;
    }
}
