/* ==========================================================
   Eurasian Campus – Student Concern System
   Modern UI layer (loads after style.css)
   ========================================================== */
:root {
    --ec-primary: #0d3b8c;
    --ec-primary-dark: #082a66;
    --ec-primary-light: #2563eb;
    --ec-accent: #f5b301;
    --ec-bg: #f1f5fb;
    --ec-surface: #ffffff;
    --ec-text: #1e293b;
    --ec-muted: #64748b;
    --ec-border: #e2e8f0;
    --ec-radius: 16px;
    --ec-shadow: 0 10px 40px rgba(13, 59, 140, .12);
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--ec-bg);
    color: var(--ec-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main.ec-main { flex: 1 0 auto; }

/* ---------- Navbar ---------- */
.ec-navbar {
    background: linear-gradient(135deg, var(--ec-primary-dark), var(--ec-primary) 60%, var(--ec-primary-light));
    padding: .55rem 0;
    box-shadow: 0 4px 20px rgba(8, 42, 102, .25);
    border-bottom: 3px solid var(--ec-accent);
}
.ec-navbar .navbar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: #fff;
    padding: 0;
    min-width: 0;
}
.ec-logo {
    height: 46px;
    width: 46px;
    object-fit: contain;
    background: #fff;
    border-radius: 50%;
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
    flex-shrink: 0;
}
.ec-brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.ec-brand-title { font-weight: 700; font-size: 1.05rem; letter-spacing: .2px; white-space: nowrap; }
.ec-brand-sub {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, .75);
    white-space: nowrap;
}
.ec-navbar .nav-link {
    color: rgba(255, 255, 255, .85);
    font-weight: 500;
    font-size: .93rem;
    padding: .55rem .9rem !important;
    border-radius: 10px;
    transition: background .2s, color .2s;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.ec-navbar .nav-link:hover,
.ec-navbar .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, .14);
}
.ec-navbar .nav-link.active { box-shadow: inset 0 -2px 0 var(--ec-accent); }
.ec-navbar .navbar-toggler {
    border: 0;
    background: rgba(255, 255, 255, .14);
    border-radius: 10px;
    padding: .45rem .6rem;
}
.ec-navbar .navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(255, 255, 255, .3); }
.ec-user-chip {
    display: flex;
    align-items: center;
    gap: .55rem;
}
.ec-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--ec-accent);
    color: var(--ec-primary-dark);
    font-weight: 700;
    display: grid;
    place-items: center;
    font-size: .9rem;
    flex-shrink: 0;
}
.ec-user-meta { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.ec-user-name { font-size: .88rem; font-weight: 600; }
.ec-user-role { font-size: .7rem; opacity: .8; }
.ec-navbar .dropdown-menu {
    border: 0;
    border-radius: 14px;
    box-shadow: var(--ec-shadow);
    padding: .5rem;
    margin-top: .5rem;
}
.ec-navbar .dropdown-item { border-radius: 10px; padding: .55rem .85rem; font-weight: 500; }
.ec-navbar .dropdown-item:hover { background: #eef3ff; }

@media (max-width: 991.98px) {
    .ec-navbar .navbar-collapse {
        background: rgba(255, 255, 255, .08);
        border-radius: 14px;
        margin-top: .75rem;
        padding: .6rem;
    }
    .ec-navbar .navbar-nav + .navbar-nav {
        border-top: 1px solid rgba(255, 255, 255, .15);
        margin-top: .5rem;
        padding-top: .5rem;
    }
}
@media (max-width: 400px) {
    .ec-brand-sub { display: none; }
    .ec-brand-title { font-size: .95rem; }
    .ec-logo { height: 40px; width: 40px; }
}

/* ---------- Flash ---------- */
.ec-flash {
    border: 0;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .08);
    border-left: 5px solid currentColor;
}

/* ---------- Footer-friendly cards (global polish) ---------- */
.card { border-radius: var(--ec-radius); border-color: var(--ec-border); }
.form-control, .form-select { border-radius: 12px; border-color: var(--ec-border); }
.form-control:focus, .form-select:focus {
    border-color: var(--ec-primary-light);
    box-shadow: 0 0 0 .22rem rgba(37, 99, 235, .15);
}
.btn { border-radius: 12px; font-weight: 600; }
.btn-primary {
    background: linear-gradient(135deg, var(--ec-primary), var(--ec-primary-light));
    border: 0;
    box-shadow: 0 6px 16px rgba(13, 59, 140, .28);
    transition: transform .15s, box-shadow .2s;
}
.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, var(--ec-primary-dark), var(--ec-primary));
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(13, 59, 140, .35);
}

