html, body { height: 100%; width: 100%; }
body {
    background: linear-gradient(180deg, #f5f8ff 0%, #e9eff9 55%, #f8fbff 100%);
    color: #1f2937;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 28px;
    max-width: none;
    margin: 0;
    padding: 24px 20px;
    height: 100vh;
    box-sizing: border-box;
}

.dashboard-aside {
    background: #111827;
    color: #e2e8f0;
    border-radius: 32px;
    padding: 34px 26px;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.18);
    position: relative;
    top: 0;
    align-self: stretch;
    min-height: 100vh;
}

.dashboard-aside h2 {
    font-family: 'Marcellus', serif;
    font-size: 22px;
    letter-spacing: 1px;
    margin-bottom: 14px;
    color: #f8fafc;
}

.dashboard-aside p {
    font-family: 'Arimo', sans-serif;
    font-size: 14px;
    color: #cbd5e1;
    line-height: 1.8;
    margin-bottom: 28px;
}

.dashboard-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.dashboard-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 18px;
    font-family: 'Arimo', sans-serif;
    font-size: 14px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease;
}

.dashboard-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

.dashboard-nav-link.active {
    background: linear-gradient(135deg, #f97316, #fb923c);
    color: #ffffff;
}

.dashboard-nav-link span.icon {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    font-size: 16px;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* hide any leftover header for full-viewport dashboard */
.app-header { display: none !important; }

.dashboard-main { height: 100vh; overflow: auto; }

.dashboard-topbar,
.dashboard-header {
    background: #ffffff;
    border-radius: 28px;
    padding: 28px 30px;
    box-shadow: 0 26px 80px rgba(15, 23, 42, 0.08);
}

/* Form and attendance UI polish */
.dashboard-card form input,
.dashboard-card form select,
.dashboard-card form textarea {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #e6e9ef;
    background: #ffffff;
    box-shadow: none;
    font-family: 'Arimo', sans-serif;
    font-size: 14px;
}
.dashboard-card form textarea { min-height: 100px; resize: vertical; }
.dashboard-card form button.dashboard-button { min-width: 140px; }
.dashboard-card .dashboard-actions { margin-top: 12px; }

/* table responsiveness */
.table-card { overflow-x: auto; }
.dashboard-table { width: 100%; border-collapse: collapse; }
.dashboard-table th, .dashboard-table td { padding: 12px 14px; text-align: left; }
.dashboard-table thead { background: rgba(15,23,42,0.03); }

/* status chip sizing */
.status-chip { padding: 6px 10px; border-radius: 999px; font-weight:700; font-size:13px; }

/* Attendance-specific small tweaks */
.dashboard-card.table-card h3 { margin-bottom: 12px; }


.dashboard-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.dashboard-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 999px;
    background: #f3f4ff;
    color: #3730a3;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.dashboard-topbar h1,
.dashboard-header h1 {
    font-family: 'Marcellus', serif;
    font-size: clamp(36px, 4vw, 54px);
    margin: 0;
    color: #111827;
}

.dashboard-topbar p,
.dashboard-header p {
    max-width: 720px;
    margin: 0;
    font-family: 'Arimo', sans-serif;
    font-size: 15px;
    color: #4b5563;
    line-height: 1.8;
}

.dashboard-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.metrics-row { grid-template-columns: repeat(4, 1fr); gap: 18px; }
.metric-card { padding: 20px; text-align: left; }
.metric-label { font-size: 13px; color: #6b7280; text-transform: uppercase; letter-spacing: .08em; }
.metric-value { font-size: 2.2rem; font-weight: 800; color: #111827; margin-top: 8px; }
.metric-note { font-size: 13px; color: #6b7280; margin-top: 6px; }

@media (max-width: 960px) { .metrics-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .metrics-row { grid-template-columns: 1fr; } }

/* Mobile / small screens: make the dashboard single-column and friendly */
@media (max-width: 900px) {
    .dashboard-shell { grid-template-columns: 1fr; padding: 16px; }
    .dashboard-aside { display: none; }
    .dashboard-main { padding: 0; }
    .dashboard-header { padding: 18px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-card { padding: 18px; }
    .dashboard-card table { font-size: 14px; }
    .dashboard-card form { grid-template-columns: 1fr !important; }
    .dashboard-card form input, .dashboard-card form select, .dashboard-card form textarea { width: 100%; }
}

/* mobile nav: when nav-open class is on body, show aside as overlay */
body.nav-open .dashboard-aside {
    display: block !important;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    z-index: 1200;
    transform: translateX(0);
}
body.nav-open::after{
    content: '';
    position: fixed;
    inset: 0 0 0 0;
    background: rgba(2,6,23,0.45);
    z-index: 1100;
}
.mobile-nav-toggle{
    position: fixed;
    left: 16px;
    top: 16px;
    z-index: 1300;
    background: linear-gradient(135deg,#f97316,#fb923c);
    color:#fff; border:0; padding:10px 12px; border-radius:10px; font-size:20px; display:none;
}
@media (max-width:900px){ .mobile-nav-toggle{ display:block; } }

/* show card list and hide table on small screens */
@media (max-width:720px){
    .dashboard-table{ display:none; }
    .attendance-cards{ display:block !important; }
    .attendance-card{ margin-bottom:12px; padding:14px; }
}

@media (max-width: 520px) {
    .dashboard-topbar h1, .dashboard-header h1 { font-size: 22px; }
    .dashboard-button { width: 100%; display: block; }
    .dashboard-card .dashboard-actions a { display: block; width: 100%; }
    .metric-value { font-size: 1.8rem; }
    .dashboard-table th, .dashboard-table td { padding: 10px 8px; }
}

.dashboard-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 28px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.1);
}

.metric-card {
    display: grid;
    gap: 14px;
    position: relative;
}

.metric-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
}

.metric-value {
    font-size: 2.8rem;
    font-weight: 800;
    color: #111827;
}

.metric-note,
.progress-label,
.progress-meta {
    display: block;
    font-family: 'Arimo', sans-serif;
    color: #6b7280;
    font-size: 14px;
}

.chart-card {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.chart-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.chart-placeholder {
    flex: 1;
    border-radius: 30px;
    background: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.16), transparent 22%),
                linear-gradient(180deg, #eef2ff 0%, #ffffff 100%);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
    min-height: 220px;
    position: relative;
}

.chart-placeholder::before {
    content: '';
    position: absolute;
    width: 78%;
    height: 140px;
    bottom: 24px;
    left: 18px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.65), rgba(59, 130, 246, 0.18));
    border-radius: 40px 40px 0 0;
}

.progress-track {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin: 12px 0 8px;
}

.progress-bar {
    height: 100%;
    background: #f97316;
    border-radius: 999px;
}

.progress-bar.pending {
    background: #f59e0b;
}

.dashboard-form-card {
    display: grid;
    gap: 22px;
}

.form-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid #d1d5db;
    font-family: 'Arimo', sans-serif;
    font-size: 14px;
    color: #111827;
    background: #ffffff;
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
}

.form-note {
    font-size: 13px;
    color: #6b7280;
}

.dashboard-fieldset {
    grid-column: 1 / -1;
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 12px;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
    padding: 16px 18px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-family: 'Arimo', sans-serif;
    color: #334155;
}

.dashboard-table th {
    background: #f8fafc;
    font-weight: 700;
    color: #0f172a;
}

.dashboard-table tbody tr:hover {
    background: #f8fafc;
}

.status-chip.completed { background: #dcfce7; color: #15803d; }
.status-chip.pending { background: #fef3c7; color: #b45309; }
.status-chip.review { background: #ede9fe; color: #7c3aed; }
.status-chip.draft { background: #e0e7ff; color: #4338ca; }

@media (max-width: 1120px) {
    .dashboard-shell { grid-template-columns: 1fr; }
    .dashboard-aside { position: relative; top: 0; min-height: auto; }
    .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .dashboard-nav-link { font-size: 13px; }
    .dashboard-topbar,
    .dashboard-header { padding: 22px; }
    .dashboard-card { padding: 22px; }
}

