/* ============================================================
   PAKARTI — Mantul (Manajemen Tutorial)
   Full CSS — versi rapi & terurut
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ============================================================
   1. VARIABLES
   ============================================================ */
:root {
    /* Warna */
    --primary: #667eea;
    --primary-dark: #5568d3;
    --primary-light: #eef2ff;
    --accent: #25D366;
    --accent-dark: #1ebe5b;
    --purple: #764ba2;
    --danger: #f56565;
    --warning: #ffc107;

    /* Netral */
    --bg: #f4f6fb;
    --card: #ffffff;
    --text: #1a1f36;
    --text-soft: #6b7280;
    --border: #eef1f6;

    /* Shadow */
    --shadow-sm: 0 2px 8px rgba(20,30,70,.06);
    --shadow-md: 0 8px 24px rgba(20,30,70,.08);

    /* Radius */
    --radius: 16px;
    --radius-sm: 12px;

    /* Layout */
    --nav-h: 68px;
    --appbar-h: 60px;

    /* Safe area (iOS notch) */
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* Flex HANYA untuk halaman lama (login/aktivasi/kirim) */
body.bg-login,
body.bg-aktivasi,
body.bg-kirim {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

body.bg-login    { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
body.bg-aktivasi { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
body.bg-kirim    { background: linear-gradient(135deg, #25D366 0%, #128C7E 100%); }

/* ============================================================
   3. APP MODE (dosen, dashboard)
   ============================================================ */
body.app-mode {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: block;
    align-items: unset;
    justify-content: unset;
    padding: 0;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: none;
}

body.app-mode .app-content {
    display: block;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 14px 14px calc(var(--nav-h) + 40px + var(--safe-bottom));
}

body.app-mode .appbar,
body.app-mode .bottom-nav {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

/* ============================================================
   4. LAYOUT — APP BAR, CONTENT, BOTTOM NAV, FOOTER
   ============================================================ */

/* --- App Bar --- */
.appbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    padding-top: var(--safe-top);
    height: calc(var(--appbar-h) + var(--safe-top));
    background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
    color: #fff;
    box-shadow: 0 2px 12px rgba(102,126,234,.25);
}

.appbar-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.appbar-title .logo {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.appbar-actions { display: flex; gap: 6px; }

.appbar-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255,255,255,.15);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, transform .1s;
    -webkit-tap-highlight-color: transparent;
}
.appbar-btn:hover  { background: rgba(255,255,255,.28); }
.appbar-btn:active { transform: scale(.94); }

/* --- App Content --- */
.app-content {
    padding: 14px 14px calc(var(--nav-h) + 40px + var(--safe-bottom));
    max-width: 560px;
    margin: 0 auto;
    min-height: calc(100vh - var(--appbar-h) - var(--nav-h));
}

/* Tab panel (bottom nav) */
.tab-panel { display: none; animation: fadeSlide .25s ease; }
.tab-panel.active { display: block; }

@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Bottom Navigation --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: rgba(255,255,255,.96);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(20,30,70,.06);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px;
    text-decoration: none;
    color: var(--text-soft);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: transparent;
    font-family: inherit;
    transition: color .2s;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.nav-item-icon {
    font-size: 20px;
    line-height: 1;
    transition: transform .25s;
}

.nav-item.active { color: var(--primary); }

.nav-item.active .nav-item-icon {
    transform: scale(1.15) translateY(-1px);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 24px;
    height: 3px;
    border-radius: 3px;
    background: var(--primary);
}

/* --- Footer --- */
.app-footer {
    text-align: center;
    padding: 16px 14px calc(var(--nav-h) + 24px + var(--safe-bottom));
    font-size: 11px;
    color: var(--text-soft);
    letter-spacing: .2px;
}

.app-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    color: var(--primary);
    font-size: 12px;
}

.app-footer-logo::before {
    content: '⚡';
    font-size: 12px;
}

.app-footer-copy {
    font-size: 10px;
    opacity: .6;
    margin-top: 4px;
    letter-spacing: .3px;
}

/* ============================================================
   5. KOMPONEN — CARD, STAT, BUTTON, FORM, LIST
   ============================================================ */

/* --- Card --- */
.card {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 50px rgba(0,0,0,.2);
    animation: fadeUp .35s ease;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card-app {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.card-app-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
    color: #fff;
    border: none;
    position: relative;
    overflow: hidden;
}

.card-app-hero::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}

.card-app-hero::after {
    content: '';
    position: absolute;
    bottom: -60px;
    right: 20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
}

/* --- Typography --- */
h1 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #333;
    text-align: center;
    line-height: 1.3;
}

p.sub {
    margin: 0 0 22px;
    color: #777;
    font-size: 13px;
    text-align: center;
    line-height: 1.5;
}

.hero-greet {
    font-size: 12px;
    opacity: .85;
    font-weight: 500;
    margin-bottom: 4px;
}

.hero-name {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.3px;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.hero-sub {
    font-size: 11px;
    opacity: .8;
    font-family: ui-monospace, monospace;
    position: relative;
    z-index: 1;
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.card-app-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 16px;
    letter-spacing: -.2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-app-title::before {
    content: '';
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--primary), var(--purple));
}

/* --- Stat Grid --- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.stat-tile {
    background: var(--card);
    border-radius: var(--radius-sm);
    padding: 14px 8px;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.stat-tile-num {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.5px;
    margin-bottom: 4px;
    color: var(--primary);
}

.stat-tile:nth-child(2) .stat-tile-num { color: var(--accent); }
.stat-tile:nth-child(3) .stat-tile-num { color: var(--purple); }

.stat-tile-label {
    font-size: 10px;
    color: var(--text-soft);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
}

/* --- Buttons (App) --- */
.btn-app {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: transform .1s, box-shadow .2s, background .2s;
    -webkit-tap-highlight-color: transparent;
    letter-spacing: -.1px;
}

.btn-app:active { transform: scale(.97); }

.btn-app-primary {
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: #fff;
    box-shadow: 0 6px 16px rgba(102,126,234,.3);
}

.btn-app-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    box-shadow: 0 6px 16px rgba(37,211,102,.3);
}

.btn-app-ghost {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.btn-app-outline {
    background: #fff;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-app-sm {
    padding: 10px 14px;
    font-size: 12px;
    border-radius: 10px;
    width: auto;
    display: inline-flex;
}

.btn-app-disabled {
    background: #e5e8f0;
    color: #9aa3b5;
    cursor: not-allowed;
    box-shadow: none;
}

/* --- Buttons (Legacy) --- */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s;
    margin-bottom: 10px;
    color: #fff;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }

.btn-web       { background: #25D366; }
.btn-web:hover { background: #1ebe5b; }
.btn-desktop       { background: #128C7E; }
.btn-desktop:hover { background: #0e7268; }
.btn-universal       { background: #34B7F1; }
.btn-universal:hover { background: #22a6e0; }
.btn-dl       { background: #075E54; }
.btn-dl:hover { background: #054d45; }
.btn-back-wa       { background: #eee; color: #333; }
.btn-back-wa:hover { background: #ddd; }

.btn-login,
.btn-back {
    display: block;
    text-align: center;
    text-decoration: none;
    padding: 13px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: background .2s, transform .1s;
    -webkit-tap-highlight-color: transparent;
}
.btn-login { background: #075E54; color: #fff; margin-bottom: 10px; }
.btn-login:hover { background: #054d45; }
.btn-back { background: #eee; color: #333; }
.btn-back:hover { background: #ddd; }

.btn-aktivasi {
    display: inline-block;
    background: #667eea;
    color: #fff;
    padding: 11px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s;
    -webkit-tap-highlight-color: transparent;
}
.btn-aktivasi:hover { background: #5568d3; }

.btn-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #075E54;
    color: #fff;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin: 4px 0 4px 6px;
    transition: background .2s, transform .1s;
    -webkit-tap-highlight-color: transparent;
}
.btn-inline:hover  { background: #054d45; }
.btn-inline:active { transform: scale(.96); }

.btn-inline-wa { background: #25D366; }
.btn-inline-wa:hover { background: #1ebe5b; }

.btn-inline-outline {
    background: #fff !important;
    color: #667eea !important;
    border: 1.5px solid #667eea !important;
}
.btn-inline-outline:hover {
    background: #667eea !important;
    color: #fff !important;
}

.btn-inline-danger { background: #e53e3e !important; }
.btn-inline-danger:hover { background: #c53030 !important; }

/* --- Form --- */
label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #444;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 13px 14px;
    margin-bottom: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
    color: #222;
}

input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,.15);
}

button[type="submit"] {
    width: 100%;
    padding: 14px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
    -webkit-tap-highlight-color: transparent;
}
button[type="submit"]:hover  { background: #1ebe5b; }
button[type="submit"]:active { transform: scale(.98); }

.btn-purple[type="submit"] { background: #667eea; }
.btn-purple[type="submit"]:hover { background: #5568d3; }

select,
textarea {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: #222;
    transition: border-color .2s, box-shadow .2s;
    resize: vertical;
}

select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,.15);
}

.field { margin-bottom: 14px; }

.field-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-soft);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.field-input {
    width: 100%;
    padding: 13px 14px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    background: #fafbfd;
    color: var(--text);
    transition: all .2s;
    margin: 0;
}

.field-input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102,126,234,.12);
}

textarea.field-input { resize: vertical; min-height: 90px; }

.hint {
    font-size: 12px;
    color: #888;
    margin-top: -10px;
    margin-bottom: 16px;
    line-height: 1.4;
}

.hint-inline {
    font-size: 10px;
    color: #999;
    font-weight: 400;
}

/* --- Alert / Info --- */
.error,
.alert-app-error {
    background: #fef2f2;
    color: #b91c1c;
    border-left: 4px solid #ef4444;
}

.error {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.4;
}

.alert-app {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-app-success {
    background: #f0fdf4;
    color: #166534;
    border-left: 4px solid var(--accent);
}

.alert-app-info {
    background: #eff6ff;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.info-box {
    background: #e7f5ec;
    border-left: 4px solid #25D366;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 12px;
    color: #075E54;
    margin-bottom: 16px;
    display: none;
    line-height: 1.4;
}
.info-box.show { display: block; }

.ask-hp,
.warn {
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 13px;
    color: #7a5c00;
    margin-bottom: 16px;
    line-height: 1.5;
}
.ask-hp strong { color: #333; }

.info-tip {
    background: #e7f0ff;
    border-left: 4px solid #667eea;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 12px;
    color: #33468c;
    margin-bottom: 16px;
    line-height: 1.6;
}

.info-tip code {
    background: #fff;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 11px;
}

/* --- Chip / Badge --- */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: .2px;
    white-space: nowrap;
}

.chip-primary { background: var(--primary-light); color: var(--primary-dark); }
.chip-accent  { background: #e7f5ec; color: #075E54; }
.chip-warning { background: #fff8e1; color: #8a6500; }
.chip-danger  { background: #fee2e2; color: #991b1b; }

.badge-count {
    display: inline-block;
    background: #f56565;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: .3px;
}

/* --- List / Row --- */
.list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.list-row:last-child { border-bottom: none; }

.list-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.list-body { flex: 1; min-width: 0; }

.list-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
    word-break: break-word;
}

.list-sub {
    font-size: 11px;
    color: var(--text-soft);
}

.list-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    text-align: right;
    word-break: break-word;
}

.list-value.empty { color: var(--warning); font-style: italic; font-weight: 500; }

/* --- Progress --- */
.progress {
    height: 6px;
    background: #e5eaf0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #25D366, #128C7E);
    border-radius: 3px;
    transition: width .5s ease;
}

.progress-mini {
    height: 4px;
    background: #e5eaf0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-mini-fill {
    height: 100%;
    background: linear-gradient(90deg, #25D366, #128C7E);
    border-radius: 2px;
    transition: width .4s;
}

/* --- Empty State --- */
.empty-app {
    text-align: center;
    padding: 32px 16px;
}

.empty-app-icon {
    font-size: 42px;
    margin-bottom: 10px;
    opacity: .4;
}

.empty-app-text {
    font-size: 13px;
    color: var(--text-soft);
    line-height: 1.5;
}

/* --- Sheet / Modal --- */
.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20,30,70,.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    align-items: flex-end;
    justify-content: center;
}
.sheet-backdrop.show { display: flex; animation: fadeIn .2s; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.sheet {
    background: #fff;
    width: 100%;
    max-width: 560px;
    border-radius: 24px 24px 0 0;
    padding: 8px 20px calc(20px + var(--safe-bottom));
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp .3s cubic-bezier(.2,.8,.2,1);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.sheet-handle {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: #ddd;
    margin: 8px auto 16px;
}

.sheet-title {
    font-size: 17px;
    font-weight: 800;
    margin: 0 0 16px;
    letter-spacing: -.2px;
}

/* --- FAB --- */
.fab {
    position: fixed;
    bottom: calc(var(--nav-h) + 16px + var(--safe-bottom));
    right: 16px;
    width: 56px;
    height: 56px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: #fff;
    border: none;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(102,126,234,.4);
    cursor: pointer;
    z-index: 90;
    transition: transform .15s;
    -webkit-tap-highlight-color: transparent;
}
.fab:active { transform: scale(.92); }

/* ============================================================
   6. HALAMAN — LOGIN, AKTIVASI, KIRIM, VCARD
   ============================================================ */

/* --- Login Page --- */
body.login-bg {
    background: linear-gradient(160deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    margin: 0;
}

.app-header-clean {
    text-align: center;
    padding: 44px 20px 24px;
    color: #fff;
}

.app-header-logo {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 8px;
    filter: drop-shadow(0 6px 16px rgba(0,0,0,.2));
}

.app-header-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.5px;
    margin-bottom: 2px;
}

.app-header-sub {
    font-size: 13px;
    opacity: .85;
    font-weight: 500;
    letter-spacing: .3px;
}

.login-wrap {
    flex: 1;
    padding: 8px 16px 20px;
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
}

.login-wrap .card-app {
    padding: 20px 18px;
    margin-bottom: 14px;
    box-shadow: 0 10px 30px rgba(20,30,70,.18);
}

.dosen-hidden {
    text-align: center;
    padding: 8px 0 16px;
}

.dosen-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    color: rgba(255,255,255,.75);
    border: 1.5px solid rgba(255,255,255,.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all .25s;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.dosen-icon-btn:hover,
.dosen-icon-btn:active {
    background: rgba(255,255,255,.28);
    color: #fff;
    transform: scale(1.05);
}

body.login-bg .app-footer {
    color: rgba(255,255,255,.85);
    padding: 12px 16px 24px;
}

body.login-bg .app-footer-logo {
    color: #fff;
    opacity: .95;
}

body.login-bg .app-footer-logo::before {
    filter: brightness(2);
}

/* --- Login Dosen --- */
body.bg-dosen-login {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.dosen-info {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f7f9fc;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
}

.dosen-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #764ba2, #667eea);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dosen-meta { min-width: 0; flex: 1; }

.dosen-meta-name {
    font-size: 14px;
    font-weight: 700;
    color: #222;
    margin-bottom: 2px;
}

.dosen-meta-detail {
    font-size: 11px;
    color: #888;
    font-family: ui-monospace, monospace;
}

/* --- Body Dosen (legacy) --- */
body.bg-dosen {
    background: #f0f2f5;
    display: block;
    align-items: unset;
    justify-content: unset;
    padding: 0;
    margin: 0;
}
body.bg-dosen .wrap {
    width: 100%;
    max-width: 560px;
    padding: 16px 16px 32px;
    margin: 0 auto;
}

/* --- Aktivasi Box --- */
.aktivasi-box {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #ddd;
    text-align: center;
}

.aktivasi-box p {
    font-size: 12px;
    color: #888;
    margin: 0 0 10px;
    line-height: 1.5;
}

/* --- Hasil Aktivasi --- */
.hasil {
    background: #e7f5ec;
    border: 2px dashed #25D366;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.hasil h2 {
    margin: 0 0 12px;
    font-size: 14px;
    color: #075E54;
    text-align: center;
}

.nama-row {
    background: #fff;
    border-radius: 8px;
    padding: 10px 14px;
    text-align: center;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    word-break: break-word;
}

.row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
}
.row:last-child { margin-bottom: 0; }

.row-label {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 64px;
}

.row-value {
    flex: 1;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 13px;
    color: #222;
    white-space: nowrap;
    overflow-x: auto;
    padding: 2px 0;
    -webkit-overflow-scrolling: touch;
}
.row-value::-webkit-scrollbar { height: 4px; }
.row-value::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.copy-btn {
    flex-shrink: 0;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    padding: 6px 9px;
    cursor: pointer;
    transition: background .2s;
    line-height: 1;
    letter-spacing: .3px;
    -webkit-tap-highlight-color: transparent;
}
.copy-btn:hover  { background: #1ebe5b; }
.copy-btn.copied { background: #075E54; }

/* --- vCard --- */
.vcard-box {
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px;
    text-align: left;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 11px;
    white-space: pre-wrap;
    margin-bottom: 18px;
    color: #333;
    line-height: 1.5;
    word-break: break-word;
    max-height: 160px;
    overflow-y: auto;
}

.section-title {
    font-size: 12px;
    font-weight: 700;
    color: #333;
    margin: 18px 0 10px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.steps {
    text-align: left;
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 12px;
    color: #666;
    margin-bottom: 18px;
    line-height: 1.6;
}
.steps ol { margin: 6px 0 0; padding-left: 18px; }
.steps li { margin-bottom: 10px; line-height: 1.6; }

.icon { font-size: 17px; line-height: 1; }

.note {
    font-size: 11px;
    color: #999;
    text-align: center;
    margin-top: 12px;
    line-height: 1.6;
}

.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
    color: #bbb;
    font-size: 11px;
}
.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #eee;
}

/* --- Contact Preview --- */
.contact-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #e7f5ec, #f4fbf6);
    border: 1px solid #c8e6d3;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
}

.avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(37,211,102,.3);
}

.contact-info { min-width: 0; flex: 1; }

.contact-name {
    font-size: 15px;
    font-weight: 700;
    color: #075E54;
    margin-bottom: 3px;
    word-break: break-word;
    line-height: 1.3;
}

.contact-phone {
    font-size: 13px;
    color: #4a7c6a;
    font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* ============================================================
   7. FITUR — PERTANYAAN, PRESENSI, KELAS
   ============================================================ */

/* --- Pertanyaan (Q-Card) --- */
.q-summary {
    background: #f7f9fc;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.q-summary-text {
    font-size: 12px;
    color: #555;
    margin-bottom: 8px;
    text-align: center;
}

.q-summary-text b { color: #667eea; }

.q-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.q-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 14px;
    transition: box-shadow .2s;
}
.q-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.06); }

.q-done    { border-left: 4px solid #25D366; }
.q-pending { border-left: 4px solid #ffc107; }

.q-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 8px;
    flex-wrap: wrap;
}

.q-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: .3px;
    white-space: nowrap;
}
.tipe-esai          { background: #eef2ff; color: #5568d3; }
.tipe-pilihan_ganda { background: #e7f5ec; color: #075E54; }
.tipe-skala         { background: #fff4e0; color: #a06000; }

.q-status {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
}
.q-status-done    { background: #e7f5ec; color: #075E54; }
.q-status-pending { background: #fff8e1; color: #8a6500; }

.q-text {
    font-size: 14px;
    color: #222;
    line-height: 1.55;
    margin-bottom: 10px;
    font-weight: 500;
    word-break: break-word;
}

.q-deadline {
    font-size: 11px;
    color: #888;
    margin-bottom: 10px;
}
.q-deadline-past { color: #e53e3e; font-weight: 600; }

.q-my-answer {
    background: #f0fdf4;
    border-left: 3px solid #25D366;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 10px;
}

.q-my-answer-label {
    font-size: 10px;
    font-weight: 700;
    color: #4a7c6a;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 4px;
}

.q-my-answer-text {
    font-size: 13px;
    color: #222;
    line-height: 1.5;
    margin-bottom: 4px;
    word-break: break-word;
}

.q-my-answer-time {
    font-size: 10px;
    color: #888;
    font-style: italic;
}

.q-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

/* --- Form Jawab --- */
.opsi-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.opsi-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #f7f9fc;
    border: 2px solid #e5eaf0;
    border-radius: 10px;
    cursor: pointer;
    transition: all .15s;
    font-size: 14px;
    color: #222;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
}

.opsi-item:hover {
    border-color: #667eea;
    background: #eef2ff;
}

.opsi-item input[type="radio"] {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: #667eea;
    flex-shrink: 0;
}

.opsi-item input[type="radio"]:checked + span {
    color: #5568d3;
    font-weight: 700;
}

.opsi-item:has(input:checked) {
    border-color: #667eea;
    background: #eef2ff;
    box-shadow: 0 0 0 3px rgba(102,126,234,.12);
}

/* --- Skala --- */
.skala-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skala-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #f7f9fc;
    border: 2px solid #e5eaf0;
    border-radius: 10px;
    cursor: pointer;
    transition: all .15s;
    -webkit-tap-highlight-color: transparent;
}

.skala-item:hover { border-color: #ffc107; background: #fff8e1; }

.skala-item:has(input:checked) {
    border-color: #ffc107;
    background: #fff8e1;
    box-shadow: 0 0 0 3px rgba(255,193,7,.15);
}

.skala-item input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #ffc107;
    flex-shrink: 0;
    margin: 0;
}

.skala-num {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    min-width: 20px;
}

.skala-star {
    font-size: 12px;
    line-height: 1;
}

/* --- Presensi --- */
.presensi-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.presensi-stat {
    background: #f7f9fc;
    border-radius: var(--radius-sm);
    padding: 12px 6px;
    text-align: center;
    border: 1px solid var(--border);
}

.presensi-stat-num {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -.5px;
}
.presensi-stat-warn  { color: var(--warning); }
.presensi-stat-muted { color: var(--text-soft); }

.presensi-stat-lbl {
    font-size: 10px;
    color: var(--text-soft);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.presensi-progress-text {
    font-size: 11px;
    color: var(--text-soft);
    text-align: center;
    margin-top: 8px;
}

/* --- Kartu Panggil --- */
.card-panggil {
    text-align: center;
    background: linear-gradient(160deg, #ffffff 0%, #f4f6fb 100%);
    padding: 22px 18px !important;
}

.panggil-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 12px;
}

.panggil-nama {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.5px;
    line-height: 1.2;
    margin-bottom: 6px;
    word-break: break-word;
    min-height: 34px;
}

.panggil-nama.panggil-pop {
    animation: popIn .35s cubic-bezier(.2,.8,.2,1);
}

@keyframes popIn {
    0%   { transform: scale(.7); opacity: 0; }
    60%  { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); }
}

.panggil-nim {
    font-size: 13px;
    color: var(--text-soft);
    font-family: ui-monospace, monospace;
    margin-bottom: 16px;
    min-height: 18px;
}

.panggil-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.panggil-actions .btn-app {
    flex: 1;
    padding: 14px 10px;
    font-size: 13px;
}

/* Status mahasiswa di presensi */
.mhs-hadir .list-icon { background: #e7f5ec; color: #075E54; }
.mhs-tidak .list-icon { background: #fff8e1; color: #8a6500; }
.mhs-belum .list-icon { background: #f0f0f0; color: #999; }

.mhs-hadir { border-left: 3px solid var(--accent); }
.mhs-tidak { border-left: 3px solid var(--warning); }
.mhs-belum { border-left: 3px solid transparent; }

/* --- Kelas --- */
.kelas-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 12px;
    transition: box-shadow .2s;
}
.kelas-card:hover { box-shadow: var(--shadow-md); }

.kelas-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 8px;
}

.kelas-kode {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 13px;
    font-weight: 800;
    color: var(--primary);
    background: var(--primary-light);
    padding: 3px 10px;
    border-radius: 6px;
    letter-spacing: .3px;
}

.kelas-mhs {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-soft);
    background: #f4f6fb;
    padding: 3px 10px;
    border-radius: 20px;
}

.kelas-nama {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
    line-height: 1.4;
    word-break: break-word;
}

.kelas-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.kelas-link {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #e7f0ff;
    color: #33468c;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 10px;
    transition: background .2s;
    word-break: break-all;
}
.kelas-link:hover { background: #d8e5ff; }

.kelas-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* Preview 8 pertemuan */
.preview-list {
    background: #f7f9fc;
    border-radius: 10px;
    padding: 10px 12px;
    max-height: 220px;
    overflow-y: auto;
    font-size: 12px;
}

.preview-empty {
    color: var(--text-soft);
    font-size: 11px;
    text-align: center;
    padding: 10px 0;
}

.preview-row {
    display: grid;
    grid-template-columns: 24px 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dashed #e5eaf0;
}
.preview-row:last-child { border-bottom: none; }

.preview-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.preview-tgl {
    font-weight: 600;
    color: var(--text);
    font-size: 12px;
}

.preview-waktu {
    font-family: ui-monospace, monospace;
    font-size: 11px;
    color: var(--primary-dark);
    font-weight: 700;
    background: var(--primary-light);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

/* ============================================================
   8. HASIL.PHP — ANALITIK
   ============================================================ */

/* --- Panel pertanyaan --- */
.panel-question {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-left: 4px solid var(--primary);
    position: relative;
}

.q-head-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.q-text-main {
    font-size: 15px;
    color: var(--text);
    line-height: 1.6;
    font-weight: 500;
    word-break: break-word;
}

.btn-export {
    background: #fff;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-export:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102,126,234,.3);
}

/* --- Panel hero --- */
.panel-hero {
    background: linear-gradient(160deg, #ffffff 0%, #f8faff 100%);
}

.donut-fill {
    transition: stroke-dasharray 1.2s cubic-bezier(.2,.8,.2,1);
}

/* --- Rating panel --- */
.panel-rating {
    background: linear-gradient(135deg, #fffdf5 0%, #fff8e1 100%);
    text-align: center;
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 10px;
}

.star {
    font-size: 22px;
    color: #e5e7eb;
    transition: all .3s;
}

.star.filled {
    color: #ffc107;
    text-shadow: 0 2px 8px rgba(255,193,7,.4);
}

/* --- Statistik Hero (donut) --- */
.stat-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
}

.stat-hero-circle {
    position: relative;
    width: 110px;
    height: 110px;
    flex-shrink: 0;
}

.donut {
    width: 100%;
    height: 100%;
}

.stat-hero-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-hero-num {
    font-size: 26px;
    font-weight: 800;
    color: #25D366;
    line-height: 1;
    letter-spacing: -1px;
}

.stat-hero-lbl {
    font-size: 10px;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 2px;
}

.stat-hero-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-hero-row {
    font-size: 13px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-hero-row b {
    color: #222;
    font-weight: 800;
    font-size: 14px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dot-green { background: #25D366; }
.dot-red   { background: #ef4444; }
.dot-gray  { background: #cbd5e0; }

/* --- Kelas Mini Grid --- */
.kelas-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.kelas-mini {
    background: #f7f9fc;
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid #eef1f6;
}

.kelas-mini-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.kelas-mini-kode {
    font-size: 11px;
    font-weight: 800;
    color: #5568d3;
    font-family: ui-monospace, monospace;
    word-break: break-all;
}

.kelas-mini-pct {
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 20px;
}
.kelas-mini-pct.is-done { background: #e7f5ec; color: #075E54; }
.kelas-mini-pct.is-half { background: #fff8e1; color: #8a6500; }
.kelas-mini-pct.is-low  { background: #fef2f2; color: #b91c1c; }

.kelas-mini-sub {
    font-size: 10px;
    color: #888;
    font-weight: 600;
}

/* --- Tabs (App) --- */
.tabs-app {
    display: flex;
    gap: 4px;
    background: #f4f6fb;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 14px;
}

.tab-app {
    flex: 1;
    padding: 10px 8px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    border-radius: 9px;
    cursor: pointer;
    font-family: inherit;
    transition: all .2s;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

.tab-app.active {
    background: #fff;
    color: #667eea;
    box-shadow: 0 2px 6px rgba(20,30,70,.08);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.tab-count {
    display: inline-block;
    background: rgba(102,126,234,.15);
    color: var(--primary-dark);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    margin-left: 4px;
    vertical-align: middle;
}
.tab-app.active .tab-count {
    background: var(--primary);
    color: #fff;
}

/* --- Filter Bar --- */
.filter-row { margin-bottom: 10px; }

.filter-row .field-input {
    padding: 10px 14px;
    font-size: 14px;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.filter-bar .field-input {
    padding: 11px 14px;
    font-size: 13px;
    margin: 0;
}

/* --- WA Broadcast --- */
.wa-global { margin-bottom: 14px; }

.wa-broadcast-info {
    background: #e7f5ec;
    border-left: 4px solid #25D366;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    color: #075E54;
    margin-bottom: 14px;
    font-weight: 600;
}

.wa-broadcast-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #e7f5ec 0%, #f0fdf4 100%);
    border-radius: 12px;
    border: 1px solid #c8e6d3;
    flex-wrap: wrap;
}

.wa-broadcast-bar .wa-broadcast-info {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    font-size: 12px;
}

.wa-actions {
    padding: 12px 14px;
    background: #fafbfd;
    border-bottom: 1px solid #eef1f6;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.wa-warn {
    font-size: 11px;
    color: #b45309;
    background: #fef3c7;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 600;
}

/* --- Kelas Section (Belum Menjawab) --- */
.kelas-section {
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.kelas-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f7f9fc;
    padding: 10px 14px;
    border-bottom: 1px solid #eef1f6;
}

.kelas-section-kode {
    font-size: 12px;
    font-weight: 800;
    color: #667eea;
    font-family: ui-monospace, monospace;
    letter-spacing: .3px;
}

.kelas-section-count {
    font-size: 11px;
    color: #888;
    background: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.empty-kelas {
    padding: 20px 14px;
    text-align: center;
    font-size: 12px;
    color: #16a34a;
    background: #f0fdf4;
    font-weight: 600;
}

/* --- Summary Kelas --- */
.summary-kelas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.summary-kelas-item {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    border-radius: 8px;
    padding: 10px 12px;
    transition: all .2s;
}

.summary-kelas-item.is-done {
    background: #f0fdf4;
    border-left-color: #25D366;
}

.summary-kelas-kode {
    font-size: 12px;
    font-weight: 800;
    color: #b91c1c;
    font-family: ui-monospace, monospace;
    margin-bottom: 2px;
    word-break: break-all;
}

.summary-kelas-item.is-done .summary-kelas-kode { color: #166534; }

.summary-kelas-jml {
    font-size: 11px;
    color: #7f1d1d;
    font-weight: 600;
}

.summary-kelas-item.is-done .summary-kelas-jml { color: #166534; }

/* --- Tabel Belum --- */
.tbl-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tbl-belum {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.tbl-belum thead th {
    background: #fafbfd;
    padding: 8px 10px;
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .4px;
    border-bottom: 1px solid #eef1f6;
    white-space: nowrap;
}

.tbl-belum tbody td {
    padding: 9px 10px;
    border-bottom: 1px solid #f4f6fb;
    color: #222;
    vertical-align: middle;
}

.tbl-belum tbody tr:last-child td { border-bottom: none; }
.tbl-belum tbody tr:nth-child(even) { background: #fafbfd; }

.tbl-nim {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 11px;
    color: #5568d3;
    font-weight: 600;
    white-space: nowrap;
}

.tbl-nama {
    font-weight: 600;
    line-height: 1.4;
    word-break: break-word;
}

/* --- WA Icon Buttons --- */
.wa-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #25D366;
    color: #fff !important;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    transition: background .2s, transform .1s;
    -webkit-tap-highlight-color: transparent;
}
.wa-icon-btn:hover  { background: #1ebe5b; }
.wa-icon-btn:active { transform: scale(.92); }

.wa-icon-disabled {
    color: #ccc;
    font-weight: 700;
}

/* --- Chips Mahasiswa --- */
.mhs-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px;
}

.mhs-chip {
    flex: 1 1 calc(50% - 6px);
    min-width: 140px;
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 10px;
    padding: 8px 10px;
    position: relative;
    transition: all .2s;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 6px;
    animation: chipFadeIn .3s ease backwards;
}

.mhs-chip:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102,126,234,.1);
}

.mhs-chip-name {
    grid-column: 1 / 2;
    font-size: 12px;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mhs-chip-nim {
    grid-column: 1 / 2;
    font-size: 10px;
    color: #888;
    font-family: ui-monospace, monospace;
}

.mhs-chip-wa {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #25D366;
    color: #fff !important;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    transition: all .2s;
    -webkit-tap-highlight-color: transparent;
}

.mhs-chip-wa:hover { background: #1ebe5b; }
.mhs-chip-wa:active { transform: scale(.92); }
.mhs-chip-wa.disabled {
    background: #f0f2f5;
    color: #bbb !important;
    cursor: not-allowed;
}

.mhs-chip-done {
    background: #f9fdfb;
    border-color: #e0f0e7;
}

.mhs-chip-pending {
    background: #fffaf5;
    border-color: #fde8d0;
}
.mhs-chip-pending:hover {
    border-color: #f59e0b;
    box-shadow: 0 2px 8px rgba(245,158,11,.15);
}

.mhs-chip-jawaban {
    grid-column: 1 / 3;
    font-size: 10px;
    color: #075E54;
    background: #e7f5ec;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.mhs-chip-time {
    grid-column: 1 / 3;
    font-size: 9px;
    color: #999;
    text-align: right;
    font-family: ui-monospace, monospace;
}

.mhs-chips .mhs-chip:nth-child(1) { animation-delay: .02s; }
.mhs-chips .mhs-chip:nth-child(2) { animation-delay: .04s; }
.mhs-chips .mhs-chip:nth-child(3) { animation-delay: .06s; }
.mhs-chips .mhs-chip:nth-child(4) { animation-delay: .08s; }
.mhs-chips .mhs-chip:nth-child(5) { animation-delay: .10s; }
.mhs-chips .mhs-chip:nth-child(6) { animation-delay: .12s; }

@keyframes chipFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Jawaban Grouping --- */
.jawaban-group {
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.jawaban-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 8px;
    background: linear-gradient(135deg, #f0fdf4, #f7fdf9);
}

.jawaban-label {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.jawaban-label::before {
    content: '';
    width: 4px;
    height: 20px;
    border-radius: 2px;
    background: linear-gradient(180deg, #25D366, #128C7E);
    flex-shrink: 0;
}

.jawaban-label-text {
    font-size: 14px;
    font-weight: 800;
    color: #075E54;
    word-break: break-word;
    line-height: 1.3;
}

.jawaban-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.jawaban-count {
    font-size: 12px;
    font-weight: 800;
    color: #075E54;
    background: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.jawaban-pct {
    font-size: 10px;
    color: #4a7c6a;
    font-weight: 700;
    font-family: ui-monospace, monospace;
}

.jawaban-group .progress-mini {
    margin: 0 14px 8px;
    border-radius: 2px;
}

.jawaban-group .mhs-chips {
    padding: 8px 12px 12px;
    border-top: 1px dashed #e5eaf0;
}

.jawaban-group .mhs-chip {
    flex: 1 1 calc(50% - 6px);
    min-width: 130px;
    padding: 6px 10px;
    background: #fafbfd;
    border-color: #f0f2f5;
}

.jawaban-group .mhs-chip-name {
    font-size: 11px;
    font-weight: 700;
}

.jawaban-group .mhs-chip-nim {
    font-size: 9px;
}

.jawaban-group .mhs-chip-time {
    font-size: 9px;
    text-align: left;
    margin-top: 2px;
    opacity: 0.7;
}

/* --- Word Cloud --- */
.word-cloud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 14px;
    padding: 18px 12px;
    background: linear-gradient(135deg, #f9fafc, #eef2f7);
    border-radius: 12px;
    min-height: 180px;
    line-height: 1.2;
}

.wc-word {
    font-weight: 700;
    transition: transform .2s, background .2s;
    cursor: default;
    padding: 2px 4px;
    border-radius: 4px;
}
.wc-word:hover {
    transform: scale(1.15);
    background: rgba(255,255,255,.6);
}

/* --- Chart --- */
.chart-wrap {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding: 10px 0;
}

/* --- Big Rating --- */
.big-rating {
    text-align: center;
    padding: 20px 10px;
}
.big-rating-num {
    font-size: 56px;
    font-weight: 800;
    color: #ffc107;
    line-height: 1;
    letter-spacing: -2px;
}
.big-rating-sub {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
    font-weight: 500;
}

/* --- MHS Rows (legacy) --- */
.mhs-row {
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
}
.mhs-row:last-child { border-bottom: none; }

.mhs-info { width: 100%; }

.mhs-name {
    font-size: 14px;
    font-weight: 700;
    color: #222;
    margin-bottom: 3px;
    word-break: break-word;
}

.mhs-nim {
    font-size: 11px;
    color: #888;
    font-family: ui-monospace, monospace;
    margin-bottom: 6px;
}

.mhs-jawaban {
    font-size: 13px;
    color: #333;
    line-height: 1.5;
    background: #f7f9fc;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 4px;
    word-break: break-word;
}
.mhs-jawaban.muted {
    background: transparent;
    color: #999;
    font-style: italic;
    padding: 4px 0;
}

.mhs-time {
    font-size: 10px;
    color: #999;
    font-style: italic;
}

.mhs-answered { opacity: 1; }
.mhs-pending  { opacity: .8; }

/* --- Mini Bars --- */
.mini-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 10px 0;
    padding: 10px 12px;
    background: #f7f9fc;
    border-radius: 8px;
}

.mini-bar-row {
    display: grid;
    grid-template-columns: 90px 1fr 36px;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.mini-bar-label {
    color: #555;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-bar-track {
    height: 6px;
    background: #e5eaf0;
    border-radius: 3px;
    overflow: hidden;
}

.mini-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width .4s ease;
}

.mini-bar-pct {
    color: #667eea;
    font-weight: 700;
    text-align: right;
    font-size: 11px;
}

.esai-summary,
.skala-summary {
    background: #f0fdf4;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: #075E54;
    margin: 8px 0;
    font-weight: 600;
}

/* ============================================================
   9. MODAL JAWABAN ESAI (Hasil.php)
   ============================================================ */

.mhs-chip-esai {
    cursor: pointer;
    transition: all .2s;
}
.mhs-chip-esai:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37,211,102,.15);
    border-color: var(--accent);
}
.mhs-chip-esai .mhs-chip-jawaban { cursor: pointer; }

.sheet-modal {
    max-width: 500px;
    margin: auto;
    border-radius: 20px;
    max-height: 85vh;
    position: relative;
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
}

.modal-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.4;
    flex: 1;
}

.modal-title small {
    display: block;
    font-size: 11px;
    color: var(--text-soft);
    font-weight: 500;
    margin-top: 2px;
    font-family: ui-monospace, monospace;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f4f6fb;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-soft);
    flex-shrink: 0;
    transition: all .2s;
}
.modal-close:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.modal-body {
    background: #f7f9fc;
    border-radius: 12px;
    padding: 16px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 50vh;
    overflow-y: auto;
    margin-bottom: 14px;
    border-left: 3px solid var(--accent);
}

.modal-foot {
    display: flex;
    gap: 8px;
}

.modal-foot .btn-app { flex: 1; }

/* ============================================================
   10. TOAST
   ============================================================ */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text);
    color: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    z-index: 9999;
    opacity: 0;
    transition: all .3s cubic-bezier(.2,.8,.2,1);
    display: flex;
    align-items: center;
    gap: 8px;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast.success { background: var(--accent); }
.toast.error   { background: var(--danger); }

/* ============================================================
   11. SEARCH HIDDEN (untuk filter)
   ============================================================ */
.mhs-chip.search-hidden { display: none !important; }
.kelas-section.search-hidden,
.jawaban-group.search-hidden { display: none !important; }

/* ============================================================
   12. LEGACY — STATISTIK GRID & DASHBOARD DOSEN LAMA
   ============================================================ */
.stats-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 14px !important;
}

.stat-box {
    text-align: center;
    padding: 10px 4px;
    background: #f7f9fc;
    border-radius: 10px;
}

.stat-num {
    font-size: 22px;
    font-weight: 800;
    color: #667eea;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 10px;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.dash-header-dosen {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
}

.btn-back-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    max-width: 560px;
    margin: 16px auto 0;
    padding: 13px;
    background: #fff;
    color: var(--text-soft);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all .2s;
}
.btn-back-wa:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

/* ============================================================
   13. RESPONSIVE
   ============================================================ */

/* Tablet */
@media (min-width: 600px) {
    .app-content { padding-left: 20px; padding-right: 20px; }
}

/* HP kecil */
@media (max-width: 480px) {
    .mhs-chip { flex: 1 1 100%; }
    .stat-hero { gap: 14px; }
    .stat-hero-circle { width: 90px; height: 90px; }
    .stat-hero-num { font-size: 20px; }
    .kelas-mini-grid { grid-template-columns: repeat(2, 1fr); }

    .tbl-belum { font-size: 11px; }
    .tbl-belum thead th { padding: 6px 8px; font-size: 9px; }
    .tbl-belum tbody td { padding: 8px; }
    .tbl-nim { font-size: 10px; }
    .summary-kelas { grid-template-columns: repeat(2, 1fr); }

    .filter-bar { grid-template-columns: 1fr; }
}

/* HP sangat kecil */
@media (max-width: 380px) {
    .card { padding: 22px 18px; border-radius: 14px; }
    h1 { font-size: 18px; }
    p.sub { font-size: 12px; margin-bottom: 18px; }
    .row-label { min-width: 58px; font-size: 10px; }
    .row-value { font-size: 12px; }
    .btn { font-size: 14px; padding: 13px; }

    .mini-bar-row { grid-template-columns: 70px 1fr 32px; font-size: 10px; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .stat-num { font-size: 18px; }
    .stat-label { font-size: 9px; }
    .big-rating-num { font-size: 44px; }

    .app-header-logo { font-size: 40px; }
    .app-header-title { font-size: 24px; }
    .login-wrap { padding: 8px 14px 16px; }

    .btn-inline { display: flex; width: 100%; justify-content: center; margin: 6px 0 0; }
    .contact-name { font-size: 14px; }
    .avatar { width: 46px; height: 46px; font-size: 20px; }

    .panggil-nama { font-size: 22px; }
    .presensi-stat-num { font-size: 18px; }
    .presensi-stat-lbl { font-size: 9px; }
    .panggil-actions .btn-app { font-size: 12px; padding: 12px 8px; }

    .kelas-kode { font-size: 12px; }
    .kelas-nama { font-size: 13px; }
    .preview-row { grid-template-columns: 20px 1fr auto; gap: 6px; }
    .preview-tgl { font-size: 11px; }
    .preview-waktu { font-size: 10px; }

    .jawaban-group .mhs-chip { flex: 1 1 100%; min-width: 0; }
    .jawaban-label-text { font-size: 13px; }
}

/* Layar pendek */
@media (max-height: 640px) {
    body.bg-login,
    body.bg-aktivasi,
    body.bg-kirim {
        align-items: flex-start;
        padding-top: 20px;
    }
}