/* ---------- Admin login ---------- */
.ec-login-wrap {
    min-height: calc(100vh - 220px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
}
.ec-login-card {
    width: 100%;
    max-width: 440px;
    background: var(--ec-surface);
    border-radius: 24px;
    box-shadow: var(--ec-shadow);
    overflow: hidden;
    animation: ecRise .5s ease both;
}
@keyframes ecRise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}
.ec-login-head {
    position: relative;
    text-align: center;
    color: #fff;
    padding: 2rem 1.5rem 3rem;
    background: linear-gradient(135deg, var(--ec-primary-dark), var(--ec-primary) 60%, var(--ec-primary-light));
    overflow: hidden;
}
.ec-login-head::before, .ec-login-head::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}
.ec-login-head::before { width: 180px; height: 180px; top: -70px; right: -50px; }
.ec-login-head::after  { width: 120px; height: 120px; bottom: -50px; left: -30px; }
.ec-login-logo {
    position: relative;
    z-index: 1;
    width: 84px; height: 84px;
    object-fit: contain;
    background: #fff;
    border-radius: 50%;
    padding: 6px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
    margin-bottom: .9rem;
}
.ec-login-head h1 { position: relative; z-index: 1; font-size: 1.4rem; font-weight: 700; margin: 0; }
.ec-login-head p { position: relative; z-index: 1; margin: .25rem 0 0; font-size: .88rem; color: rgba(255, 255, 255, .8); }
.ec-login-body {
    padding: 1.75rem 1.75rem 1.5rem;
    margin-top: -1.5rem;
    background: var(--ec-surface);
    border-radius: 24px 24px 0 0;
    position: relative;
    z-index: 2;
}
.ec-input-group {
    position: relative;
}
.ec-input-group > .bi:first-child {
    position: absolute;
    left: 1rem; top: 50%;
    transform: translateY(-50%);
    color: var(--ec-muted);
    font-size: 1.05rem;
    pointer-events: none;
    z-index: 3;
}
.ec-input-group .form-control {
    padding: .8rem 1rem .8rem 2.75rem;
    background: #f8fafc;
}
.ec-input-group .form-control:focus { background: #fff; }
.ec-input-group .ec-toggle-pass {
    position: absolute;
    right: .35rem; top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--ec-muted);
    padding: .5rem .7rem;
    border-radius: 10px;
    z-index: 3;
}
.ec-input-group .ec-toggle-pass:hover { color: var(--ec-primary); background: #eef3ff; }
.ec-input-group .has-toggle { padding-right: 3rem; }
.ec-login-btn { padding: .85rem 1rem; font-size: 1rem; }
.ec-login-foot {
    text-align: center;
    padding: 1rem 1.5rem 1.4rem;
    font-size: .8rem;
    color: var(--ec-muted);
    background: var(--ec-surface);
}
.ec-login-foot a { color: var(--ec-primary); text-decoration: none; font-weight: 600; }
.ec-login-foot a:hover { text-decoration: underline; }

@media (max-width: 575.98px) {
    .ec-login-wrap { align-items: flex-start; min-height: auto; padding-top: .5rem; }
    .ec-login-card { border-radius: 20px; }
    .ec-login-body { padding: 1.5rem 1.25rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
    .ec-login-card { animation: none; }
    .btn-primary { transition: none; }
}

/* ---------- Footer ---------- */
.ec-footer {
    flex-shrink: 0;
    margin-top: 2rem;
    color: rgba(255, 255, 255, .8);
    background: linear-gradient(135deg, var(--ec-primary-dark), var(--ec-primary));
    border-top: 3px solid var(--ec-accent);
}
.ec-footer-main { padding: 2rem 0 1.25rem; }
.ec-footer-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.ec-footer-brand .ec-logo { height: 42px; width: 42px; }
.ec-footer-brand strong { color: #fff; font-size: 1.05rem; display: block; line-height: 1.2; }
.ec-footer-brand span { font-size: .7rem; text-transform: uppercase; letter-spacing: 1.2px; opacity: .7; }
.ec-footer p { font-size: .88rem; margin: 0; max-width: 420px; }
.ec-footer h6 {
    color: #fff;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: .75rem;
}
.ec-footer-links { list-style: none; padding: 0; margin: 0; }
.ec-footer-links li + li { margin-top: .45rem; }
.ec-footer-links a {
    color: rgba(255, 255, 255, .8);
    text-decoration: none;
    font-size: .9rem;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    transition: color .2s, transform .2s;
}
.ec-footer-links a:hover { color: var(--ec-accent); transform: translateX(3px); }
.ec-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .15);
    padding: .9rem 0;
    font-size: .8rem;
}
@media (max-width: 767.98px) {
    .ec-footer-main { padding: 1.5rem 0 1rem; text-align: center; }
    .ec-footer-brand { justify-content: center; }
    .ec-footer p { margin-inline: auto; }
    .ec-footer-links a { justify-content: center; }
}

/* ---------- Student concern form ---------- */
.ec-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    border-radius: 24px;
    padding: 2rem 1.75rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--ec-primary-dark), var(--ec-primary) 60%, var(--ec-primary-light));
    box-shadow: var(--ec-shadow);
}
.ec-hero::before, .ec-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}
.ec-hero::before { width: 220px; height: 220px; top: -90px; right: -60px; }
.ec-hero::after  { width: 140px; height: 140px; bottom: -60px; left: 30%; }
.ec-hero > * { position: relative; z-index: 1; }
.ec-hero h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: .35rem; }
.ec-hero p { margin: 0; color: rgba(255, 255, 255, .85); max-width: 560px; }
.ec-hero-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.ec-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    padding: .3rem .8rem;
    font-size: .78rem;
    font-weight: 500;
}

