:root {
    --bg-grad: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    --c-primary: #1b662a;
    --c-text-dark: #111827;
    --c-text-muted: #6b7280;
    --c-card-bg: #ffffff;
    --c-card-dark: #1b662a;
    --c-accent: #eab308;
    --c-white: #ffffff;
    --border-color: #e5e7eb;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    /* Fluid spacing and page padding */
    --spacing-page: clamp(12px, 4vw, 24px);
    --spacing-card: clamp(16px, 3vw, 20px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background: var(--bg-grad);
    color: var(--c-text-dark);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: var(--spacing-page);
    max-width: 1440px;
    margin: 0 auto;
}

/* --- Navigation --- */
.dash-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(16px, 5vw, 32px);
    position: sticky;
    top: 0;
    background: rgba(240, 253, 244, 0.8);
    backdrop-filter: blur(12px);
    z-index: 1000;
    padding: 12px 0;
    width: 100%;
    gap: 12px;
}

.dash-logo {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 40px;
    font-size: clamp(14px, 2vw, 16px);
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.dash-logo span {
    /* Hide text on very small screens */
    display: inline;
}

@media (max-width: 360px) {
    .dash-logo span {
        display: none;
    }

    .dash-logo {
        padding: 6px;
    }
}

.dash-menu {
    display: flex;
    background: var(--c-white);
    padding: 4px;
    border-radius: 40px;
    gap: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    /* Horizontal scroll on mobile */
    overflow-x: auto;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
    max-width: 100%;
    white-space: nowrap;
}

.dash-menu::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.dash-menu-item {
    padding: 6px 16px;
    border-radius: 30px;
    font-size: clamp(12px, 1.5vw, 13px);
    font-weight: 500;
    cursor: pointer;
    color: var(--c-text-dark);
    transition: all 0.2s;
    text-decoration: none;
    flex-shrink: 0;
}

.dash-menu-item.active {
    background: var(--c-card-dark);
    color: var(--c-white);
}

.dash-menu-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.dash-menu-item.locked::after {
    content: '🔒';
    font-size: 10px;
    filter: grayscale(1);
    opacity: 0.7;
}

.dash-menu-item.locked:hover {
    background: transparent;
    color: var(--c-text-dark);
}

.btn-primary {
    background: var(--c-primary);
    color: var(--c-white);
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn-primary:hover {
    background: #145322;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(27, 102, 42, 0.2);
}

.btn-secondary {
    padding: 14px 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #f8fafc;
    color: var(--c-text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    text-align: center;
}

.btn-secondary:hover {
    background: #f1f5f9;
    color: var(--c-text-dark);
}

.dash-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.dash-icon-btn {
    width: clamp(32px, 4vw, 36px);
    height: clamp(32px, 4vw, 36px);
    border-radius: 50%;
    background: var(--c-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

/* --- Hero Section --- */
.dash-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: clamp(20px, 6vw, 32px);
    flex-wrap: wrap;
    gap: 20px;
}

.dash-title {
    font-size: clamp(24px, 5vw, 32px);
    font-weight: 600;
    color: var(--c-text-dark);
    letter-spacing: -0.01em;
}

.dash-metrics {
    display: flex;
    gap: clamp(12px, 4vw, 24px);
    flex-wrap: wrap;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.metric-val {
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 500;
    line-height: 1;
}

.metric-label {
    font-size: 11px;
    color: var(--c-text-muted);
}

/* --- Dashboard Grid --- */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(260px, 30vw, 300px), 1fr));
    gap: clamp(16px, 3vw, 20px);
    flex: 1;
}

.card {
    background: var(--c-card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-card);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.01);
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
}

.card-dark {
    background: var(--c-card-dark);
    color: var(--c-white);
}

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

.card-subtitle {
    font-size: 16px;
    font-weight: 600;
}

/* --- Profile --- */
.profile-card {
    background: linear-gradient(rgba(27, 102, 42, 0.8), rgba(27, 102, 42, 0.9)), url('../img/campus.png');
    background-size: cover;
    background-position: center;
    color: white;
    min-height: clamp(180px, 25vh, 220px);
    justify-content: flex-end;
}

.profile-name {
    font-size: clamp(18px, 3vw, 20px);
    font-weight: 600;
    margin-bottom: 2px;
}

.profile-role {
    font-size: 12px;
    opacity: 0.8;
}

.profile-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* --- Session Stats --- */
.stat-item {
    margin-bottom: 16px;
}

.stat-label {
    font-size: clamp(11px, 1.5vw, 12px);
    color: var(--c-text-muted);
    margin-bottom: 4px;
}

.stat-value {
    font-size: clamp(20px, 3vw, 24px);
    font-weight: 600;
}

/* --- Responsive Adjustments Overrides --- */
@media (max-width: 1024px) {
    .dash-nav {
        flex-direction: row;
        /* Keep it in a row, thanks to scrollable menu */
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .dash-nav {
        /* On small screens, keep logo and actions but let menu breathe */
        padding: 8px 0;
    }

    .dash-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .dash-metrics {
        width: 100%;
        justify-content: space-between;
        background: white;
        padding: clamp(12px, 4vw, 16px);
        border-radius: var(--radius-md);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    }
}

@media (max-width: 480px) {
    .dash-title {
        font-size: 22px;
    }
}

/* --- Form Elements --- */
.input-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text-dark);
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    font-size: 14px;
    font-family: inherit;
    color: var(--c-text-dark);
    transition: all 0.2s ease;
    outline: none;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    border-color: var(--c-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(27, 102, 42, 0.08);
}

.input-group input::placeholder {
    color: #94a3b8;
}

.input-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 48px;
}

.input-group input:disabled,
.input-group select:disabled {
    background: #f1f5f9;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Ensure global tags get basic premium styles too */
input,
select,
textarea {
    font-family: inherit;
}