:root {
    --emerald-600: #059669;
    --emerald-700: #047857;
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --slate-900: #0f172a;
    --slate-600: #475569;
    --slate-200: #e2e8f0;
    --bg-app: #f8fafc;
}

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

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-app);
    color: var(--slate-900);
    line-height: 1.5;
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    box-sizing: border-box;
}

/* Navbar */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--slate-200);
    position: sticky;
    top: 0;
    z-index: 20;
}

.navbar-inner {
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-menu-toggle {
    display: none;
    background: #f1f5f9;
    border: 1px solid var(--slate-200);
    color: var(--slate-900);
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
}

.icon-menu { width: 20px; height: 20px; }

.logo-box {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    font-weight: 800;
    font-size: 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
    flex-shrink: 0;
}

.brand-name { display: block; font-size: 17px; font-weight: 800; white-space: nowrap; }
.brand-sub { display: block; font-size: 11px; color: var(--slate-600); white-space: nowrap; }

.nav-links { display: flex; gap: 8px; }

.nav-links .link {
    padding: 10px 16px;
    border-radius: 12px;
    color: var(--slate-600);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.nav-links .link:hover, .nav-links .link.active {
    background: var(--emerald-50);
    color: var(--emerald-600);
    font-weight: 700;
}

.user-box { display: flex; align-items: center; gap: 10px; }
.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--emerald-100);
    color: var(--emerald-600);
    font-weight: 800;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.u-name { display: block; font-size: 13px; font-weight: 700; white-space: nowrap; }
.u-role { display: block; font-size: 11px; color: var(--slate-600); white-space: nowrap; }

/* Main Workspace */
.workspace { padding-top: 28px; padding-bottom: 48px; }
.schola-tab-content { display: none; width: 100%; }
.schola-tab-content.active { display: block; }

.banner {
    background: linear-gradient(135deg, #064e3b, #047857, #059669);
    color: white;
    padding: 32px 36px;
    border-radius: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    box-shadow: 0 10px 20px -5px rgba(5, 150, 105, 0.3);
}

.badge-emerald {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.banner h1 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.banner p { font-size: 13px; opacity: 0.9; max-width: 600px; }

.btn-emerald {
    background: white;
    color: var(--emerald-700);
    padding: 12px 22px;
    border-radius: 14px;
    border: none;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-emerald:hover { transform: translateY(-2px); }

/* Metrics Cards */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }

.m-card {
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.m-card:hover { transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.08); }

.m-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.m-icon {
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
}
.icon-emerald { background: #dcfce7; }
.icon-blue { background: #dbeafe; }
.icon-purple { background: #f3e8ff; }
.icon-amber { background: #fef3c7; }

.m-title { font-size: 10px; font-weight: 800; color: var(--slate-600); text-transform: uppercase; letter-spacing: 0.5px; }
.m-sub { font-size: 11px; color: var(--slate-600); }

.m-val { font-size: 26px; font-weight: 800; display: flex; align-items: center; justify-content: space-between; line-height: 1; }

.m-tag { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 8px; }
.tag-green { background: #dcfce7; color: #15803d; }
.tag-blue { background: #dbeafe; color: #1d4ed8; }
.tag-purple { background: #f3e8ff; color: #6b21a8; }
.tag-amber { background: #fef3c7; color: #b45309; }

/* Grid Layout */
.grid-layout { display: flex; gap: 24px; }
.flex-2 { flex: 2; min-width: 0; }
.flex-1 { flex: 1; min-width: 0; }

.panel {
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.03);
    min-width: 0;
}

/* FIX OVERLAP TITLE AND PILLS */
.panel-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    width: 100%;
}
.panel-head .title-area { flex: 1 1 280px; min-width: 0; }
.panel-head h3 { font-size: 16px; font-weight: 800; color: var(--slate-900); }
.panel-sub { font-size: 12px; color: var(--slate-600); margin-top: 2px; }

.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid var(--slate-200);
    background: white;
    font-size: 12px;
    font-weight: 700;
    color: var(--slate-600);
    cursor: pointer;
    transition: all 0.2s ease;
}
.pill:hover { background: #f1f5f9; }
.pill.active { background: var(--emerald-600); color: white; border-color: var(--emerald-600); }

.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
.schola-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 580px; }
.schola-table th { padding: 12px; background: #f8fafc; color: var(--slate-600); text-align: left; font-size: 11px; font-weight: 800; text-transform: uppercase; border-bottom: 1px solid var(--slate-200); }
.schola-table td { padding: 16px 12px; border-bottom: 1px solid #f1f5f9; }

.text-emerald { color: var(--emerald-600); }
.font-mono { font-family: monospace; font-weight: 700; color: #334155; }
.badge-sub { background: #f1f5f9; padding: 4px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; color: #475569; }

.status-badge { padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 800; }
.s-ongoing { background: #dcfce7; color: #166534; }
.s-next { background: #dbeafe; color: #1e40af; }

/* Announce List */
.announce-list { display: flex; flex-direction: column; gap: 14px; }
.a-item { background: #f8fafc; border: 1px solid var(--slate-200); border-radius: 16px; padding: 16px; transition: border-color 0.2s; }
.a-item:hover { border-color: var(--emerald-600); }
.a-date { font-size: 10px; font-weight: 800; color: var(--emerald-600); display: block; margin-bottom: 4px; letter-spacing: 0.5px; }
.a-title { font-size: 14px; font-weight: 800; margin-bottom: 4px; }
.a-desc { font-size: 12px; color: var(--slate-600); }

/* Mobile Phone Responsiveness */
@media (max-width: 900px) {
    .container { padding: 0 16px; }
    .btn-menu-toggle { display: block; }

    .nav-links {
        display: none;
        position: absolute;
        top: 74px;
        left: 0; right: 0;
        background: white;
        border-bottom: 1px solid var(--slate-200);
        flex-direction: column;
        padding: 16px;
        box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    }
    .nav-links.nav-open { display: flex; }

    .user-details { display: none; }

    .banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 24px;
    }

    .metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .grid-layout {
        flex-direction: column;
        gap: 16px;
    }
}

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