.ec-form-card {
    background: var(--ec-surface);
    border-radius: 24px;
    box-shadow: var(--ec-shadow);
    padding: 2rem;
}
.ec-section + .ec-section { margin-top: 2rem; padding-top: 1.75rem; border-top: 1px dashed var(--ec-border); }
.ec-section-title {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.25rem;
}
.ec-section-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 1.15rem;
    color: var(--ec-primary);
    background: #e8efff;
}
.ec-section-title h2 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.ec-section-title small { color: var(--ec-muted); display: block; font-size: .8rem; font-weight: 400; }

.ec-form-card .form-label { font-weight: 600; font-size: .86rem; margin-bottom: .35rem; }
.ec-form-card .form-control,
.ec-form-card .form-select {
    padding: .7rem .95rem;
    background-color: #f8fafc;
}
.ec-form-card .form-control:focus,
.ec-form-card .form-select:focus { background-color: #fff; }
.ec-form-card .form-text { font-size: .76rem; color: var(--ec-muted); }
.ec-form-card textarea.form-control { resize: vertical; min-height: 140px; }
.ec-counter { text-align: right; font-size: .75rem; color: var(--ec-muted); margin-top: .25rem; }

.ec-submit-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
}
.ec-submit-bar .note { font-size: .8rem; color: var(--ec-muted); }
.ec-submit-btn { padding: .85rem 2rem; font-size: 1rem; }

.ec-error-box {
    border: 0;
    border-radius: 14px;
    border-left: 5px solid #dc3545;
    box-shadow: 0 4px 16px rgba(220, 53, 69, .12);
}
.ec-error-box ul { padding-left: 1.1rem; }

@media (max-width: 767.98px) {
    .ec-hero { padding: 1.5rem 1.25rem; border-radius: 20px; }
    .ec-hero h1 { font-size: 1.4rem; }
    .ec-form-card { padding: 1.25rem; border-radius: 20px; }
    .ec-submit-bar { flex-direction: column-reverse; align-items: stretch; text-align: center; }
    .ec-submit-btn { width: 100%; }
    .ec-form-card .form-control,
    .ec-form-card .form-select { font-size: 16px; } /* stops iOS zoom on focus */
}

/* ---------- Success page ---------- */
.ec-success-card {
    background: var(--ec-surface);
    border-radius: 24px;
    box-shadow: var(--ec-shadow);
    overflow: hidden;
    text-align: center;
    animation: ecRise .5s ease both;
}
.ec-success-top {
    padding: 2.5rem 1.5rem 3.5rem;
    color: #fff;
    background: linear-gradient(135deg, #0f7a4a, #16a34a 60%, #22c55e);
    position: relative;
    overflow: hidden;
}
.ec-success-top::before, .ec-success-top::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
}
.ec-success-top::before { width: 200px; height: 200px; top: -80px; right: -50px; }
.ec-success-top::after  { width: 120px; height: 120px; bottom: -50px; left: -30px; }
.ec-success-top > * { position: relative; z-index: 1; }
.ec-check {
    width: 84px; height: 84px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
    animation: ecPop .6s cubic-bezier(.2, 1.4, .4, 1) .15s both;
}
.ec-check svg { width: 46px; height: 46px; }
.ec-check path {
    fill: none;
    stroke: #16a34a;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: ecDraw .5s ease .55s forwards;
}
@keyframes ecPop  { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes ecDraw { to { stroke-dashoffset: 0; } }
.ec-success-top h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: .35rem; }
.ec-success-top p { margin: 0; color: rgba(255, 255, 255, .9); }

.ec-success-body { padding: 0 1.75rem 2rem; margin-top: -1.75rem; position: relative; z-index: 2; }
.ec-ticket {
    background: #fff;
    border: 2px dashed var(--ec-primary-light);
    border-radius: 18px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 10px 28px rgba(13, 59, 140, .12);
}
.ec-ticket-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--ec-muted);
    font-weight: 600;
}
.ec-ticket-no {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--ec-primary);
    word-break: break-all;
    line-height: 1.2;
    margin: .2rem 0 .6rem;
}
.ec-copy-btn {
    border: 0;
    border-radius: 999px;
    background: #e8efff;
    color: var(--ec-primary);
    font-weight: 600;
    font-size: .82rem;
    padding: .4rem 1rem;
    transition: background .2s, color .2s;
}
.ec-copy-btn:hover { background: var(--ec-primary); color: #fff; }
.ec-copy-btn.copied { background: #16a34a; color: #fff; }

.ec-next { text-align: left; margin: 1.75rem 0 1.5rem; }
.ec-next h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: 1.2px; color: var(--ec-muted); margin-bottom: .9rem; text-align: center; }
.ec-next-item { display: flex; gap: .85rem; align-items: flex-start; }
.ec-next-item + .ec-next-item { margin-top: .85rem; }
.ec-next-num {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: #e8efff;
    color: var(--ec-primary);
    font-weight: 700;
    font-size: .85rem;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.ec-next-item strong { display: block; font-size: .92rem; }
.ec-next-item span { font-size: .84rem; color: var(--ec-muted); }
.ec-success-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

@media (max-width: 575.98px) {
    .ec-success-body { padding: 0 1.1rem 1.5rem; }
    .ec-ticket-no { font-size: 1.5rem; letter-spacing: 1px; }
    .ec-success-actions .btn { width: 100%; }
}
@media print {
    .ec-navbar, .ec-footer, .ec-success-actions, .ec-copy-btn { display: none !important; }
    body { background: #fff; }
}
@media (prefers-reduced-motion: reduce) {
    .ec-success-card, .ec-check { animation: none; }
    .ec-check path { animation: none; stroke-dashoffset: 0; }
}

/* ---------- Admin dashboard ---------- */
.ec-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.ec-page-head h1 { font-size: 1.6rem; font-weight: 800; margin: 0; color: var(--ec-primary-dark); }
.ec-page-head p { margin: .15rem 0 0; color: var(--ec-muted); font-size: .92rem; }
.ec-scope-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #e8efff;
    color: var(--ec-primary);
    border-radius: 999px;
    padding: .35rem .9rem;
    font-size: .8rem;
    font-weight: 600;
}

/* Stat cards */
.ec-stat {
    display: flex;
    align-items: center;
    gap: .9rem;
    height: 100%;
    padding: 1.1rem 1.2rem;
    background: var(--ec-surface);
    border-radius: 18px;
    border: 2px solid transparent;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .06);
    text-decoration: none;
    color: var(--ec-text);
    transition: transform .15s, box-shadow .2s, border-color .2s;
}
.ec-stat:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(15, 23, 42, .1); color: var(--ec-text); }
.ec-stat.active { border-color: var(--stat-color); }
.ec-stat-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    color: var(--stat-color);
    background: color-mix(in srgb, var(--stat-color) 14%, #fff);
}
.ec-stat-num { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.ec-stat-label { font-size: .78rem; color: var(--ec-muted); font-weight: 600; margin-top: .25rem; text-transform: uppercase; letter-spacing: .6px; }
.ec-stat.total   { --stat-color: #2563eb; }
.ec-stat.pending { --stat-color: #f59e0b; }
.ec-stat.progress{ --stat-color: #0ea5e9; }
.ec-stat.resolved{ --stat-color: #16a34a; }

/* Filter bar */
.ec-filter-card {
    background: var(--ec-surface);
    border-radius: 18px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .06);
    padding: 1.1rem 1.2rem;
    margin-bottom: 1.25rem;
}
.ec-filter-card .form-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--ec-muted); margin-bottom: .3rem; }
.ec-filter-card .form-control,
.ec-filter-card .form-select { background-color: #f8fafc; padding: .6rem .9rem; }
.ec-search { position: relative; }
.ec-search .bi { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--ec-muted); pointer-events: none; }
.ec-search .form-control { padding-left: 2.5rem; }

/* Table panel */
.ec-panel {
    background: var(--ec-surface);
    border-radius: 18px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .06);
    overflow: hidden;
}
.ec-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--ec-border);
}
.ec-panel-head h2 { font-size: 1rem; font-weight: 700; margin: 0; }
.ec-panel-head small { color: var(--ec-muted); }

.ec-table { margin: 0; }
.ec-table thead th {
    background: #f8fafc;
    color: var(--ec-muted);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    border-bottom: 1px solid var(--ec-border);
    padding: .85rem 1rem;
    white-space: nowrap;
}
.ec-table tbody td { padding: .95rem 1rem; vertical-align: middle; border-color: var(--ec-border); }
.ec-table tbody tr:hover > * { background: #f6f9ff; }
.ec-ticket-link { font-weight: 700; color: var(--ec-primary); text-decoration: none; }
.ec-ticket-link:hover { text-decoration: underline; }
.ec-cell-sub { display: block; color: var(--ec-muted); font-size: .8rem; }

.ec-empty { text-align: center; padding: 3.5rem 1rem; color: var(--ec-muted); }
.ec-empty .bi { font-size: 3rem; display: block; margin-bottom: .5rem; opacity: .6; }

/* Pagination */
.ec-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--ec-border);
}
.ec-pager .summary { font-size: .84rem; color: var(--ec-muted); }
.ec-pager .pagination { margin: 0; gap: .25rem; flex-wrap: wrap; }
.ec-pager .page-link {
    border: 0;
    border-radius: 10px !important;
    color: var(--ec-text);
    font-weight: 600;
    font-size: .88rem;
    min-width: 38px;
    text-align: center;
    background: #f1f5f9;
}
.ec-pager .page-link:hover { background: #e2e8f0; }
.ec-pager .page-item.active .page-link { background: linear-gradient(135deg, var(--ec-primary), var(--ec-primary-light)); color: #fff; }
.ec-pager .page-item.disabled .page-link { opacity: .45; background: #f1f5f9; }

@media (max-width: 767.98px) {
    .ec-page-head h1 { font-size: 1.35rem; }
    .ec-stat { padding: .9rem; gap: .7rem; }
    .ec-stat-icon { width: 40px; height: 40px; font-size: 1.15rem; border-radius: 12px; }
    .ec-stat-num { font-size: 1.4rem; }
    .ec-stat-label { font-size: .68rem; }

    .ec-panel { background: transparent; box-shadow: none; overflow: visible; }
    .ec-panel-head { background: var(--ec-surface); border-radius: 18px; border: 0; box-shadow: 0 4px 18px rgba(15, 23, 42, .06); margin-bottom: .9rem; }
    .ec-pager { background: var(--ec-surface); border-radius: 18px; border: 0; box-shadow: 0 4px 18px rgba(15, 23, 42, .06); margin-top: .5rem; justify-content: center; text-align: center; }

    /* Table rows become cards */
    .ec-table thead { display: none; }
    .ec-table, .ec-table tbody, .ec-table tr, .ec-table td { display: block; width: 100%; }
    .ec-table tbody tr {
        background: var(--ec-surface);
        border-radius: 16px;
        box-shadow: 0 4px 18px rgba(15, 23, 42, .06);
        padding: .5rem 1rem;
        margin-bottom: .85rem;
    }
    .ec-table tbody tr:hover > * { background: transparent; }
    .ec-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        padding: .55rem 0;
        border: 0;
        border-bottom: 1px dashed var(--ec-border);
        text-align: right;
        background: transparent;
        box-shadow: none;
    }
    .ec-table tbody td:last-child { border-bottom: 0; padding-top: .8rem; }
    .ec-table tbody td::before {
        content: attr(data-label);
        flex-shrink: 0;
        text-align: left;
        font-size: .68rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .8px;
        color: var(--ec-muted);
    }
    .ec-table tbody td[data-label="Action"]::before { display: none; }
    .ec-table tbody td[data-label="Action"] .btn { width: 100%; }
}

/* ---------- View concern page ---------- */
.ec-back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--ec-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: .88rem;
    margin-bottom: .9rem;
}
.ec-back:hover { color: var(--ec-primary); }

.ec-ticket-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.5rem 1.75rem;
}
.ec-ticket-hero .label { font-size: .72rem; text-transform: uppercase; letter-spacing: 1.4px; opacity: .75; font-weight: 600; }
.ec-ticket-hero h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: 1px; margin: .1rem 0 .5rem; word-break: break-all; }
.ec-ticket-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; font-size: .84rem; color: rgba(255, 255, 255, .9); }
.ec-ticket-meta .badge { font-size: .78rem; }
.ec-status-big .badge { font-size: .95rem !important; padding: .6rem 1.1rem; border-radius: 999px; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); }

.ec-card {
    background: var(--ec-surface);
    border-radius: 18px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .06);
    overflow: hidden;
}
.ec-card + .ec-card { margin-top: 1.25rem; }
.ec-card-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--ec-border);
    font-weight: 700;
    font-size: .98rem;
}
.ec-card-head .ec-section-icon { width: 34px; height: 34px; font-size: 1rem; border-radius: 10px; }
.ec-card-body { padding: 1.25rem; }

/* Info grid */
.ec-info { display: flex; align-items: flex-start; gap: .75rem; min-width: 0; }
.ec-info-icon {
    width: 38px; height: 38px;
    flex-shrink: 0;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: #f1f5f9;
    color: var(--ec-primary);
}
.ec-info-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .8px; color: var(--ec-muted); font-weight: 700; }
.ec-info-value { font-weight: 600; word-break: break-word; overflow-wrap: anywhere; }
.ec-info-value a { text-decoration: none; color: var(--ec-primary); }
.ec-info-value a:hover { text-decoration: underline; }
.ec-info-value a.wa { color: #16a34a; }

/* Problem text */
.ec-problem {
    background: #f8fafc;
    border-left: 4px solid var(--ec-primary-light);
    border-radius: 0 14px 14px 0;
    padding: 1rem 1.15rem;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    line-height: 1.65;
}
.ec-problem.notes { border-left-color: var(--ec-accent); background: #fffaf0; }

/* Actions panel */
.ec-meta-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed var(--ec-border); font-size: .88rem; }
.ec-meta-row:last-of-type { border-bottom: 0; }
.ec-meta-row .k { color: var(--ec-muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .7px; }
.ec-meta-row .v { text-align: right; font-weight: 600; }
.ec-divider { height: 1px; background: var(--ec-border); margin: 1.1rem 0; border: 0; }
.ec-action-form .form-label { font-size: .82rem; font-weight: 700; }
.ec-action-form .form-select, .ec-action-form .form-control { background-color: #f8fafc; }
.ec-resolved-box {
    display: flex; align-items: center; gap: .6rem;
    background: #ecfdf3; color: #15803d;
    border-radius: 14px; padding: .9rem 1rem; font-weight: 600; font-size: .9rem;
}

/* Quick contact tiles */
.ec-contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.ec-contact-tile {
    display: flex; flex-direction: column; align-items: center; gap: .3rem;
    padding: .85rem .4rem;
    border-radius: 14px;
    text-decoration: none;
    font-size: .76rem; font-weight: 700;
    color: var(--tile-color);
    background: color-mix(in srgb, var(--tile-color) 10%, #fff);
    transition: transform .15s, background .2s;
}
.ec-contact-tile i { font-size: 1.35rem; }
.ec-contact-tile:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--tile-color) 18%, #fff); color: var(--tile-color); }
.ec-contact-tile.mail { --tile-color: #2563eb; }
.ec-contact-tile.call { --tile-color: #475569; }
.ec-contact-tile.wa   { --tile-color: #16a34a; }

/* Timeline */
.ec-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.ec-timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--ec-border); }
.ec-tl-item { position: relative; padding: 0 0 1.35rem 2.2rem; }
.ec-tl-item:last-child { padding-bottom: 0; }
.ec-tl-dot {
    position: absolute; left: 3px; top: 3px;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--dot, #94a3b8);
    border: 4px solid #fff;
    box-shadow: 0 0 0 2px var(--dot, #94a3b8);
}
.ec-tl-top { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.ec-tl-action { font-weight: 700; }
.ec-tl-change { color: var(--ec-muted); font-size: .88rem; }
.ec-tl-note { color: var(--ec-muted); font-size: .85rem; margin-top: .15rem; word-break: break-word; }
.ec-tl-when { font-size: .78rem; color: var(--ec-muted); text-align: right; }
.ec-tl-when strong { color: var(--ec-text); font-weight: 600; }

@media (max-width: 767.98px) {
    .ec-ticket-hero { padding: 1.25rem; }
    .ec-ticket-hero h1 { font-size: 1.4rem; }
    .ec-card-body { padding: 1rem; }
    .ec-tl-when { text-align: left; }
}

/* ---------- Manage pages (programs / subjects / admins) ---------- */
.ec-mini-stats { display: flex; flex-wrap: wrap; gap: .5rem; }
.ec-mini-stat {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: var(--ec-surface);
    border-radius: 999px;
    padding: .4rem .95rem;
    font-size: .82rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .06);
}
.ec-mini-stat b { font-size: .95rem; }
.ec-mini-stat.green b { color: #16a34a; }
.ec-mini-stat.grey b { color: #64748b; }
.ec-mini-stat.blue b { color: var(--ec-primary); }

.ec-add-card .ec-card-body { padding: 1.25rem; }
.ec-add-card .form-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--ec-muted); }
.ec-add-card .form-control, .ec-add-card .form-select { background-color: #f8fafc; padding: .7rem .95rem; }
.ec-add-hint { font-size: .78rem; color: var(--ec-muted); margin-top: .6rem; display: flex; gap: .4rem; }

.ec-list-tools { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.ec-list-tools .ec-search { min-width: 220px; }
.ec-list-tools .form-control { background-color: #f8fafc; padding: .5rem .9rem .5rem 2.4rem; font-size: .88rem; }

.ec-row-name { font-weight: 700; }
.ec-count-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: #f1f5f9;
    color: var(--ec-text);
    border-radius: 999px;
    padding: .2rem .7rem;
    font-size: .8rem;
    font-weight: 600;
}
.ec-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border-radius: 999px;
    padding: .25rem .75rem;
    font-size: .76rem;
    font-weight: 700;
}
.ec-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ec-pill.active   { background: #e7f8ee; color: #15803d; }
.ec-pill.inactive { background: #f1f5f9; color: #64748b; }

.ec-row-actions { display: flex; gap: .4rem; justify-content: flex-end; flex-wrap: wrap; }
.ec-row-actions form { margin: 0; }
.ec-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border: 0;
    border-radius: 10px;
    padding: .4rem .8rem;
    font-size: .82rem;
    font-weight: 600;
    background: #f1f5f9;
    color: var(--ec-text);
    transition: background .2s, color .2s;
}
.ec-icon-btn:hover { background: #e2e8f0; }
.ec-icon-btn.edit { background: #e8efff; color: var(--ec-primary); }
.ec-icon-btn.edit:hover { background: var(--ec-primary); color: #fff; }
.ec-icon-btn.off { background: #fff1f2; color: #be123c; }
.ec-icon-btn.off:hover { background: #be123c; color: #fff; }
.ec-icon-btn.on { background: #e7f8ee; color: #15803d; }
.ec-icon-btn.on:hover { background: #15803d; color: #fff; }

.ec-modal .modal-content { border: 0; border-radius: 20px; box-shadow: var(--ec-shadow); overflow: hidden; }
.ec-modal .modal-header { border: 0; background: linear-gradient(135deg, var(--ec-primary-dark), var(--ec-primary)); color: #fff; padding: 1.1rem 1.4rem; }
.ec-modal .modal-header .btn-close { filter: invert(1); }
.ec-modal .modal-body { padding: 1.4rem; }
.ec-modal .modal-footer { border: 0; padding: 0 1.4rem 1.4rem; }

@media (max-width: 767.98px) {
    .ec-list-tools { width: 100%; }
    .ec-list-tools .ec-search { flex: 1; min-width: 0; }
    .ec-row-actions { justify-content: stretch; }
    .ec-row-actions > * { flex: 1; }
    .ec-row-actions .ec-icon-btn { width: 100%; justify-content: center; padding: .6rem; }
    .ec-table tbody td[data-label="Name"] { font-size: 1.02rem; }
}

/* ---------- Manage admins ---------- */
.ec-add-card .ec-input-group .form-control { padding-left: 2.75rem; }
.ec-add-card .ec-input-group .form-control.has-toggle { padding-right: 3rem; }
.ec-modal .ec-input-group .form-control { padding: .75rem 1rem .75rem 2.75rem; }
.ec-modal .ec-input-group .form-control.has-toggle { padding-right: 3rem; }

.ec-user-cell { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.ec-user-cell .ec-avatar { width: 42px; height: 42px; font-size: 1.05rem; border-radius: 14px; }
.ec-user-cell .ec-avatar.super { background: #fff4d6; color: #b45309; }
.ec-user-cell .ec-avatar.division { background: #e8efff; color: var(--ec-primary); }
.ec-user-cell .name { font-weight: 700; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.ec-user-cell .sub { display: block; color: var(--ec-muted); font-size: .8rem; word-break: break-all; }
.ec-you-tag { background: var(--ec-primary); color: #fff; border-radius: 999px; font-size: .65rem; font-weight: 700; padding: .1rem .55rem; letter-spacing: .5px; }

.ec-pill.super    { background: #fff4d6; color: #b45309; }
.ec-pill.division { background: #e8efff; color: var(--ec-primary); }
.ec-icon-btn.key { background: #fff4d6; color: #b45309; }
.ec-icon-btn.key:hover { background: #b45309; color: #fff; }
.ec-self-note { font-size: .78rem; color: var(--ec-muted); font-style: italic; padding: .4rem .2rem; }

@media (max-width: 767.98px) {
    .ec-table tbody td[data-label="Admin"] { display: block; text-align: left; padding-bottom: .75rem; }
    .ec-table tbody td[data-label="Admin"]::before { display: none; }
    .ec-self-note { text-align: center; width: 100%; }
}

/* ---------- Manage admins ---------- */
.ec-page-head .head-actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.ec-user-cell { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.ec-avatar-lg {
    width: 42px; height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--ec-primary), var(--ec-primary-light));
}
.ec-avatar-lg.super { background: linear-gradient(135deg, #d97706, #f5b301); color: #3b2a00; }
.ec-user-cell .name { font-weight: 700; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.ec-you {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    background: #e8efff;
    color: var(--ec-primary);
    border-radius: 999px;
    padding: .1rem .5rem;
}
.ec-role {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border-radius: 999px;
    padding: .25rem .75rem;
    font-size: .76rem;
    font-weight: 700;
}
.ec-role.super    { background: #fff4d6; color: #b45309; }
.ec-role.division { background: #e0f2fe; color: #0369a1; }

.ec-modal .ec-input-group .form-control { padding-top: .7rem; padding-bottom: .7rem; }
.ec-modal .form-control, .ec-modal .form-select { background-color: #f8fafc; padding: .7rem .95rem; }
.ec-modal .form-label { font-size: .8rem; font-weight: 700; }

@media (max-width: 767.98px) {
    .ec-page-head .head-actions { width: 100%; }
    .ec-page-head .head-actions .btn { flex: 1; }
    .ec-table tbody td[data-label="Admin"] { justify-content: flex-start; text-align: left; }
    .ec-table tbody td[data-label="Admin"]::before { display: none; }
}