:root {
    --bg-base: #0f172a; 
    --bg-panel: rgba(30, 41, 59, 0.7);
    --bg-panel-hover: rgba(51, 65, 85, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #6366f1; 
    --primary-hover: #4f46e5;
    --secondary: #334155;
    --secondary-hover: #475569;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --font-sans: 'Inter', sans-serif;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-glass: 0 4px 30px rgba(0, 0, 0, 0.1);
    --backdrop-blur: blur(12px);
}

:root.light-theme {
    --bg-base: #f1f5f9; 
    --bg-panel: rgba(255, 255, 255, 0.8);
    --bg-panel-hover: rgba(241, 245, 249, 0.9);
    --border-color: rgba(0, 0, 0, 0.1);
    --text-main: #0f172a;
    --text-muted: #475569;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #e2e8f0;
    --secondary-hover: #cbd5e1;
    --shadow-glass: 0 4px 20px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-image: radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.1), transparent 25%), radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.05), transparent 25%);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.glass {
    background: var(--bg-panel);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glass);
    transition: background 0.3s ease, border-color 0.3s ease;
}

/* Light Theme Overrides */
:root.light-theme .text-danger { color: #dc2626 !important; }
:root.light-theme .btn-secondary { background: var(--secondary); color: var(--text-main); }
:root.light-theme .btn-secondary:hover { background: var(--secondary-hover); }
:root.light-theme .titlebar { background: rgba(241, 245, 249, 0.9); border-bottom: 1px solid var(--border-color); color: var(--text-main); }
:root.light-theme .titlebar-btn { color: var(--text-main); }
:root.light-theme .titlebar-btn:hover { background: rgba(0,0,0,0.05); }
:root.light-theme .sidebar { background: rgba(255, 255, 255, 0.6); }
:root.light-theme .menu-item:hover { background: rgba(0,0,0,0.05); }
:root.light-theme .menu-item.active { background: var(--primary); color: white; }
:root.light-theme select, :root.light-theme input, :root.light-theme textarea, :root.light-theme .search-box { background: rgba(255,255,255,0.7); color: var(--text-main); }
:root.light-theme select option { background: #fff; color: var(--text-main); }
:root.light-theme .data-table tbody tr:hover { background: rgba(0,0,0,0.03); }
:root.light-theme .activity-list li { background: rgba(0,0,0,0.02); }
:root.light-theme .team-progress-bar { background: rgba(0,0,0,0.1); }
:root.light-theme .circular-progress::before { background-color: var(--bg-base); }

/* Titlebar */
.titlebar {
    height: 38px; background: rgba(15, 23, 42, 0.9);
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border-color);
    user-select: none; z-index: 9999;
}
.titlebar-drag-region { -webkit-app-region: drag; flex: 1; height: 100%; display: flex; align-items: center; padding-left: 16px; }
.titlebar-logo { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.titlebar-logo i { color: var(--primary); }
.titlebar-controls { display: flex; -webkit-app-region: no-drag; }
.titlebar-btn {
    background: transparent; border: none; color: var(--text-muted);
    width: 46px; height: 38px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.2s;
}
.titlebar-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-main); }
.titlebar-btn.btn-close:hover { background: var(--danger); color: white; }

.app-container { display: flex; flex: 1; overflow: hidden; }

/* Sidebar */
.sidebar {
    width: 250px; background: rgba(15, 23, 42, 0.6);
    border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column; justify-content: space-between; padding: 24px 16px;
    transition: background 0.3s ease;
}
.sidebar-menu { display: flex; flex-direction: column; gap: 8px; }
.menu-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 12px; padding-left: 12px; font-weight: 600; }
.menu-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    border-radius: var(--radius-sm); background: transparent; border: none;
    color: var(--text-muted); font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.3s ease; text-align: left;
}
.menu-item i { font-size: 20px; }
.menu-item:hover { background: var(--bg-panel-hover); color: var(--text-main); }
.menu-item.active { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); }
.text-danger { color: #fca5a5 !important; }
.text-danger:hover { background: rgba(239, 68, 68, 0.1) !important; color: var(--danger) !important; }

.main-content { flex: 1; padding: 32px; overflow-y: auto; position: relative; }
.tab-pane { display: none; animation: fadeIn 0.3s ease; }
.tab-pane.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.page-header { margin-bottom: 32px; }
.page-header h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.page-header .subtitle { color: var(--text-muted); margin-top: 4px; font-size: 14px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-secondary { background: var(--secondary); color: white; }
.btn-secondary:hover { background: var(--secondary-hover); }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #d97706; }
.btn-danger { background: var(--danger); color: white; }
.btn-icon { background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 4px; transition: 0.2s; font-size: 18px; }
.btn-icon:hover { background: rgba(128,128,128,0.2); color: var(--text-main); }
.action-btn { font-size: 18px; padding: 6px; }

/* Dashboard Grid & Cards */
.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card { display: flex; align-items: center; padding: 20px; gap: 16px; transition: transform 0.3s; }
.stat-card:hover { transform: translateY(-3px); }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: white; }
.bg-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.bg-green { background: linear-gradient(135deg, #10b981, #059669); }
.bg-orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.bg-red { background: linear-gradient(135deg, #ef4444, #dc2626); }

.stat-info h3 { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600;}
.stat-info p { font-size: 28px; font-weight: 700; margin-top: 4px; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; }
.card { padding: 24px; }
.card h2 { font-size: 16px; margin-bottom: 20px; color: var(--text-muted); border-bottom: 1px solid var(--border-color); padding-bottom: 12px;}

.progress-container { display: flex; justify-content: center; margin-top: 20px; }
.circular-progress { position: relative; width: 140px; height: 140px; border-radius: 50%; background: conic-gradient(var(--primary) 0%, var(--bg-panel-hover) 0%); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 20px rgba(0,0,0,0.1); }
.circular-progress::before { content: ""; position: absolute; width: 116px; height: 116px; border-radius: 50%; background-color: var(--bg-base); transition: background-color 0.3s ease; }
.progress-value { position: relative; font-size: 32px; font-weight: 700; color: var(--text-main); }

.activity-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.activity-list li { padding: 12px 16px; background: rgba(128,128,128,0.05); border-radius: var(--radius-sm); display: flex; align-items: center; gap: 12px; font-size: 14px; border-left: 3px solid var(--primary); }
.activity-list li.rev-act { border-left-color: var(--warning); }
.activity-list li.done-act { border-left-color: var(--success); }
.activity-list .time { color: var(--text-muted); font-size: 12px; margin-left: auto; }
.empty-state { color: var(--text-muted); font-style: italic; border: none !important; background: transparent !important;}

/* Filter Bar */
.filter-bar { display: flex; justify-content: space-between; padding: 16px; margin-bottom: 24px; gap: 16px; }
.search-box { display: flex; align-items: center; background: rgba(128,128,128,0.1); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 8px 12px; width: 300px; transition: background 0.3s ease; }
.search-box i { color: var(--text-muted); margin-right: 8px; }
.search-box input { background: transparent; border: none; color: inherit; outline: none; width: 100%; font-family: inherit; }
.filter-selects { display: flex; gap: 12px; }
select, input[type="text"], input[type="number"], input[type="date"], textarea {
    background: rgba(128,128,128,0.1); border: 1px solid var(--border-color); color: inherit;
    padding: 8px 12px; border-radius: var(--radius-sm); outline: none; font-family: inherit;
    transition: background 0.3s ease, color 0.3s ease;
}
select option { background: var(--bg-base); color: var(--text-main); }

/* Tables */
.table-container { overflow-x: auto; padding: 8px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border-color); }
.data-table th { color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: 0.05em; }
.data-table tbody tr { transition: background 0.2s; }
.data-table tbody tr:hover { background: rgba(128,128,128,0.05); }

/* Badges */
.badge { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.bg-status-belum { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }
.bg-status-proses { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.bg-status-revisi { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.bg-status-selesai { background: rgba(16, 185, 129, 0.2); color: #34d399; }
:root.light-theme .bg-status-belum { color: #64748b; background: rgba(100,116,139,0.1); }
:root.light-theme .bg-status-proses { color: #2563eb; background: rgba(37,99,235,0.1); }
:root.light-theme .bg-status-revisi { color: #d97706; background: rgba(217,119,6,0.1); }
:root.light-theme .bg-status-selesai { color: #059669; background: rgba(5,150,105,0.1); }

.bg-sev-minor { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.bg-sev-mayor { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.bg-sev-kritis { background: rgba(239, 68, 68, 0.2); color: #f87171; }
:root.light-theme .bg-sev-minor { color: #2563eb; background: rgba(37,99,235,0.1); }
:root.light-theme .bg-sev-mayor { color: #d97706; background: rgba(217,119,6,0.1); }
:root.light-theme .bg-sev-kritis { color: #dc2626; background: rgba(220,38,38,0.1); }

/* Database Status Badge */
.db-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.db-status-badge.online {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.db-status-badge.offline {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.db-status-badge:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

/* Teams Grid */
.teams-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.team-card { padding: 20px; }
.team-card h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 16px; border-bottom: 1px solid var(--border-color); padding-bottom: 12px;}
.team-stats { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px;}
.team-progress-bar { width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; margin-bottom: 16px;}
.team-progress-fill { height: 100%; background: var(--primary); width: 0%; transition: width 0.5s; }
.team-parts-list { font-size: 13px; color: var(--text-muted); list-style: inside; }

/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); display: none; justify-content: center; align-items: center; z-index: 1000; }
.modal-overlay.active { display: flex; animation: fadeIn 0.2s ease; }
.modal { width: 100%; max-width: 550px; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border-color); }
.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.form-group input, .form-group select, .form-group textarea { width: 100%; }
.input-readonly { background: rgba(128,128,128,0.2) !important; color: var(--text-muted) !important; cursor: not-allowed; }
.modal-footer { padding-top: 16px; border-top: 1px solid var(--border-color); display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px;}

/* Toasts */
.toast-container { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 1100; }
.toast { background: var(--bg-panel); border: 1px solid var(--border-color); padding: 12px 20px; border-radius: var(--radius-sm); box-shadow: 0 10px 25px rgba(0,0,0,0.2); display: flex; align-items: center; gap: 12px; transform: translateX(120%); animation: slideIn 0.3s forwards; }
.toast.hide { animation: slideOut 0.3s forwards; }
@keyframes slideIn { to { transform: translateX(0); } }
@keyframes slideOut { to { transform: translateX(120%); opacity: 0; } }

/* Checklist Component styles */
.checklist-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: rgba(128,128,128,0.05); border-radius: var(--radius-sm); margin-bottom: 8px; }
.checklist-left { display: flex; align-items: center; gap: 12px; }
.check-toggle { cursor: pointer; width: 20px; height: 20px; border-radius: 4px; border: 2px solid var(--primary); display: flex; align-items: center; justify-content: center; font-size: 14px; color: transparent; transition: all 0.2s;}
.check-toggle.checked { background: var(--primary); color: white; }
.checklist-item-title { font-size: 14px; font-weight: 500; }
.checklist-item-qty { font-size: 12px; color: var(--text-muted); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(128,128,128,0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(128,128,128,0.5); }

/* Tampilan HP: menu jadi bar horizontal di atas, isi halaman terlihat penuh */
@media (max-width: 768px) {
    .app-container { flex-direction: column !important; height: auto !important; min-height: 100vh; }
    .sidebar { width: 100%; flex-direction: column; gap: 10px; padding: 12px; border-right: 0; border-bottom: 1px solid var(--border-color); }
    .sidebar-menu { flex-direction: row; flex-wrap: nowrap; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
    .sidebar-menu .menu-label { display: none; }
    .menu-item { white-space: nowrap; padding: 10px 12px; font-size: 13px; }
    .sidebar-footer { flex-direction: row; flex-wrap: wrap; gap: 6px; }
    .main-content { padding: 16px; overflow: visible; }
}

/* ===== Tema seragam dengan aplikasi Bekalista (terang, navy, hijau) ===== */
:root, :root.light-theme {
    --bg-base: #f7f9fa; --bg-panel: #ffffff; --bg-panel-hover: #f3f6f7;
    --border-color: #edf1f2; --text-main: #14232d; --text-muted: #82909a;
    --primary: #27b879; --primary-hover: #1f9e66; --secondary: #e9eef0; --secondary-hover: #dde4e7;
    --font-sans: 'DM Sans', sans-serif; --radius-sm: 8px;
}
body { background: var(--bg-base); color: var(--text-main); font-family: 'DM Sans', sans-serif; }
h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; }
.titlebar { display: none !important; }
.sidebar, :root.light-theme .sidebar { background: #112b3b !important; border-right: 0; color: #fff; }
.sidebar .menu-label, .menu-label { color: #71909b; }
.menu-item, :root.light-theme .menu-item { color: #a6bac1; }
.menu-item:hover, :root.light-theme .menu-item:hover { background: #1e4658; color: #fff; }
.menu-item.active, :root.light-theme .menu-item.active { background: #1e4658; color: #fff; box-shadow: inset 3px 0 #27b879; }
.card, .glass, .stat-card { background: #fff !important; border: 1px solid #edf1f2 !important; box-shadow: none !important; backdrop-filter: none; border-radius: 9px; }
.stat-card:hover { transform: none; }
.card h2 { color: var(--text-main); border-bottom-color: #edf1f2; }
.btn-primary { background: #27b879; }
.btn-primary:hover { background: #1f9e66; }

/* ===== Tata letak seperti Bekalista ===== */
.sidebar { width: 250px; padding: 28px 17px; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 12px 34px; }
.brand-mark { width: 35px; height: 35px; border-radius: 10px; background: #31c98a; color: #0d3a32; font: 700 12px 'Space Grotesk', sans-serif; display: grid; place-items: center; flex-shrink: 0; }
.brand strong { display: block; font: 700 19px 'Space Grotesk', sans-serif; letter-spacing: -.5px; color: #fff; }
.brand span { display: block; font-size: 8px; letter-spacing: 1.5px; color: #87a0aa; }
.sidebar .menu-label { font-size: 9px; letter-spacing: 1.5px; margin: 0 12px 12px; padding-left: 0; font-weight: 700; }
.sidebar .menu-item { font-size: 13px; padding: 12px 13px; border-radius: 8px; margin: 3px 0; gap: 13px; }
.sidebar .menu-item i { font-size: 17px; width: 17px; text-align: center; }
.sidebar-footer { border-top: 1px solid #1e4658; padding-top: 14px; }
.main-content { padding: 37px 42px 23px; background: var(--bg-base); }
.page-header { margin-bottom: 26px; align-items: flex-start; }
.page-header .eyebrow-line { color: #9aa8b0; font-size: 10px; font-weight: 700; letter-spacing: 1.4px; margin-bottom: 8px; }
.page-header h1 { font: 700 27px 'Space Grotesk', sans-serif; letter-spacing: -1px; margin: 0; color: var(--text-main); }
.page-header .subtitle { color: var(--text-muted); font-size: 12px; margin: 7px 0 0; }
.target-box { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #edf1f2; padding: 8px 14px; border-radius: 9px; }
.target-box input { border: 1px solid #e5ecee; border-radius: 5px; padding: 6px; }
.dashboard-stats { gap: 16px; }
.stat-card { min-height: 118px; padding: 20px; }
.stat-card .stat-info h3 { font: 500 11px 'DM Sans', sans-serif; color: #7e8d95; margin: 0 0 6px; text-transform: none; letter-spacing: 0; }
.stat-card .stat-info p { font: 700 25px 'Space Grotesk', sans-serif; margin: 0; color: var(--text-main); }
.stat-icon { width: 36px; height: 36px; border-radius: 9px; font-size: 18px; }
.stat-icon.bg-blue { background: #e9f3ff; color: #3b82f6; }
.stat-icon.bg-green { background: #e9f9f2; color: #27b879; }
.stat-icon.bg-orange { background: #fff6e8; color: #eea943; }
.stat-icon.bg-red { background: #fff0ef; color: #ed6c67; }
.stat-icon.bg-blue, .stat-icon.bg-green, .stat-icon.bg-orange, .stat-icon.bg-red { background-image: none; }
.card { border-radius: 9px; }
.card h2 { font: 600 15px 'Space Grotesk', sans-serif; }
.db-status-badge { border-radius: 20px; font-size: 11px; font-weight: 600; }
@media (max-width: 768px) {
    .main-content { padding: 18px 14px; }
    .page-header { flex-direction: column; gap: 12px; }
    .page-header h1 { font-size: 22px; }
    .target-box { flex-wrap: wrap; width: 100%; }
}
.stat-card .stat-info p { font-size: 22px; white-space: nowrap; }
.back-link { display: block; margin: 0 12px 22px; font-size: 12px; color: #7fe0b4; text-decoration: none; } .back-link:hover { text-decoration: underline; }

/* ===== Rapikan tampilan HP ===== */
@media (max-width: 768px) {
    .main-content { overflow-x: hidden; padding: 16px 12px; }
    .page-header { flex-direction: column; align-items: stretch; gap: 12px; }
    .page-header > div:last-child { flex-wrap: wrap; width: 100%; gap: 8px; }
    .page-header > div:last-child > div { flex-wrap: wrap; width: 100%; justify-content: space-between; }
    .page-header > div:last-child > div input { width: 60px !important; }
    .dashboard-stats { grid-template-columns: 1fr 1fr !important; gap: 10px; }
    .stat-card { min-height: 98px; padding: 14px; }
    .stat-card .stat-info p { font-size: 18px; }
    .stat-card .stat-info h3 { font-size: 10px; }
    .card { padding: 16px; }
    .sidebar .brand { padding-bottom: 12px; }
    .back-link { margin-bottom: 12px; }
    .sidebar-footer { display: flex; flex-wrap: wrap; gap: 6px; }
    .sidebar-footer .menu-item { font-size: 12px; padding: 8px 10px; }
}
@media (max-width: 768px) { .sidebar .brand { display: none; } .sidebar { padding: 12px; } .sidebar .menu-label { display: none; } .back-link { margin: 0 0 8px; } }

/* Menu HP: sidebar tersembunyi, dibuka lewat tombol Menu */
.pk-menu-btn { display: none; }
@media (max-width: 768px) {
    .pk-menu-btn { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; margin-bottom: 14px; padding: 10px 14px; border: 0; border-radius: 8px; background: #112b3b; color: #fff; font: 600 13px 'DM Sans', sans-serif; cursor: pointer; }
    .app-container { flex-direction: column !important; }
    .sidebar { display: none !important; }
    .sidebar.open { display: flex !important; position: fixed; inset: 0; z-index: 100; width: 100%; overflow-y: auto; flex-direction: column; }
    .sidebar.open .sidebar-menu { flex-direction: column; overflow: visible; }
    .sidebar.open .brand { display: flex; }
    .sidebar.open .menu-label { display: block; }
    .sidebar.open .menu-item { font-size: 15px; padding: 14px; }
}

/* Mobile rapi: satu kolom, tanpa geser kiri-kanan */
@media (max-width: 768px) {
    html, body { overflow-x: hidden; }
    .dashboard-grid, .teams-grid { grid-template-columns: 1fr !important; }
    #dashboard-part-progress { grid-template-columns: 1fr !important; }
    .dashboard-stats { grid-template-columns: 1fr 1fr !important; }
    .card, .stat-card { min-width: 0; overflow: hidden; }
    .data-table { table-layout: fixed; width: 100%; }
    .data-table th, .data-table td { word-break: break-word; font-size: 12px; padding: 6px 4px; }
    .main-content { font-size: 14px; }
}
@media (max-width: 768px) { .filter-selects { flex-wrap: wrap; width: 100%; } .filter-selects select, .filter-selects input { min-width: 0; max-width: 100%; flex: 1 1 140px; } .filter-bar { flex-wrap: wrap; } }

/* Tabel jadi kartu di HP: tanpa geser kiri-kanan */
@media (max-width: 768px) {
    .data-table thead { display: none; }
    .data-table, .data-table tbody { display: block; width: 100%; }
    .data-table tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; margin-bottom: 12px; border: 1px solid #edf1f2; border-radius: 9px; background: #fff; }
    .data-table tbody tr td { display: block; border: 0; padding: 0; text-align: left !important; }
    .data-table tbody tr td:nth-child(1) { grid-column: 1 / -1; font-weight: 600; font-size: 14px; }
    .data-table tbody tr td:nth-child(2) { grid-column: 1 / -1; }
    .data-table tbody tr td:nth-child(2) select { width: 100%; }
    .data-table tbody tr td:nth-child(3) { grid-column: 1 / -1; }
    .data-table tbody tr td:last-child { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 6px; }
    .data-table tbody tr td[colspan] { grid-column: 1 / -1; }
    .data-table tbody tr td > div { flex-wrap: wrap; }
}

/* Pembeda data genap/ganjil dan tombol + - lebih besar (HP) */
@media (max-width: 768px) {
    .data-table tbody tr:nth-child(odd) { background: #ffffff; border-left: 5px solid #27b879; }
    .data-table tbody tr:nth-child(even) { background: #eef6f2; border-left: 5px solid #112b3b; }
    .data-table tbody tr td .btn-icon { min-width: 40px !important; min-height: 40px !important; padding: 6px !important; font-size: 16px !important; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: #fff; border: 1px solid #d8e3e0; }
    .data-table tbody tr td .btn-icon i { font-size: 20px !important; }
    .data-table tbody tr td .btn-icon.text-danger { color: #e45f5a !important; }
    .data-table tbody tr td > div > div { gap: 8px !important; }
    .data-table tbody tr td span[style*="font-weight:bold"] { font-size: 16px !important; min-width: 28px !important; }
}

/* ===== Pilihan tampilan Kartu / Daftar + dropdown rapi ===== */
.view-switch-wrap { display: none; }
.view-switch { display: inline-flex; background: #e9eef0; border-radius: 10px; padding: 4px; gap: 4px; margin-bottom: 14px; }
.view-switch button { border: 0; background: transparent; color: #5b6b73; padding: 9px 14px; border-radius: 7px; font: 600 13px 'DM Sans', sans-serif; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.view-switch button.active { background: #fff; color: #112b3b; box-shadow: 0 1px 3px #0001; }
.view-switch button i { font-size: 16px; }
select, .select-inline-team { min-height: 44px; border: 1px solid #d8e3e0; border-radius: 10px; padding: 10px 36px 10px 12px; background-color: #fff; font-size: 15px; color: #14232d; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23112b3b' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
@media (max-width: 768px) {
    .view-switch-wrap { display: block; }
    body.view-list .data-table tbody tr { grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 12px; }
    body.view-list .data-table tbody tr td { display: none; }
    body.view-list .data-table tbody tr td:first-child { display: block; grid-column: 1; font-size: 15px; }
    body.view-list .data-table tbody tr td:last-child { display: flex; grid-column: 2; }
    body.view-list .data-table tbody tr td:last-child .btn-icon { display: none; }
    body.view-list .data-table tbody tr td:last-child .btn-icon[title*="Edit"] { display: inline-flex; }
    body.view-list .data-table tbody tr td:first-child .inline-edit-name i { display: none; }
}

/* Kinerja Tim: mode Daftar ringkas */
@media (max-width: 768px) {
    body.view-list .team-card { padding: 12px; margin-bottom: 10px; }
    body.view-list .team-card > p,
    body.view-list .team-card > ul,
    body.view-list .team-card > .team-progress-bar,
    body.view-list .team-card > div:nth-child(2),
    body.view-list .team-card > div[style*="background:rgba"] { display: none; }
    body.view-list .team-card > div:first-child { margin-bottom: 6px !important; }
    body.view-list .team-card .team-stats { font-size: 12px; }
    body.view-list .team-card > div:last-child { justify-content: flex-start !important; }
}

/* ===== RAB & HPP ===== */
.rab-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; padding: 14px; }
.rab-toolbar input, .rab-toolbar select { flex: 1 1 200px; min-height: 40px; padding: 8px 12px; border: 1px solid #d8e3e0; border-radius: 8px; background: #fff; color: var(--text-main); font-size: 14px; }
.rab-section-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.rab-section-head h2 { margin: 0; font-size: 15px; }
.rab-sub { font-size: 12px; color: var(--text-muted); }
.rab-status { font-size: 12px; }
#tab-rab .data-table td { vertical-align: top; }

.rab-bar-row { margin-bottom: 14px; }
.rab-bar-label { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 6px; }
.rab-bar { height: 10px; background: #eef2f1; border-radius: 6px; overflow: hidden; }
.rab-bar i { display: block; height: 100%; background: linear-gradient(90deg, #27b879, #1f9e66); border-radius: 6px; }
.rab-bar-pct { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
@media print {
    .sidebar, .mobile-nav, .mobile-menu, .pk-menu-btn, .view-switch-wrap, .rab-toolbar, button, .menu-backdrop { display: none !important; }
    .app-container { display: block !important; }
    .main-content { padding: 0 !important; overflow: visible !important; }
    body { background: #fff !important; }
    .card, .stat-card { break-inside: avoid; }
}

/* ===== HP: tidak ada data terpotong ===== */
@media (max-width: 768px) {
    body.view-list .data-table tbody tr td.cell-no { display: none !important; }
    body.view-list .data-table tbody tr td.cell-name { display: block; grid-column: 1; font-size: 15px; }
    .data-table tbody tr td[data-label]::before { content: attr(data-label); display: block; font-size: 10px; color: #82909a; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; }
    body.view-list .data-table tbody tr td[data-label]::before { content: none; }
    .data-table tbody tr td:first-child[data-label]::before { content: none; }
    .stat-card .stat-info p { white-space: normal; font-size: 17px; line-height: 1.25; word-break: break-word; }
    .stat-card .stat-info { min-width: 0; flex: 1; }
    .stat-card { align-items: flex-start; }
    .stat-icon { flex-shrink: 0; }
    .rab-toolbar input, .rab-toolbar select, .rab-toolbar label { width: 100%; }
    .rab-toolbar label input { width: 100px !important; }
}
@media (max-width: 768px) { .stat-card { flex-direction: column !important; align-items: flex-start !important; gap: 6px; min-height: 96px; } .stat-card .stat-info { width: 100%; } .stat-card .stat-info p { font-size: 16px !important; white-space: nowrap !important; overflow: hidden; text-overflow: clip; } .stat-card .stat-info p input { font-size: 16px !important; width: 90px; } }

/* ===== Grafik & checklist becak ===== */
.chart-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.chart-card h2 { margin: 0 0 4px; font-size: 15px; }
.chart-card svg { display: block; margin-top: 8px; }
.donut-wrap { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.chart-legend { flex: 1; min-width: 150px; }
.chart-legend-row { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; }
.chart-legend-row strong { margin-left: auto; }
.chart-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.unit-summary .unit-big { font: 700 30px 'Space Grotesk', sans-serif; color: var(--text-main); }
.unit-summary .unit-big span { font-size: 14px; font-weight: 500; color: var(--text-muted); }
#unitFilter { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 16px; padding: 10px; }
#unitFilter button { border: 1px solid #d8e3e0; background: #fff; border-radius: 20px; padding: 8px 14px; font-size: 13px; cursor: pointer; min-height: 40px; }
#unitFilter button.active { background: #112b3b; color: #fff; border-color: #112b3b; }
.unit-card { margin-bottom: 14px; }
.unit-card.unit-done { border-left: 5px solid #27b879; }
.unit-head { display: flex; justify-content: space-between; align-items: center; cursor: pointer; margin-bottom: 8px; }
.unit-pct { font: 700 20px 'Space Grotesk', sans-serif; color: #27b879; }
.stage-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.stage-row { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 10px; border: 1px solid #d8e3e0; border-radius: 10px; background: #fff; text-align: left; cursor: pointer; font-size: 14px; color: var(--text-main); }
.stage-row.on { background: #e9f9f2; border-color: #27b879; }
.stage-box { font-size: 22px; color: #82909a; line-height: 1; }
.stage-row.on .stage-box { color: #27b879; }
.stage-name { line-height: 1.2; }
.unit-all { width: 100%; min-height: 44px; }
@media (max-width: 768px) {
    .chart-grid { grid-template-columns: 1fr; }
    .stage-list { grid-template-columns: 1fr; }
    .stage-row { min-height: 52px; font-size: 15px; }
    .chart-card svg { font-size: 12px; }
}

/* Kotak Target Produksi di dashboard: angka tidak terhimpit */
.page-header > div:last-child > div[style*="background"] { flex-wrap: wrap; gap: 10px 12px !important; padding: 10px 14px !important; border-radius: 10px; }
.page-header input[type="number"] { width: 78px !important; min-height: 40px; font-size: 16px; font-weight: 700; padding: 6px 8px; border: 1px solid #d8e3e0; border-radius: 8px; text-align: center; background: #fff; }
.page-header > div:last-child > div[style*="background"] button { min-height: 40px; }
@media (max-width: 768px) {
    .page-header > div:last-child > div[style*="background"] { width: 100%; justify-content: space-between; }
    .page-header input[type="number"] { width: 68px !important; }
}

/* Kartu laporan produksi: teks tanggal tidak keluar dari kotak */
#prodReport .dashboard-stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important; }
#prodReport .stat-card { min-width: 0; overflow: hidden; }
#prodReport .stat-card .stat-info { min-width: 0; flex: 1; }
#prodReport .stat-card .stat-info p { font-size: 18px; line-height: 1.25; white-space: normal !important; word-break: break-word; overflow-wrap: anywhere; }

.stage-editor { margin-bottom: 16px; }
.stage-edit-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.stage-edit-row input { flex: 1; min-height: 42px; padding: 8px 12px; border: 1px solid #d8e3e0; border-radius: 8px; font-size: 14px; }
.stage-edit-row button { min-height: 42px; }
.kurang-box { margin-top: 4px; padding: 12px; background: #fff8ec; border: 1px solid #f5dcaa; border-radius: 10px; }
.kurang-title { font-weight: 600; font-size: 14px; color: #a66a12; margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.kurang-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.kurang-chip { background: #fff; border: 1px solid #f0c97a; border-radius: 16px; padding: 5px 6px 5px 12px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.kurang-chip button { border: 0; background: #f5e3c0; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 15px; line-height: 1; }
.kurang-add { display: flex; gap: 8px; }
.kurang-add input { flex: 1; min-height: 42px; padding: 8px 12px; border: 1px solid #d8e3e0; border-radius: 8px; font-size: 14px; }
.kurang-count { color: #c0392b; font-weight: 600; }
@media (max-width: 768px) {
    .kurang-add { flex-direction: column; }
    .kurang-add button { min-height: 44px; }
}
.stage-text { display: flex; flex-direction: column; } .stage-meta { font-size: 11px; color: #6b7a80; margin-top: 2px; }

/* Mode lihat saja (tamu) */
#guestBar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4000; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; background: #112b3b; color: #fff; font-size: 13px; }
#guestBar button { border: 0; border-radius: 8px; background: #27b879; color: #fff; padding: 9px 14px; font-weight: 600; cursor: pointer; min-height: 40px; }
#pkToast { position: fixed; left: 50%; transform: translateX(-50%) translateY(20px); bottom: 70px; background: #14232d; color: #fff; padding: 12px 16px; border-radius: 10px; font-size: 13px; opacity: 0; transition: .25s; z-index: 4500; pointer-events: none; max-width: 90vw; }
#pkToast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
body.pk-guest .main-content .btn-primary, body.pk-guest .main-content .btn-icon, body.pk-guest .main-content .btn-danger, body.pk-guest .main-content .stage-row, body.pk-guest .main-content .unit-all, body.pk-guest .main-content .kurang-add button, body.pk-guest .main-content .stage-editor, body.pk-guest .main-content .admin-form button,
body.pk-guest .main-content .btn-secondary:not(#prodCsv):not(#rabExportBtn):not(#prodPrint),
body.pk-guest .main-content input:not(#rabSearch), body.pk-guest .main-content select:not(#rabFilterSection), body.pk-guest .main-content textarea {
    pointer-events: none; opacity: .75;}
body.pk-guest .main-content { padding-bottom: 80px; }
body.pk-guest .sidebar-menu .menu-item { pointer-events: auto; }
body.pk-guest #unitFilter button { pointer-events: auto !important; opacity: 1 !important; }
body.pk-guest .view-switch button { pointer-events: auto !important; opacity: 1 !important; }

/* Mobile: teks tidak terpotong (boleh turun baris) */
@media (max-width: 768px) {
    .main-content *:not(.stat-card p):not(.stat-card .stat-info p) { white-space: normal !important; text-overflow: clip !important; overflow-wrap: anywhere; }
    .main-content .stat-card p { white-space: nowrap !important; }
    .main-content td, .main-content th { white-space: normal !important; }
    .main-content .rab-bar-label span { overflow-wrap: anywhere; }
}
/* Peta progres becak di dashboard */
.becak-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.becak-tile { border: 1px solid #d8e3e0; border-radius: 10px; padding: 8px 4px; text-align: center; background: #fff; cursor: pointer; font-size: 12px; }
.becak-tile b { display: block; font-size: 14px; }
.becak-tile small { color: #6b7a80; }
.becak-tile.t0 { background: #fff; }
.becak-tile.t1 { background: #f1fbf6; }
.becak-tile.t2 { background: #d7f3e5; }
.becak-tile.t3 { background: #9fe3c0; }
.becak-tile.t4 { background: #27b879; color: #fff; }
.becak-tile.t4 small { color: #eaf8f1; }
#unitSearch { flex: 1 1 200px; min-height: 40px; padding: 8px 12px; border: 1px solid #d8e3e0; border-radius: 8px; font-size: 14px; }

/* Mode lihat saja: pojok kanan atas, kecil */
#guestBar { top: 8px !important; bottom: auto !important; left: auto !important; right: 8px !important; padding: 5px 6px 5px 10px !important; gap: 8px !important; font-size: 11px !important; border-radius: 20px; box-shadow: 0 2px 8px #0003; flex-wrap: nowrap !important; width: auto !important; }
#guestBar button { min-height: 30px !important; padding: 5px 10px !important; font-size: 11px !important; border-radius: 14px !important; }
#guestBar span { white-space: nowrap; }
body.pk-guest .main-content { padding-bottom: 20px; }
/* Catatan per becak */
.unit-note { width: 100%; margin-top: 10px; min-height: 60px; padding: 8px 10px; border: 1px solid #d8e3e0; border-radius: 8px; font: inherit; font-size: 14px; resize: vertical; }
.unit-note-label { font-size: 12px; color: #6b7a80; margin-top: 10px; display: block; }

#printSheet { display: none; }
.ps-page h2 { font-size: 18px; margin: 0 0 8px; }
.ps-page h2 span { font-size: 13px; font-weight: 400; color: #555; }
.ps-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.ps-table td { border-bottom: 1px solid #ccc; padding: 6px 4px; font-size: 13px; }
.ps-box { font-size: 18px; width: 30px; }
.ps-note { font-size: 13px; min-height: 40px; border: 1px solid #ccc; padding: 6px; }
.ps-sign { display: flex; justify-content: space-between; font-size: 12px; margin-top: 14px; }
@media print {
    body * { visibility: hidden; }
    #printSheet, #printSheet * { visibility: visible; }
    #printSheet { display: block; position: absolute; left: 0; top: 0; width: 100%; background: #fff; color: #000; }
    .ps-page { page-break-after: always; padding: 12px; }
    .ps-page:last-child { page-break-after: auto; }
}

/* Mitra & Supplier: kartu untuk HP */
#supCards { margin-bottom: 16px; }
.sup-toolbar { display: flex; gap: 8px; margin-bottom: 10px; }
.sup-toolbar input { flex: 1; min-height: 44px; padding: 8px 12px; border: 1px solid #d8e3e0; border-radius: 10px; font-size: 15px; background: #fff; }
.sup-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; }
.sup-chip { flex: 0 0 auto; border: 1px solid #d8e3e0; background: #fff; border-radius: 20px; padding: 8px 14px; font-size: 13px; min-height: 38px; cursor: pointer; }
.sup-chip.on { background: #112b3b; color: #fff; border-color: #112b3b; }
.sup-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.sup-card { background: #fff; border: 1px solid #edf1f2; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.sup-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.sup-name { font: 600 16px 'Space Grotesk', sans-serif; line-height: 1.3; }
.sup-cat { display: inline-block; margin-top: 4px; font-size: 12px; background: #eef6f2; color: #1f7a52; padding: 3px 8px; border-radius: 10px; }
.sup-count { text-align: center; background: #112b3b; color: #fff; border-radius: 10px; padding: 6px 10px; min-width: 56px; }
.sup-count strong { display: block; font-size: 18px; }
.sup-count span { font-size: 11px; }
.sup-contact { font-size: 13px; color: #4a5a62; display: flex; gap: 6px; align-items: flex-start; overflow-wrap: anywhere; }
.sup-notes { font-size: 12px; color: #6b7a80; background: #f7f9fa; border-radius: 8px; padding: 6px 8px; }
.sup-progress { font-size: 13px; color: #1f7a52; }
.sup-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.sup-btn { flex: 1 1 110px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border-radius: 10px; border: 1px solid #d8e3e0; background: #fff; color: #14232d; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.sup-call { background: #e9f3ff; border-color: #bcd9f7; color: #1d5fa3; }
.sup-wa { background: #e8f8ee; border-color: #b7e4c7; color: #17803d; }
.sup-muted { font-size: 12px; color: #9aa6ab; }
#tab-suppliers .table-container { }
@media (max-width: 768px) {
    #tab-suppliers .table-container { display: none; }
    .sup-list { grid-template-columns: 1fr; }
}
.sup-chips { flex-wrap: wrap; overflow: visible; }
.stage-num { width: 26px; text-align: center; font-weight: 700; color: #6b7a80; } .stage-edit-row button[disabled] { opacity: .4; }
@media (max-width: 768px) { .sup-toolbar { flex-wrap: wrap; } .sup-toolbar input { flex: 1 1 100%; } .sup-toolbar button { flex: 1 1 100%; min-height: 44px; justify-content: center; white-space: nowrap; } }

/* Kinerja Tim di HP: judul dan penilaian tidak terhimpit */
@media (max-width: 768px) {
    .teams-grid { grid-template-columns: 1fr !important; }
    .team-card > div:first-child { flex-wrap: wrap !important; gap: 8px; align-items: center !important; }
    .team-card h3 { font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; flex: 1 1 60%; min-width: 0; }
    .team-eval-badge { white-space: nowrap; flex: 0 0 auto; }
    .team-stats { flex-wrap: wrap; gap: 6px 12px; }
    .team-card ul { padding-left: 18px; }
}

/* Atur Checklist di HP: tidak terhimpit */
@media (max-width: 768px) {
    #stageSetup .stage-edit-row { flex-wrap: wrap; gap: 8px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #edf1f2; }
    #stageSetup .stage-num { width: 30px; flex: 0 0 30px; font-size: 14px; }
    #stageSetup .stage-edit-row input { flex: 1 1 0; min-width: 0; font-size: 15px; }
    #stageSetup .stage-edit-row button { min-width: 44px; min-height: 44px; flex: 0 0 auto; }
    #stageSetup .stage-edit-row:last-child { border-bottom: 0; }
    #stageSetup .stage-edit-row:last-child input { flex: 1 1 100%; }
    #stageSetup .stage-edit-row:last-child button { flex: 1 1 100%; }
}

/* Teks tahap tampil penuh */
.stage-row, .stage-row .stage-text, .stage-row .stage-name, .stage-meta { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; word-break: break-word; height: auto !important; }
.stage-row { align-items: flex-start !important; }
#stageSetup textarea { width: 100%; min-height: 56px; padding: 8px 10px; border: 1px solid #d8e3e0; border-radius: 8px; font: inherit; font-size: 15px; line-height: 1.35; resize: vertical; }
#stageSetup .stage-edit-row { align-items: flex-start; }
#stageSetup .stage-btn-up { background: #e8f1ff; color: #1d5fa3; border: 1px solid #b9d4f5; }
#stageSetup .stage-btn-up:hover:not([disabled]) { background: #d6e8ff; }
#stageSetup .stage-btn-del { background: #fdecec; color: #b02a20; border: 1px solid #f1b7b3; }
#stageSetup .stage-btn-del:hover { background: #fad5d2; }
#stageSetup .stage-btn-up[disabled] { opacity: .4; }
#stageSetup .stage-save-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #edf1f2; }
#stageSetup .stage-save-bar p { margin: 0; flex: 1 1 260px; }
.next-stage { font-size: 12px; color: #1f7a52; margin-top: 3px; }
.next-stage.done { color: #6b7a80; }
.lag-line { margin-top: 10px; font-size: 13px; color: #a66a12; display: flex; gap: 6px; align-items: flex-start; }

/* Penugasan & absensi */
.task-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; align-items: stretch; }
.task-form input, .task-form select { min-height: 44px; padding: 8px 10px; border: 1px solid #d8e3e0; border-radius: 8px; font-size: 14px; background: #fff; width: 100%; }
.task-form button { min-height: 44px; }
.task-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px; border: 1px solid #edf1f2; border-left: 5px solid #27b879; border-radius: 10px; margin-bottom: 8px; background: #fff; flex-wrap: wrap; }
.task-row.late { border-left-color: #e45f5a; background: #fff6f5; }
.task-row.run { border-left-color: #3b7fc0; }
.task-row > div:first-child { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.task-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.task-badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 12px; background: #eef6f2; color: #1f7a52; white-space: nowrap; }
.task-badge.late { background: #fdecea; color: #c0392b; }
.task-badge.run { background: #e9f3ff; color: #1d5fa3; }
@media (max-width: 768px) { .task-form { grid-template-columns: 1fr; } }
.arahan-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; } .arahan-head h2 { margin: 2px 0 0; font-size: 20px; } .arahan-head select { min-height: 44px; padding: 8px 12px; border: 1px solid #d8e3e0; border-radius: 8px; font-size: 15px; } .arahan-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; } @media (max-width: 768px) { .task-row .btn-primary { min-height: 44px; width: 100%; justify-content: center; } }
.help-item { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px; border: 1px solid #f5c6c2; background: #fff; border-radius: 10px; margin-bottom: 8px; } .help-item > div { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; } .help-msg { margin: 6px 0; font-size: 14px; background: #fff6f5; padding: 8px 10px; border-radius: 8px; } @media (max-width: 768px) { .help-item button { width: 100%; min-height: 44px; justify-content: center; } }

/* ===== Tampilan khusus siswa: sederhana dan besar ===== */
body.role-siswa .sidebar-menu .menu-item:not([data-tab="arahan"]):not([data-tab="units"]) { display: none !important; }
body.role-siswa .sidebar-menu .menu-label { display: none; }
body.role-siswa .sidebar-footer { display: none !important; }
body.role-siswa #userChip { display: none; }
body.role-siswa .view-switch-wrap, body.role-siswa .view-switch { display: none !important; }
body.role-siswa #arahanTim { min-height: 48px; font-size: 16px; }
body.role-siswa #unitSummary, body.role-siswa #unitFilter, body.role-siswa #unitCsv, body.role-siswa #unitPrint, body.role-siswa .stage-editor { display: none !important; }
body.role-siswa .task-row { padding: 16px; margin-bottom: 12px; }
body.role-siswa .task-row strong { font-size: 17px; }
body.role-siswa .task-row .btn { min-height: 52px; font-size: 16px; padding: 10px 16px; }
body.role-siswa .stage-row { min-height: 56px; font-size: 17px; }
body.role-siswa .stage-box { font-size: 26px; }
body.role-siswa .arahan-stats { grid-template-columns: 1fr 1fr; }
body.role-siswa .arahan-stats .stat-card p { font-size: 22px; }
.siswa-hi { font: 600 22px 'Space Grotesk', sans-serif; margin-bottom: 4px; }
#siswaHello { background: #fff; border: 1px solid #edf1f2; border-left: 6px solid #27b879; border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
@media (max-width: 768px) { body.role-siswa .arahan-stats { grid-template-columns: 1fr; } body.role-siswa .task-row .btn { width: 100%; } }

/* Menu kiri bisa di-scroll jika item melebihi tinggi layar */
.sidebar { height: 100vh; max-height: 100vh; overflow-y: auto; position: sticky; top: 0; scrollbar-width: thin; scrollbar-color: #3a5a68 transparent; }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: #3a5a68; border-radius: 6px; }
@media (max-width: 768px) { .sidebar { height: 100vh; overflow-y: auto; } }

/* Pesan tim */
.chat-thread { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; padding: 4px; margin: 10px 0; }
.chat-bubble { max-width: 85%; padding: 10px 12px; border-radius: 12px; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.chat-bubble.siswa { align-self: flex-end; background: #e9f9f2; border: 1px solid #b7e4c7; }
.chat-bubble.owner { align-self: flex-start; background: #f1f5f9; border: 1px solid #dde4e7; }
.chat-meta { font-size: 11px; color: #6b7a80; margin-bottom: 4px; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.chat-form textarea { flex: 1; min-height: 56px; padding: 10px; border: 1px solid #d8e3e0; border-radius: 10px; font: inherit; font-size: 16px; resize: vertical; }
.chat-form button { min-height: 52px; }
#pesanTim { min-height: 44px; padding: 8px 12px; border: 1px solid #d8e3e0; border-radius: 8px; font-size: 15px; width: 100%; }
body.role-siswa .sidebar-menu .menu-item[data-tab="pesan"] { display: none !important; }
body.role-siswa #pesanSiswa .chat-form textarea { font-size: 17px; }
@media (max-width: 768px) { .chat-form { flex-direction: column; align-items: stretch; } .chat-form button { width: 100%; } }

/* Pesan: tampilan chat */
.chat-layout { display: grid; grid-template-columns: 260px 1fr; gap: 14px; align-items: start; }
.team-list { display: flex; flex-direction: column; gap: 8px; }
.team-pick { text-align: left; background: #fff; border: 1px solid #edf1f2; border-radius: 12px; padding: 12px; cursor: pointer; min-height: 56px; }
.team-pick.on { border-color: #27b879; background: #f1fbf6; box-shadow: inset 4px 0 #27b879; }
.tp-name { font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tp-last { font-size: 12px; color: #6b7a80; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unread { background: #e45f5a; color: #fff; border-radius: 10px; font-size: 11px; padding: 2px 7px; }
.chat-card { display: flex; flex-direction: column; gap: 10px; min-height: 380px; }
.chat-thread { display: flex; flex-direction: column; gap: 10px; max-height: 420px; min-height: 200px; overflow-y: auto; padding: 8px 4px; background: #f7f9fa; border-radius: 12px; }
.chat-row { display: flex; }
.row-siswa { justify-content: flex-end; }
.row-owner { justify-content: flex-start; }
.chat-bubble { max-width: 80%; padding: 10px 12px; border-radius: 14px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; box-shadow: 0 1px 2px #0001; }
.chat-bubble.siswa { background: #d9f5e6; border-bottom-right-radius: 4px; }
.chat-bubble.owner { background: #fff; border: 1px solid #e3e9ec; border-bottom-left-radius: 4px; }
.chat-meta { display: flex; gap: 8px; font-size: 11px; color: #6b7a80; margin-bottom: 4px; align-items: baseline; }
.chat-empty { color: #8a989e; font-size: 14px; text-align: center; padding: 30px 10px; }
.chat-compose { display: flex; gap: 8px; align-items: flex-end; }
.chat-compose textarea { flex: 1; min-height: 56px; padding: 10px 12px; border: 1px solid #d8e3e0; border-radius: 12px; font: inherit; font-size: 16px; resize: vertical; background: #fff; }
.chat-compose button { min-height: 52px; white-space: nowrap; }
.chat-status { font-size: 13px; min-height: 18px; }
.chat-status.ok { color: #1f7a52; }
.chat-status.err { color: #c0392b; }
@media (max-width: 768px) {
    .chat-layout { grid-template-columns: 1fr; }
    .team-list { flex-direction: row; overflow-x: auto; flex-wrap: nowrap; }
    .team-pick { min-width: 180px; flex: 0 0 auto; }
    .chat-compose { flex-direction: column; align-items: stretch; }
    .chat-compose button { width: 100%; min-height: 50px; }
    .chat-bubble { max-width: 92%; }
}
#pesanFab { touch-action: none; user-select: none; cursor: grab; position: fixed; right: 18px; bottom: 18px; z-index: 1500; min-height: 56px; min-width: 56px; padding: 0 18px; border: 0; border-radius: 28px; background: #27b879; color: #fff; font: 600 15px 'DM Sans', sans-serif; box-shadow: 0 6px 18px #0003; align-items: center; justify-content: center; gap: 8px; cursor: pointer; } #pesanFab i { font-size: 22px; } @media (max-width: 768px) { #pesanFab { right: 14px; bottom: 14px; } }

/* Jendela pesan siswa */
.pm-overlay { position: fixed; inset: 0; background: #0d253399; z-index: 2600; display: none; align-items: flex-end; justify-content: center; }
.pm-overlay.open { display: flex; }
.pm-box { background: #fff; width: 100%; max-width: 560px; height: min(78vh, 640px); border-radius: 18px 18px 0 0; display: flex; flex-direction: column; box-shadow: 0 -10px 30px #0003; overflow: hidden; }
@media (min-width: 769px) { .pm-overlay { align-items: center; } .pm-box { border-radius: 16px; height: min(70vh, 600px); } }
.pm-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: #112b3b; color: #fff; }
.pm-title { font: 600 17px 'Space Grotesk', sans-serif; }
.pm-sub { font-size: 12px; color: #b9d3cb; }
.pm-close { border: 0; background: rgba(255,255,255,.15); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 20px; cursor: pointer; }
.pm-thread { flex: 1; overflow-y: auto; padding: 14px; background: #f5f8f7; display: flex; flex-direction: column; gap: 10px; }
.pm-thread .chat-row { display: flex; }
.pm-foot { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #e3e9ec; background: #fff; align-items: flex-end; }
.pm-foot textarea { flex: 1; min-height: 52px; max-height: 120px; padding: 10px 12px; border: 1px solid #d8e3e0; border-radius: 12px; font: inherit; font-size: 16px; resize: none; }
.pm-send { min-height: 52px; padding: 0 16px; border: 0; border-radius: 12px; background: #27b879; color: #fff; font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap; }
.pm-send:disabled { opacity: .6; }
.pm-status { font-size: 13px; padding: 0 12px 8px; min-height: 16px; background: #fff; }
.pm-status.ok { color: #1f7a52; } .pm-status.err { color: #c0392b; }
#pesanSiswa:empty { display: none; }

/* Status tugas: Belum / Proses / Selesai */
.stat-seg { display: inline-flex; background: #e9eef0; border-radius: 10px; padding: 3px; gap: 3px; }
.seg-btn { border: 0; background: transparent; padding: 9px 12px; border-radius: 8px; font: 600 13px 'DM Sans', sans-serif; color: #5b6b73; cursor: pointer; min-height: 40px; }
.seg-btn.on { background: #fff; color: #112b3b; box-shadow: 0 1px 3px #0002; }
.seg-btn.on[data-tstatus$="|proses"] { background: #e9f3ff; color: #1d5fa3; }
.task-status-tag { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 10px; background: #eef1f2; color: #5b6b73; margin-left: 6px; }
.task-status-tag.proses { background: #e9f3ff; color: #1d5fa3; }
@media (max-width: 768px) { .task-right { width: 100%; } .stat-seg { width: 100%; } .seg-btn { flex: 1 1 0; } }

/* Halaman siswa: rapi dan jelas */
body.role-siswa .main-content { padding: 20px 16px 110px; max-width: 760px; margin: 0 auto; }
body.role-siswa .page-header h1 { font-size: 24px; }
body.role-siswa .page-header .eyebrow-line { color: #6b7a80; }
body.role-siswa .card { padding: 18px; border-radius: 14px; }
body.role-siswa .arahan-head { background: #112b3b; color: #fff; border-radius: 14px; padding: 16px 18px; }
body.role-siswa .arahan-head h2, body.role-siswa .arahan-head .eyebrow-line { color: #fff; }
body.role-siswa .arahan-head select { background: #fff; color: #14232d; }
body.role-siswa .arahan-stats .stat-card { border-radius: 14px; padding: 14px; }
body.role-siswa .rab-section-head h2 { font-size: 17px; }
body.role-siswa .task-row { border-radius: 14px; }
body.role-siswa .task-row > div:first-child { font-size: 15px; }
body.role-siswa .seg-btn { min-height: 44px; }
body.role-siswa .help-item, body.role-siswa .task-form { border-radius: 14px; }
#pesanSiswa:empty { display: none; }
body.role-siswa #pesanFab { right: 16px; bottom: 16px; box-shadow: 0 8px 22px #0004; }
.pm-status { font-weight: 600; font-size: 14px; }
.pm-status.ok { color: #1f7a52; background: #e9f9f2; }
.pm-status.err { color: #c0392b; background: #fdecea; }
@media (max-width: 768px) { body.role-siswa .main-content { padding: 14px 12px 110px; } body.role-siswa .page-header h1 { font-size: 21px; } }
.profil-card { background: #fff; border-left: 6px solid #27b879; } .profil-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .profil-avatar { width: 46px; height: 46px; border-radius: 50%; background: #e9f9f2; color: #1f7a52; display: grid; place-items: center; font-size: 24px; flex-shrink: 0; } .profil-tim { font: 700 18px 'Space Grotesk', sans-serif; } .grade-tag { margin-left: auto; background: #112b3b; color: #fff; font-size: 12px; padding: 5px 10px; border-radius: 12px; } .profil-row { display: flex; gap: 8px; font-size: 14px; margin-top: 10px; color: #3d4d55; overflow-wrap: anywhere; }
.go-checklist { width: 100%; min-height: 52px; font-size: 16px; margin-bottom: 14px; justify-content: center; }

/* Tampilan siswa: tanpa menu samping, hanya dua tombol bawah */
body.role-siswa .sidebar, body.role-siswa .pk-menu-btn, body.role-siswa .mobile-menu, body.role-siswa .menu-backdrop { display: none !important; }
/* Loading awal: cegah layar putih saat sesi/data masih diperiksa. */
#pkLoading { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 35%, #e9faf2 0, #f7f9fa 42%, #eef4f2 100%); transition: opacity .25s ease, visibility .25s ease; }
#pkLoading.done { opacity: 0; visibility: hidden; pointer-events: none; }
.pk-loading-card { min-width: 190px; padding: 28px 30px 25px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: #14232d; background: rgba(255,255,255,.88); border: 1px solid rgba(255,255,255,.95); border-radius: 22px; box-shadow: 0 18px 50px rgba(17,43,59,.14); font: 15px 'DM Sans', sans-serif; animation: pkFloat 2.2s ease-in-out infinite; }
.pk-loading-card strong { font: 700 16px 'Space Grotesk', sans-serif; }
.pk-loading-card span { color: #6b7a80; font-size: 13px; }
.pk-spinner { position: relative; width: 48px; height: 48px; border: 4px solid #d8eee4; border-top-color: #27b879; border-right-color: #3b9dcc; border-radius: 50%; animation: pkSpin .85s linear infinite; }
.pk-spinner::after { content: ''; position: absolute; inset: 8px; border: 3px solid transparent; border-bottom-color: #f0b44e; border-radius: 50%; animation: pkSpin 1.3s linear infinite reverse; }
@keyframes pkSpin { to { transform: rotate(360deg); } }
@keyframes pkFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
body.role-siswa .app-container { display: block !important; }
body.role-siswa .main-content { max-width: 760px; margin: 0 auto; padding: 16px 14px 100px !important; }
#siswaNav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1400; display: grid; grid-template-columns: 1fr 1fr; background: #112b3b; box-shadow: 0 -4px 14px #0003; }
#siswaNav button { border: 0; background: transparent; color: #a6bac1; padding: 10px 6px 12px; display: flex; flex-direction: column; align-items: center; gap: 3px; font: 600 13px 'DM Sans', sans-serif; cursor: pointer; min-height: 62px; }
#siswaNav button i { font-size: 24px; }
#siswaNav button.on { color: #fff; background: #1e4658; box-shadow: inset 0 3px #27b879; }
body.role-siswa #pesanFab { bottom: 84px; }
body.role-siswa #siswaHello { display: none; }
body.role-siswa #siswaAccount { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; padding: 10px 12px; background: rgba(255,255,255,.92); border: 1px solid #e5eeea; border-radius: 14px; box-shadow: 0 4px 14px rgba(17,43,59,.06); }
body.role-siswa .siswa-account-name { min-width: 0; display: flex; align-items: center; gap: 10px; }
body.role-siswa .siswa-avatar { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 50%; background: #e8f8f0; color: #1f8a5b; font-size: 18px; }
body.role-siswa .siswa-account-name span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
body.role-siswa .siswa-account-name small { color: #7b8a90; font-size: 11px; }
body.role-siswa .siswa-account-name strong { overflow: hidden; color: #14232d; font: 700 15px 'Space Grotesk', sans-serif; text-overflow: ellipsis; white-space: nowrap; }
body.role-siswa #siswaLogout { flex: 0 0 auto; min-height: 36px; padding: 7px 10px; border: 1px solid #d8e3e0; border-radius: 9px; background: #fff; color: #52636a; font: 600 12px 'DM Sans', sans-serif; cursor: pointer; }
body.role-siswa #siswaLogout:active { background: #eef8f3; }
.pk-notify { position: fixed; top: 12px; left: 50%; transform: translateX(-50%) translateY(-120%); z-index: 4800; padding: 12px 18px; border-radius: 12px; font-size: 15px; font-weight: 600; box-shadow: 0 8px 22px #0003; transition: transform .25s; max-width: 92vw; text-align: center; } .pk-notify.show { transform: translateX(-50%) translateY(0); } .pk-notify.ok { background: #1f7a52; color: #fff; } .pk-notify.err { background: #c0392b; color: #fff; }

/* Halaman bisa di-scroll penuh (HP dan PC) */
html, body { height: auto; overflow-y: auto !important; }
.app-container { height: auto !important; min-height: 100vh; overflow: visible !important; }
.main-content { overflow: visible !important; height: auto !important; }
.sidebar { overflow-y: auto; }

/* Siswa: hanya daftar tugas, tanpa pilihan tim dan daftar becak untuk owner */
body.role-siswa #arahanTim, body.role-siswa .prio-card, body.role-siswa .arahan-stats .stat-card:nth-child(n+3) { display: none !important; }
body.role-siswa .arahan-head h2 { display: none; }
body.role-siswa .arahan-stats { grid-template-columns: 1fr 1fr !important; }

/* Shortcut penugasan (owner) dan pasang aplikasi (siswa) */
#tugasFab { position: fixed; right: 18px; bottom: 18px; z-index: 1500; min-height: 56px; padding: 0 18px; border: 0; border-radius: 28px; background: #112b3b; color: #fff; font: 600 15px 'DM Sans', sans-serif; box-shadow: 0 6px 18px #0004; display: flex; align-items: center; gap: 8px; cursor: pointer; }
#tugasFab i { font-size: 20px; }
@media (max-width: 768px) { #tugasFab { right: 14px; bottom: 14px; } }
body.role-siswa #tugasFab { display: none !important; }
.install-box { margin: 10px 0 14px; display: flex; flex-direction: column; gap: 8px; }
.install-box .rab-sub { font-size: 13px; }
.task-form button#tAdd { min-height: 48px; width: 100%; } @media (max-width: 768px) { .task-form { padding-bottom: 6px; } }
.tugas-msg { font-size: 15px; font-weight: 600; padding: 10px 12px; border-radius: 10px; margin-top: 10px; } .tugas-msg.ok { background: #e9f9f2; color: #1f7a52; } .tugas-msg.err { background: #fdecea; color: #c0392b; }
.new-task-banner { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff7df; color: #5b410c; border: 1px solid #efc45c; border-left: 6px solid #ed9d16; border-radius: 14px; padding: 13px 14px; margin: 0 0 14px; font-size: 14px; box-shadow: 0 5px 16px rgba(126,86,8,.12); } .new-task-copy { display: flex; align-items: flex-start; gap: 10px; min-width: 0; } .new-task-copy > i { color: #d98b00; font-size: 22px; margin-top: 1px; } .new-task-copy span { display: flex; flex-direction: column; gap: 3px; } .new-task-copy strong { font: 700 15px 'Space Grotesk', sans-serif; } .new-task-copy small { color: #80651e; font-size: 12px; line-height: 1.35; } .new-task-banner button { min-height: 42px; } .new-task-banner button:disabled { opacity: .65; cursor: default; }
.completed-task-title { margin: 16px 0 8px; color: #6b7a80; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.task-row.done { opacity: .82; border-left: 4px solid #27b879; }
.task-badge.ok { color: #1f7a52; background: #e9f9f2; border-radius: 10px; padding: 7px 10px; font-size: 12px; font-weight: 700; }
.btn-help { color: #8a5700; background: #fff3d6; border: 1px solid #efc45c; font-weight: 700; }
.btn-help:hover { background: #ffe8ad; }
.task-status-summary .stat-info > p { display: flex; flex-wrap: wrap; gap: 6px; }
.status-count { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 8px; font: 700 12px 'DM Sans', sans-serif; }
.status-count.belum { color: #68777d; background: #eef1f2; }
.status-count.proses { color: #1d5fa3; background: #e9f3ff; }
.status-count.selesai { color: #1f7a52; background: #e9f9f2; }
.status-hint { color: #6b7a80; font-size: 13px !important; line-height: 1.35; }
.help-team { display: inline-block; margin-left: 8px; color: #6b7a80; font-size: 12px; font-weight: 500; }
.task-progress-value { color: #1f7a52; font: 700 26px 'Space Grotesk', sans-serif !important; margin: 3px 0 !important; }
.task-current-status { display: inline-block; margin-left: 5px; padding: 3px 7px; border-radius: 7px; font: 700 11px 'DM Sans', sans-serif; vertical-align: middle; }
.task-current-status.belum { color: #68777d; background: #eef1f2; }
.task-current-status.proses { color: #1d5fa3; background: #e9f3ff; }
.task-current-status.selesai { color: #1f7a52; background: #e9f9f2; }
@media (max-width: 768px) { body.role-siswa .stat-seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; } body.role-siswa .stat-seg .seg-btn { font-size: 12px; padding: 9px 7px; } body.role-siswa .btn-help { border-width: 2px; } }
@media (max-width: 768px) { body.role-siswa .task-right { gap: 8px; } body.role-siswa .task-right .stat-seg, body.role-siswa .task-right .btn-help, body.role-siswa .task-right [data-finish] { width: 100%; } body.role-siswa .task-right .seg-btn { min-height: 44px; font-weight: 700; } }
button[data-tdel] { min-width: 48px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; color: #c0392b; background: #fff; border: 1px solid #f0c4bf; border-radius: 10px; cursor: pointer; } button[data-tdel]:active { background: #fdecea; }
body.role-siswa .arahan-head { display: none !important; }

/* Daftar tugas siswa: tombol utama di atas, mudah dijangkau jari */
body.role-siswa #daftarTugas .task-row { flex-direction: column; align-items: stretch; gap: 12px; }
body.role-siswa #daftarTugas .task-row > div:first-child { flex: none; }
body.role-siswa #daftarTugas .task-right { width: 100%; flex-direction: column; align-items: stretch; gap: 8px; }
body.role-siswa #daftarTugas .task-right [data-finish] { order: -1; width: 100%; min-height: 56px; font-size: 17px; justify-content: center; }
body.role-siswa #daftarTugas .stat-seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
body.role-siswa #daftarTugas .stat-seg .seg-btn { font-size: 14px; min-height: 46px; text-align: center; }
body.role-siswa #daftarTugas .btn-help { width: 100%; justify-content: center; min-height: 48px; font-size: 15px; }
body.role-siswa #daftarTugas .task-current-status { margin-left: 6px; }
.cf-overlay { position: fixed; inset: 0; z-index: 5000; background: #0d2533aa; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cf-box { background: #fff; border-radius: 16px; padding: 20px; width: 100%; max-width: 380px; box-shadow: 0 12px 34px #0005; }
.cf-msg { font: 600 17px 'Space Grotesk', sans-serif; color: #14232d; margin: 0 0 18px; line-height: 1.4; }
.cf-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cf-actions .btn { min-height: 52px; font-size: 16px; justify-content: center; }
.help-box { max-width: 440px; max-height: 90vh; overflow-y: auto; text-align: left; }
.help-title { font: 700 20px 'Space Grotesk', sans-serif; margin: 0 0 4px; color: #14232d; }
.help-sub { margin: 0 0 14px; font-size: 14px; color: #5b6b73; }
.help-label { font-size: 14px; font-weight: 700; color: #14232d; margin: 14px 0 8px; }
.help-people { display: flex; flex-direction: column; gap: 8px; }
.help-person { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 10px 12px; border: 2px solid #d8e3e0; border-radius: 12px; background: #fff; cursor: pointer; text-align: left; }
.help-person i { font-size: 28px; color: #1f8a5b; }
.help-person span { display: flex; flex-direction: column; }
.help-person small { color: #6b7a80; font-size: 12px; }
.help-person.on { border-color: #27b879; background: #f1fbf6; }
#helpText { width: 100%; min-height: 84px; padding: 10px 12px; border: 1px solid #d8e3e0; border-radius: 12px; font: inherit; font-size: 16px; resize: vertical; box-sizing: border-box; }
.help-box .cf-actions .btn:disabled { opacity: .5; cursor: default; }
.help-report .rab-section-head { flex-wrap: wrap; gap: 8px; }
.pekerjaan-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.pekerjaan-form input { flex: 1 1 240px; }
.pekerjaan-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pekerjaan-chip { display: inline-flex; align-items: center; gap: 4px; background: #e9f9f2; color: #1f7a52; border-radius: 10px; padding: 4px 4px 4px 10px; font-size: 13px; font-weight: 600; }
/* Tabel daftar tugas dan pekerjaan */
.table-wrap { overflow-x: auto; border: 1px solid #e3ebe8; border-radius: 12px; margin-top: 12px; background: #fff; }
.tugas-table, .pekerjaan-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; min-width: 520px; }
.pekerjaan-table { min-width: 0; }
.tugas-table th, .pekerjaan-table th { background: #f4f8f7; color: #4d5f66; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; text-align: left; padding: 10px 12px; border-bottom: 1px solid #e3ebe8; white-space: nowrap; }
.tugas-table td, .pekerjaan-table td { padding: 11px 12px; border-bottom: 1px solid #eef3f1; vertical-align: middle; }
.tugas-table tbody tr:last-child td, .pekerjaan-table tbody tr:last-child td { border-bottom: 0; }
.tugas-table tbody tr:hover td, .pekerjaan-table tbody tr:hover td { background: #fafcfb; }
.tugas-table tr.late-row td { background: #fff6f5; }
.tugas-table tr.ok-row td { color: #5b6b73; }
.pekerjaan-table tr.row-editing td { background: #f1fbf6; font-weight: 600; }
.col-act { text-align: right; white-space: nowrap; }
.col-no { width: 52px; color: #6b7a80; }
.btn-icon-danger { color: #c0392b; }
.tugas-table .btn, .pekerjaan-table .btn { min-height: 38px; padding: 6px 10px; }
@media (max-width: 768px) { .tugas-table .btn-label, .pekerjaan-table .btn-label { display: none; } .tugas-table .btn, .pekerjaan-table .btn { min-width: 44px; min-height: 44px; } }
.pekerjaan-chip.on { outline: 2px solid #27b879; }

/* Tabel gaya Bootstrap (bs-table) dengan tombol aksi berikon seperti DataTables */
.table-wrap { border: 1px solid #dee2e6; border-radius: 8px; overflow: hidden; }
.table-wrap:has(.bs-table) { overflow-x: auto; }
.bs-table { width: 100%; margin: 0; border-collapse: collapse; color: #212529; font-size: 14px; background: #fff; min-width: 0; }
.bs-table thead th { background: #f8f9fa; color: #495057; font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: normal; padding: 11px 12px; border-bottom: 2px solid #dee2e6; vertical-align: bottom; }
.bs-table td { padding: 11px 12px; border-top: 1px solid #dee2e6; vertical-align: middle; }
.bs-table tbody tr:nth-of-type(odd) td { background: #fbfcfd; }
.bs-table tbody tr:hover td { background: #eef4ff; }
.bs-table tr.late-row td { background: #fff5f5; }
.bs-table tr.late-row:hover td { background: #ffe9e9; }
.bs-table tr.row-editing td { background: #e7f5ee !important; font-weight: 600; }
.bs-table th.col-act, .bs-table td.col-act { text-align: right; white-space: nowrap; width: 1%; }
.bs-table.tugas-table { min-width: 680px; }
.bs-table .task-badge { white-space: nowrap; }
.table-wrap:has(.bs-table) { -webkit-overflow-scrolling: touch; }
.bs-table .col-no { width: 52px; color: #6c757d; }
.bs-table .task-badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.btn-act { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 11px; margin-left: 4px; border: 1px solid; border-radius: 6px; background: #fff; font: 600 13px 'DM Sans', sans-serif; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.btn-act i { font-size: 15px; line-height: 1; display: inline-flex; }
.btn-act-edit { color: #0b5ed7; border-color: #0b5ed7; }
.btn-act-edit:hover { background: #0b5ed7; color: #fff; }
.btn-act-del { color: #bb2d3b; border-color: #bb2d3b; }
.btn-act-del:hover { background: #bb2d3b; color: #fff; }
.btn-act:focus-visible { outline: 3px solid #9ec5fe; outline-offset: 2px; }

/* Tombol aksi yang jelas: warna selalu berarti hal yang sama
   hijau = setuju/ambil (Saya bantu, Ya sudah dibantu), biru = tandai selesai, oranye = tidak bisa, merah = belum/tolak, kuning = minta bantuan */
.ab-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 16px; border-radius: 12px; border: 2px solid transparent; font: 700 15px 'DM Sans', sans-serif; cursor: pointer; text-align: center; white-space: normal; transition: background .15s, transform .1s; line-height: 1.2; }
.ab-btn i { font-size: 20px; line-height: 1; }
.ab-btn:active { transform: scale(.98); }
.ab-btn:focus-visible { outline: 3px solid #112b3b; outline-offset: 2px; }
.ab-go { background: #1f9e5e; color: #fff; border-color: #1f9e5e; }
.ab-go:hover { background: #17824c; }
.ab-done { background: #0b5ed7; color: #fff; border-color: #0b5ed7; }
.ab-done:hover { background: #0a4fb8; }
.ab-warn { background: #fff; color: #b35400; border-color: #e07b1a; }
.ab-warn:hover { background: #fff3e6; }
.ab-no { background: #fff; color: #b02a20; border-color: #d9463b; }
.ab-no:hover { background: #fdecea; }
.ab-help { background: #ffc107; color: #3b2a00; border-color: #e0a800; }
.ab-help:hover { background: #ffb300; }
.ab-hint { margin: 0 0 6px; font-size: 13px; color: #4b5b62; line-height: 1.4; }
.req-actions .ab-btn, .task-right .ab-btn, .help-actions .ab-btn { width: 100%; }
body.role-siswa .task-row .ab-btn { min-height: 52px; font-size: 16px; }
@media (min-width: 769px) { .req-actions .ab-btn, .task-right .ab-btn, .help-actions .ab-btn { width: auto; min-width: 200px; } }

/* Status bantuan wajib */
.help-status.terlewat { background: #fdecea; color: #b02a20; }
.help-status.ditolak { background: #fff1e0; color: #9a4b00; }
.help-status.konfirmasi { background: #f1e9ff; color: #5b2ca8; }
.req-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.req-actions .btn { width: 100%; justify-content: center; min-height: 44px; }
.pill-wajib { display: inline-flex; align-items: center; gap: 4px; background: #fdecea; color: #b02a20; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.wajib-card { border: 2px solid #e45f5a; }
.wajib-card .task-row { border-left-color: #e45f5a; }

/* Jendela konfirmasi dan form pekerjaan (berlabel jelas) */
.cf-title { font: 700 18px 'Space Grotesk', sans-serif; color: #14232d; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.cf-title i { color: #1f9e5e; font-size: 22px; }
.cf-label { display: block; font-weight: 700; font-size: 14px; color: #14232d; margin: 12px 0 6px; }
.cf-opt { font-weight: 400; color: #6c757d; }
.cf-req { color: #b02a20; font-weight: 700; }
.cf-err { color: #b02a20; font-weight: 700; font-size: 13px; min-height: 18px; margin: 6px 0 0; }
.cf-confirm { text-align: left; }
.pek-input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #ced4da; border-radius: 10px; font: inherit; font-size: 15px; background: #fff; }
.pek-input:focus, #pekDesc:focus, #cfText:focus { outline: none; border-color: #1f9e5e; box-shadow: 0 0 0 3px rgba(31,158,94,.2); }
.cf-confirm textarea#cfText { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #ced4da; border-radius: 10px; font: inherit; font-size: 15px; resize: vertical; }
.pek-toolbar { display: flex; justify-content: flex-end; margin: 0 0 12px; }
.pek-toolbar .btn { min-height: 46px; font-size: 15px; }
.ab-cancel { background: #fff; color: #343a40; border-color: #adb5bd; }
.ab-cancel:hover { background: #f1f3f5; }
.cf-actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cf-actions .ab-btn, .cf-actions .btn { flex: 1 1 140px; min-height: 48px; padding: 10px 14px; white-space: normal; text-align: center; line-height: 1.25; }
.cf-box { max-height: 90vh; overflow-y: auto; width: calc(100% - 32px); box-sizing: border-box; }
.cf-overlay { overflow-y: auto; }
@media (max-width: 480px) {
    .cf-actions .ab-btn, .cf-actions .btn { flex: 1 1 100%; }
    .cf-box { padding: 16px; }
    .cf-title { font-size: 17px; }
}

/* Laporan evaluasi murid (layar dan cetak) */
.rep-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 12px; }
.rep-form .btn { min-height: 46px; }
.rep-pick { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid #d5dde1; border-radius: 10px; background: #fff; cursor: pointer; font-size: 14px; font-weight: 600; color: #1f2d36; }
.rep-pick input { width: 18px; height: 18px; accent-color: #1f9e5e; }
.rep-pick:has(input:checked) { border-color: #1f9e5e; background: #f1fbf6; }
.rep-all { margin-top: 12px; background: #f5f8f9; font-weight: 800; }
.rep-pick-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
@media (max-width: 768px) { .rep-form .btn { width: 100%; justify-content: center; } .rep-pick { flex: 1 1 calc(50% - 8px); } }
.rep-overlay { position: fixed; inset: 0; z-index: 5500; background: #e9eef1; overflow-y: auto; }
.rep-bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; background: #112b3b; color: #fff; }
.rep-bar-title { font: 700 16px 'Space Grotesk', sans-serif; display: flex; align-items: center; gap: 8px; }
.rep-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rep-bar-names { font-weight: 600; opacity: .9; font-size: 14px; }
.rep-bar-actions .btn { min-height: 44px; padding: 0 16px; border-radius: 10px; font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; border: 2px solid transparent; }
.rep-bar .btn-secondary { background: #fff; color: #112b3b; border-color: #fff; }
.rep-bar .btn-secondary:hover { background: #e9eef1; }
.rep-bar .btn-primary { background: #27b879; color: #fff; border-color: #27b879; }
.rep-bar .btn-primary:hover { background: #1f9e66; }
.rep-bar .btn:focus-visible { outline: 3px solid #ffc107; outline-offset: 2px; }
.rep-pages { padding: 16px 0 40px; }
.rep-doc { background: #fff; max-width: 880px; margin: 0 auto 16px; padding: 28px 30px; border-radius: 12px; box-shadow: 0 4px 18px rgba(0,0,0,.08); color: #1f2d36; font-size: 14px; }
.rep-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; border-bottom: 3px solid #27b879; padding-bottom: 14px; }
.rep-kicker { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: #1f9e5e; }
.rep-head h2 { margin: 2px 0 4px; font: 700 24px 'Space Grotesk', sans-serif; color: #112b3b; }
.rep-sub { font-size: 12px; color: #6c757d; }
.rep-score { display: flex; align-items: center; gap: 12px; background: #fff8e6; border: 1px solid #f0c23c; border-radius: 14px; padding: 10px 16px; text-align: left; font-size: 12px; color: #6b4e00; }
.rep-big { font: 800 34px 'Space Grotesk', sans-serif; color: #b07800; }
.rep-score span { color: #8a6a10; }
.rep-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 16px 0 6px; }
.rep-cards > div { background: #f5f8f9; border: 1px solid #e3ebe8; border-radius: 10px; padding: 10px 12px; }
.rep-cards b { display: block; font: 800 20px 'Space Grotesk', sans-serif; color: #112b3b; }
.rep-cards span { font-size: 12px; color: #5b6b73; }
.rep-doc h3 { margin: 18px 0 8px; font: 700 15px 'Space Grotesk', sans-serif; color: #112b3b; border-left: 4px solid #27b879; padding-left: 8px; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rep-table th { background: #f1f5f7; text-align: left; padding: 8px 10px; border: 1px solid #dfe6ea; font-weight: 700; color: #3d4d55; }
.rep-table td { padding: 8px 10px; border: 1px solid #dfe6ea; vertical-align: top; }
.rep-table tr:nth-child(even) td { background: #fafcfc; }
.rep-note { font-size: 12px; color: #5b6b73; font-style: italic; margin-top: 3px; }
.rep-pen { background: #f8fbf9; border: 1px solid #d5ebdf; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.rep-pen .stars { font-size: 18px; }
.rep-sign { display: flex; justify-content: space-between; gap: 30px; margin-top: 28px; font-size: 13px; text-align: center; }
.rep-sign > div { flex: 1; }
.rep-break { display: none; }
@media (max-width: 768px) { .rep-doc { padding: 18px 14px; } .rep-head h2 { font-size: 20px; } .rep-sign { flex-direction: column; gap: 18px; } .rep-table { font-size: 12px; } }
@media print {
    body > *:not(.rep-overlay) { display: none !important; }
    /* Aturan cetak global menyembunyikan semua elemen; laporan harus dibuat kembali terlihat */
    body * { visibility: hidden; }
    .rep-overlay, .rep-overlay * { visibility: visible !important; }
    .rep-overlay { position: static; background: #fff; overflow: visible; }
    html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
    .no-print { display: none !important; }
    .rep-pages { padding: 0; }
    .rep-doc { box-shadow: none; border-radius: 0; margin: 0; max-width: none; width: 100%; box-sizing: border-box; padding: 8mm 10mm; page-break-after: always; font-size: 12px; }
    .rep-head { padding-bottom: 8px; }
    .rep-head h2 { font-size: 20px; }
    .rep-doc h3 { margin: 12px 0 6px; font-size: 13px; page-break-after: avoid; }
    .rep-cards { margin: 10px 0 4px; }
    .rep-table { font-size: 11px; }
    .rep-table th, .rep-table td { padding: 5px 7px; }
    .rep-sign { margin-top: 18px; }
    .rep-doc:last-child { page-break-after: auto; }
    .rep-break { display: none; }
    .rep-table tr { page-break-inside: avoid; }
    .rep-score, .rep-cards > div, .rep-pen { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    @page { size: A4; margin: 14mm; }
}

/* Kartu pasang aplikasi (PWA) */
.ins-card { background: linear-gradient(135deg, #112b3b, #1e4658); color: #fff; border-radius: 16px; padding: 16px; margin-bottom: 14px; box-shadow: 0 6px 18px rgba(17,43,59,.25); }
.ins-title { font: 700 17px 'Space Grotesk', sans-serif; display: flex; align-items: center; gap: 8px; }
.ins-title i { font-size: 22px; color: #27b879; }
.ins-text, .ins-steps { font-size: 14px; line-height: 1.5; color: #dbe9e3; margin: 8px 0 0; }
.ins-steps { padding-left: 20px; }
.ins-steps li { margin-bottom: 4px; }
.ins-steps b { color: #fff; }
.ins-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.ins-actions .ab-btn { flex: 1 1 160px; min-height: 48px; }
.ins-card .ab-cancel { background: transparent; color: #fff; border-color: #9fb6c0; }
.ins-card .ab-cancel:hover { background: rgba(255,255,255,.1); }
.ins-card .ab-go { background: #27b879; border-color: #27b879; }
.ins-card .ab-go:hover { background: #1f9e66; }

/* Hitung mundur jam kerja */
.work-cd { background: #fff; border: 1px solid #e3ebe8; border-left: 6px solid #1f9e5e; border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.work-cd.before { border-left-color: #0b5ed7; }
.work-cd.after { border-left-color: #6c757d; }
.work-cd-top { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #4b5b62; }
.work-cd-top i { font-size: 18px; color: #1f9e5e; }
.work-cd.before .work-cd-top i { color: #0b5ed7; }
.work-cd-main { font: 600 16px 'Space Grotesk', sans-serif; color: #112b3b; margin: 8px 0 10px; line-height: 1.4; }
.work-cd-main b { font: 800 26px 'Space Grotesk', sans-serif; color: #1f9e5e; font-variant-numeric: tabular-nums; letter-spacing: .03em; margin: 0 2px; }
.work-cd.before .work-cd-main b { color: #0b5ed7; }
.work-cd.after .work-cd-main { color: #495057; }
.work-bar { height: 10px; background: #e9eef1; border-radius: 99px; overflow: hidden; }
.work-bar span { display: block; height: 100%; background: linear-gradient(90deg, #27b879, #1f9e5e); border-radius: 99px; transition: width .8s linear; }
@media (max-width: 768px) { .work-cd-main b { font-size: 22px; } }

/* Nomor tugas di pojok kanan atas */
body.role-siswa #daftarTugas .task-row { position: relative; padding-right: 60px; }
.task-no { position: absolute; top: 12px; right: 12px; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 999px; background: #112b3b; color: #fff; font: 800 15px 'Space Grotesk', sans-serif; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(17,43,59,.25); }
body.role-siswa #daftarTugas .task-row.late .task-no { background: #b02a20; }

/* Hitung mundur per tugas */
.task-cd { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 12px; border-radius: 999px; background: #fff4d6; color: #7a4f00; font: 700 13px 'DM Sans', sans-serif; font-variant-numeric: tabular-nums; }
.task-cd.run { background: #e7f0ff; color: #0b4a9c; }
.task-cd.late { background: #fdecea; color: #b02a20; }
.task-cd b { font-weight: 800; }

/* Daftar tugas siswa: beri jarak agar tidak mepet */
body.role-siswa #daftarTugas .task-row { padding: 16px 16px 18px; margin-bottom: 14px; border-radius: 14px; gap: 12px 14px; }
body.role-siswa #daftarTugas .task-row > div:first-child { line-height: 1.9; }
body.role-siswa #daftarTugas .task-row .pekerjaan-nyala { margin: 3px 6px 3px 2px; font-size: 15px; }
body.role-siswa #daftarTugas .task-current-status { margin: 3px 6px 3px 0; padding: 4px 9px; font-size: 12px; }
body.role-siswa #daftarTugas .task-row .rab-sub { margin-top: 6px; line-height: 1.5; }
body.role-siswa #daftarTugas .task-row .step-box { margin-top: 12px; padding: 10px 14px; }
body.role-siswa #daftarTugas .task-right { margin-top: 4px; gap: 10px; }
body.role-siswa #daftarTugas .task-right .ab-btn, body.role-siswa #daftarTugas .task-right .btn-help { margin: 0; }
body.role-siswa #daftarTugas .task-row + .task-row { margin-top: 0; }
body.role-siswa #daftarTugas .completed-task-title { margin-top: 22px; }

/* Tugas dikelompokkan per becak (lipat) */
.becak-group { border: 1px solid #edf1f2; border-left: 5px solid #27b879; border-radius: 12px; background: #fff; margin-bottom: 10px; overflow: visible; }
#daftarTugas, #statusSemua { overflow: visible; }
.becak-group.late { border-left-color: #e45f5a; }
.becak-group > summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; min-height: 52px; }
.becak-group > summary::-webkit-details-marker { display: none; }
.becak-group > summary::after { content: '▾'; margin-left: auto; color: #5b6b73; transition: transform .15s; }
.becak-group[open] > summary::after { transform: rotate(180deg); }
.bg-no { font-weight: 700; font-size: 17px; color: #112b3b; }
.bg-sub { font-size: 14px; color: #5b6b73; }
.becak-group.late .bg-sub { color: #b02a20; font-weight: 600; }
.bg-body { border-top: 1px solid #edf1f2; padding: 6px 12px 12px; }
.cl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 4px; border-bottom: 1px dashed #e3e9eb; }
.cl-row:last-child { border-bottom: 0; }
.cl-main { flex: 1 1 200px; min-width: 0; }
.cl-name { display: block; font-size: 15px; font-weight: 600; color: #112b3b; }
.cl-meta { display: block; font-size: 12px; color: #5b6b73; margin-top: 2px; }
.cl-row.late .cl-meta { color: #b02a20; }
.cl-finish { min-height: 44px; }
.cl-more { flex-basis: 100%; }
.cl-more > summary { font-size: 13px; color: #1d5fa3; cursor: pointer; padding: 4px 0; }
.cl-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cl-seg { flex: 0 0 auto; flex-wrap: nowrap; background: transparent; padding: 0; gap: 6px; }
.cl-seg .seg-btn { min-height: 44px; padding: 9px 14px; border: 2px solid #cfd8dc; background: #fff; color: #4a5a62; font-weight: 700; }
.cl-seg .seg-btn.on[data-tstatus$="|belum"] { background: #e3e8eb; border-color: #5f6f77; color: #1f2d35; }
.cl-seg .seg-btn[data-tstatus$="|proses"] { color: #1d5fa3; border-color: #9cc3ea; }
.cl-seg .seg-btn.on[data-tstatus$="|proses"] { background: #2f7fd1; border-color: #2f7fd1; color: #fff; }
.cl-seg .seg-selesai { background: #27b879; border-color: #27b879; color: #fff; }
.cl-seg .seg-selesai:hover { background: #1f9e66; border-color: #1f9e66; }
.cl-seg .seg-btn { min-width: 96px; }
.cl-seg .seg-btn:disabled { cursor: wait; }
.cl-row.is-saving { opacity: .75; background: #f4f8ff; }
.cl-row .ph-spin { display: inline-block; animation: cl-spin 0.9s linear infinite; }
@keyframes cl-spin { to { transform: rotate(360deg); } }

/* Checklist siswa: satu tombol Aksi dengan pilihan Belum, Proses, Selesai */
.cl-row { align-items: center; }
.cl-box { font-size: 22px; color: #6b7a80; flex: 0 0 auto; }
.cl-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; vertical-align: middle; margin-right: 4px; }
.cl-badge.st-belum { background: #fde8e6; color: #b02a20; border: 1px solid #f1b7b3; }
.cl-badge.st-proses { background: #e4f0ff; color: #1d5fa3; border: 1px solid #9cc3ea; }
.cl-badge.st-selesai { background: #e6f8ef; color: #1f7a52; border: 1px solid #7ccba4; }
.cl-row.done .cl-name { text-decoration: line-through; color: #6b7a80; }
.cl-box.done { color: #27b879; }
.cl-badge.st-busy { background: #fff4d6; color: #8a5a00; border: 1px solid #e6b84a; text-transform: none; letter-spacing: 0; }.cl-row .cl-main { flex: 1 1 0; }
.cl-act { position: relative; flex: 0 0 auto; }
.cl-act-btn { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 2px solid #2f7fd1; border-radius: 10px; background: #fff; color: #1d5fa3; font-weight: 700; cursor: pointer; }
.cl-act-btn::-webkit-details-marker { display: none; }
.cl-act[open] > .cl-act-btn { background: #eaf3ff; }
.cl-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; display: flex; flex-direction: column; gap: 6px; min-width: 190px; padding: 8px; background: #fff; border: 1px solid #d8e3e0; border-radius: 12px; box-shadow: 0 8px 20px #0002; }
.cl-opt { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 12px; border: 2px solid #cfd8dc; border-radius: 10px; background: #fff; font: 700 15px 'DM Sans', sans-serif; cursor: pointer; text-align: left; }
.cl-opt:disabled { cursor: wait; opacity: .6; }
.cl-opt.opt-belum { color: #4a5a62; }
.cl-opt.opt-belum.on { background: #e3e8eb; border-color: #5f6f77; }
.cl-opt.opt-proses { color: #1d5fa3; border-color: #9cc3ea; }
.cl-opt.opt-proses.on { background: #2f7fd1; border-color: #2f7fd1; color: #fff; }
.cl-opt.opt-selesai { color: #fff; background: #27b879; border-color: #27b879; }
.cl-opt.opt-selesai:hover { background: #1f9e66; border-color: #1f9e66; }

/* Status semua becak (siswa) */
#statusSemua .becak-all { border: 1px solid #edf1f2; border-radius: 12px; margin-bottom: 8px; overflow: visible; background: #fff; }
#statusSemua .becak-all > summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; min-height: 48px; }
#statusSemua .becak-all > summary::-webkit-details-marker { display: none; }
#statusSemua .becak-all > summary::after { content: '▾'; margin-left: auto; color: #5b6b73; }
#statusSemua .becak-all[open] > summary::after { transform: rotate(180deg); }
#statusSemua .bg-body { border-top: 1px solid #edf1f2; padding: 4px 14px 10px; }
#statusSemua .cl-box.done { color: #27b879; }

/* Tombol hapus semua penugasan */
.btn-hapus-semua { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid #f1b7b3; border-radius: 10px; background: #fdecec; color: #b02a20; font: 700 14px 'DM Sans', sans-serif; cursor: pointer; }
.btn-hapus-semua:hover { background: #fad5d2; }

/* HP kecil: area sentuh diperbesar agar mudah diklik */
@media (max-width: 480px) {
    .becak-group > summary { min-height: 60px; padding: 16px; }
    .becak-group > summary .bg-no { font-size: 18px; }
    .becak-group > summary .bg-sub { font-size: 13px; }
    .cl-row { padding: 12px 6px; gap: 10px; }
    .cl-box { font-size: 26px; }
    .cl-name { font-size: 16px; }
    .cl-act-btn { min-height: 52px; min-width: 96px; justify-content: center; font-size: 16px; }
    .cl-menu { min-width: 220px; }
    .cl-opt { min-height: 56px; font-size: 17px; }
    .cl-more { flex-basis: 100%; }
    .cl-more > summary { display: block; min-height: 48px; line-height: 48px; padding: 0 12px; margin-top: 4px; border-radius: 10px; background: #eef4ff; color: #1d5fa3; font-weight: 700; font-size: 15px; }
    .cl-tools .ab-btn { min-height: 52px; font-size: 15px; }
}

/* Laporan per becak (Penugasan Tim) */
#laporanBecak .lb-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
#laporanBecak .lb-pick { display: block; margin-bottom: 14px; }
#laporanBecak .lb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; }
#laporanBecak .lb-chip { min-height: 44px; border: 2px solid #cfd8dc; border-radius: 10px; background: #fff; color: #4a5a62; font-weight: 700; font-size: 14px; cursor: pointer; }
#laporanBecak .lb-chip:hover { border-color: #7b8a92; }
#laporanBecak .lb-chip.part { border-color: #e6b84a; background: #fff8e6; color: #8a5a00; }
#laporanBecak .lb-chip.full { border-color: #27b879; background: #e6f8ef; color: #1f7a52; }
#laporanBecak .lb-chip.on { outline: 3px solid #2f7fd1; outline-offset: 1px; }
#laporanBecak .lb-sum { display: block; margin-top: 10px; font-size: 15px; color: #4a5a62; }
#laporanBecak .lb-bulk { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
#laporanBecak .lb-edit { display: flex; flex-direction: column; border: 1px solid #e3e9eb; border-radius: 12px; overflow: hidden; }
#laporanBecak .lb-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #edf1f2; cursor: pointer; background: #fff; min-height: 48px; }
#laporanBecak .lb-row:last-child { border-bottom: 0; }
#laporanBecak .lb-row input[type="checkbox"] { width: 22px; height: 22px; flex: 0 0 auto; accent-color: #27b879; cursor: pointer; }
#laporanBecak .lb-row.on { background: #f3fbf7; }
#laporanBecak .lb-no { width: 26px; flex: 0 0 auto; color: #6b7a80; font-weight: 700; font-size: 13px; }
#laporanBecak .lb-name { flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 600; color: #112b3b; }
#laporanBecak .lb-who { display: block; font-size: 12px; font-weight: 400; color: #6b7a80; margin-top: 2px; }
#laporanBecak .lb-state { flex: 0 0 auto; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
#laporanBecak .lb-state.st-done { background: #e6f8ef; color: #1f7a52; border: 1px solid #7ccba4; }
#laporanBecak .lb-state.st-todo { background: #fde8e6; color: #b02a20; border: 1px solid #f1b7b3; }
#laporanBecak .lb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#laporanBecak .lb-col { border: 1px solid #e3e9eb; border-radius: 12px; padding: 12px 14px; background: #fff; }
#laporanBecak .lb-col h3 { margin: 0 0 8px; font-size: 15px; }
#laporanBecak .lb-done { border-left: 5px solid #27b879; }
#laporanBecak .lb-done h3 { color: #1f7a52; }
#laporanBecak .lb-todo { border-left: 5px solid #e45f5a; }
#laporanBecak .lb-todo h3 { color: #b02a20; }
#laporanBecak .lb-item { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px dashed #e3e9eb; font-size: 14px; }
#laporanBecak .lb-item:last-child { border-bottom: 0; }
#laporanBecak .lb-item small { color: #6b7a80; font-size: 12px; margin-top: 2px; }
#laporanBecak .lb-none { font-size: 14px; color: #6b7a80; font-style: italic; }
@media (max-width: 768px) { #laporanBecak .lb-cols { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .cl-seg { width: 100%; display: grid; grid-template-columns: 1fr 1fr 1fr; } .cl-seg .seg-btn { font-size: 13px; padding: 9px 4px; } }

/* Pekerjaan yang menyala + langkah kerja */
.pekerjaan-nyala { display: inline-block; background: linear-gradient(135deg, #ffe066, #ffb703); color: #3b2a00; font-weight: 800; padding: 3px 11px; border-radius: 999px; box-shadow: 0 0 0 3px rgba(255,183,3,.28), 0 2px 8px rgba(255,183,3,.45); line-height: 1.35; }
.step-box { margin-top: 8px; background: #f3f9ff; border: 1px solid #cfe3f7; border-left: 4px solid #0b5ed7; border-radius: 10px; padding: 8px 12px; font-size: 14px; color: #1f2d36; }
.step-box summary { cursor: pointer; font-weight: 700; color: #0b4a9c; min-height: 30px; display: flex; align-items: center; gap: 6px; list-style: none; }
.step-box summary::-webkit-details-marker { display: none; }
.step-box ol { margin: 6px 0 2px; padding-left: 22px; line-height: 1.6; }
.step-box.empty { background: #f8f9fa; border-color: #dee2e6; border-left-color: #adb5bd; color: #6c757d; display: flex; gap: 6px; align-items: center; }
.pekerjaan-form textarea { flex: 1 1 100%; min-height: 80px; padding: 10px 12px; border: 1px solid #ced4da; border-radius: 10px; font: inherit; font-size: 14px; resize: vertical; }
.bs-table td .rab-sub b { color: #6b4e00; }

/* Pesan tim melayang (owner) */
#ownerChatFab { position: fixed; right: 18px; bottom: 18px; z-index: 1900; min-height: 56px; padding: 0 18px; border: 0; border-radius: 28px; background: #1f9e5e; color: #fff; font: 700 15px 'DM Sans', sans-serif; box-shadow: 0 6px 18px rgba(0,0,0,.25); display: flex; align-items: center; gap: 8px; cursor: grab; touch-action: none; user-select: none; }
#ownerChatFab i { font-size: 22px; }
#ownerChatFab:hover { background: #17824c; }
#ownerChatFab:focus-visible { outline: 3px solid #ffc107; outline-offset: 2px; }
.oc-panel { position: fixed; right: 16px; bottom: 16px; z-index: 1950; width: min(440px, calc(100vw - 24px)); height: min(74vh, 640px); background: #fff; border-radius: 16px; box-shadow: 0 14px 40px rgba(0,0,0,.3); display: none; flex-direction: column; overflow: hidden; }
.oc-panel.open { display: flex; }
.oc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 10px 14px; background: #112b3b; color: #fff; font: 700 15px 'Space Grotesk', sans-serif; cursor: move; touch-action: none; user-select: none; }
.oc-head span { display: flex; align-items: center; gap: 6px; }
.oc-close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; font-size: 18px; cursor: pointer; flex-shrink: 0; }
.oc-close:hover { background: rgba(255,255,255,.3); }
.oc-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.oc-body .wa-app { flex: 1; min-height: 0; height: auto; grid-template-columns: 1fr; border: 0; border-radius: 0; }
.oc-body .wa-list { flex: 0 0 auto; max-height: 150px; border-right: 0; border-bottom: 1px solid #e5ecef; }
.oc-body .wa-list-head { display: none; }
.oc-body .wa-chat { flex: 1; min-height: 0; }
.oc-body .wa-chead { padding: 8px 12px; }
.oc-body .wa-clear span { display: none; }
.oc-body .wa-clear { padding: 0 10px; width: 42px; justify-content: center; }
.oc-body .wa-empty { margin: auto; }
@media (max-width: 480px) { .oc-panel { right: 8px; bottom: 8px; width: calc(100vw - 16px); height: 80vh; } }

/* Chat gaya WhatsApp (owner dan murid) */
.wa-app { display: grid; grid-template-columns: 300px 1fr; height: calc(100vh - 150px); min-height: 520px; background: #fff; border: 1px solid #dfe6ea; border-radius: 14px; overflow: hidden; }
.wa-list { border-right: 1px solid #e5ecef; overflow-y: auto; background: #fff; }
.wa-list-head { display: flex; justify-content: space-between; align-items: center; padding: 14px; border-bottom: 1px solid #eef2f4; color: #4b5b62; font-size: 13px; }
.wa-list-head b { font-size: 15px; color: #111b21; }
.wa-contact { display: flex; gap: 10px; align-items: center; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid #f2f5f7; background: #fff; text-align: left; cursor: pointer; }
.wa-contact:hover { background: #f5f8fa; }
.wa-contact.on { background: #e9f5ef; }
.wa-avatar { width: 46px; height: 46px; border-radius: 50%; color: #fff; font: 700 15px 'DM Sans', sans-serif; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wa-cbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wa-ctop { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.wa-ctop b { font-size: 15px; color: #111b21; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-ctop small { font-size: 11px; color: #8a989e; flex-shrink: 0; }
.wa-cpreview { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 13px; color: #667781; min-width: 0; }
.wa-cpreview > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wa-unread { background: #25d366; color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 2px 7px; flex-shrink: 0; }
.wa-chat { display: flex; flex-direction: column; min-width: 0; background: #efeae2; }
.wa-chead { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #f0f2f5; border-bottom: 1px solid #dfe3e6; }
.wa-cname { flex: 1; min-width: 0; }
.wa-cname b { display: block; font-size: 16px; color: #111b21; }
.wa-cname small { font-size: 12px; color: #667781; }
.wa-clear { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px; border-radius: 10px; border: 2px solid #bb2d3b; background: #fff; color: #bb2d3b; font: 700 14px 'DM Sans', sans-serif; cursor: pointer; white-space: nowrap; }
.wa-clear:hover { background: #bb2d3b; color: #fff; }
.wa-thread { flex: 1; overflow-y: auto; padding: 14px 6%; display: flex; flex-direction: column; gap: 3px; }
.wa-day { align-self: center; margin: 8px 0; background: rgba(255,255,255,.9); color: #54656f; font-size: 12px; padding: 4px 12px; border-radius: 8px; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.wa-row { display: flex; margin: 1px 0; }
.wa-row.out { justify-content: flex-end; }
.wa-row.in { justify-content: flex-start; }
.wa-bubble { max-width: 72%; padding: 6px 9px 4px; border-radius: 8px; box-shadow: 0 1px 1px rgba(0,0,0,.12); font-size: 15px; line-height: 1.4; color: #111b21; overflow-wrap: anywhere; }
.wa-row.out .wa-bubble { background: #d9fdd3; border-top-right-radius: 2px; }
.wa-row.in .wa-bubble { background: #fff; border-top-left-radius: 2px; }
.wa-from { font-size: 12px; font-weight: 700; color: #06a77d; margin-bottom: 2px; }
.wa-meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: 11px; color: #667781; margin-top: 2px; }
.wa-ticks i { color: #53bdeb; font-size: 15px; }
.wa-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; background: #f0f2f5; }
.wa-compose textarea { flex: 1; min-height: 44px; max-height: 140px; padding: 11px 16px; border: 0; border-radius: 22px; background: #fff; font: inherit; font-size: 15px; resize: none; box-sizing: border-box; }
.wa-compose textarea:focus { outline: none; box-shadow: 0 0 0 2px #00a884; }
.wa-send { width: 48px; height: 48px; border-radius: 50%; border: 0; background: #00a884; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; cursor: pointer; flex-shrink: 0; }
.wa-send:hover { background: #008f72; }
.wa-send:disabled { opacity: .6; cursor: default; }
.wa-empty { margin: auto; text-align: center; color: #667781; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px; font-size: 14px; }
.wa-empty i { font-size: 48px; color: #00a884; }
.wa-empty-side { padding: 20px; color: #667781; font-size: 14px; }
.pm-thread { background: #efeae2; }
@media (max-width: 768px) {
    .wa-app { grid-template-columns: 1fr; height: auto; min-height: 0; }
    .wa-list { max-height: 230px; border-right: 0; border-bottom: 1px solid #e5ecef; }
    .wa-chat { height: 72vh; min-height: 420px; }
    .wa-bubble { max-width: 86%; }
    .wa-thread { padding: 12px 4%; }
    .wa-clear span { display: none; }
    .wa-clear { padding: 0 10px; width: 44px; justify-content: center; }
}

/* Jendela pesan murid (rapi) dan popup terkirim */
.pm-box { border-radius: 18px 18px 0 0; }
@media (min-width: 769px) { .pm-box { border-radius: 18px; } }
.pm-head { gap: 12px; padding: 14px 16px; background: linear-gradient(135deg, #112b3b, #1e4658); }
.pm-avatar { width: 42px; height: 42px; border-radius: 50%; background: #27b879; color: #fff; display: grid; place-items: center; font-size: 22px; flex-shrink: 0; }
.pm-headtext { flex: 1; min-width: 0; }
.pm-title { font-size: 18px; }
.pm-sub { font-size: 13px; color: #cfe6dc; }
.pm-close { width: 44px; height: 44px; }
.pm-clear { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 20px; cursor: pointer; margin-right: 6px; flex-shrink: 0; }
.pm-clear:hover { background: rgba(255,255,255,.28); }
.pm-clear:focus-visible { outline: 3px solid #ffc107; outline-offset: 2px; }
#pesanTim-card { margin-top: 0; }
#pesanBox .chat-card .rab-section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
#pesanBox .chat-card .rab-section-head > div:first-child { min-width: 0; flex: 1 1 200px; }
#pesanClear { background: #fff; color: #bb2d3b; border: 2px solid #bb2d3b; min-height: 44px; font-size: 14px; }
#pesanClear:hover { background: #bb2d3b; color: #fff; }
@media (max-width: 768px) { #pesanClear { width: 100%; justify-content: center; } }
.pm-thread { background: #f1f6f4; padding: 16px; }
.pm-compose { display: flex; gap: 10px; align-items: flex-end; padding: 12px; background: #fff; border-top: 1px solid #e3ebe8; }
.pm-compose textarea { flex: 1; min-height: 52px; max-height: 140px; padding: 12px 14px; border: 1px solid #ced4da; border-radius: 14px; font: inherit; font-size: 16px; resize: none; background: #fff; }
.pm-compose textarea:focus { outline: none; border-color: #27b879; box-shadow: 0 0 0 3px rgba(39,184,121,.2); }
.pm-compose .pm-send { min-height: 52px; min-width: 110px; border-radius: 14px; background: #1f9e5e; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 3px 10px rgba(31,158,94,.35); }
.pm-compose .pm-send:hover:not(:disabled) { background: #17824c; }
.pm-compose .pm-send:disabled { opacity: .7; }
.pm-status { background: #fff; font-size: 12px; color: #6c757d; padding: 0 14px 10px; font-weight: 500; }
.pm-status.err { color: #b02a20; font-weight: 700; }
.sent-pop { position: fixed; top: 16px; left: 50%; transform: translate(-50%, -140%); z-index: 6000; display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-radius: 14px; font: 700 16px 'DM Sans', sans-serif; box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: transform .3s ease; max-width: 92vw; }
.sent-pop i { font-size: 24px; }
.sent-pop.show { transform: translate(-50%, 0); }
.sent-pop.ok { background: #1f9e5e; color: #fff; }
.sent-pop.err { background: #b02a20; color: #fff; }

/* Halaman murid: akses cepat, panduan, dan bantuan teman */
.quick-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.quick-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 84px; padding: 12px 8px; border-radius: 14px; border: 0; text-decoration: none; color: #fff; font: 700 14px 'DM Sans', sans-serif; cursor: pointer; box-shadow: 0 4px 12px rgba(17,43,59,.15); text-align: center; }
.quick-btn i { font-size: 28px; line-height: 1; }
.quick-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.quick-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px #112b3b; }
.qb-tugas { background: #112b3b; }
.qb-teman { background: #0b5ed7; }
.qb-pesan { background: #27b879; }
.how-card { background: #fff; border: 1px solid #e3ebe8; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; color: #3d4d55; }
.how-card summary { font-weight: 700; color: #14232d; cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.how-card ol { margin: 8px 0 0; padding-left: 20px; line-height: 1.6; }
.pill-teman { display: inline-flex; align-items: center; gap: 4px; background: #e7f0ff; color: #0b5ed7; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
#bantuanTeman, #daftarTugas, #penilaianSaya { scroll-margin-top: 12px; }
@media (max-width: 768px) { .quick-btn { min-height: 76px; font-size: 13px; } .quick-btn i { font-size: 26px; } }

/* Rating pekerjaan */
.stars { display: inline-flex; gap: 2px; color: #f0b429; font-size: 16px; vertical-align: middle; }
.rating-num { font-size: 12px; font-weight: 700; color: #6c5300; }
.btn-rate-add { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; border: 1px solid #f0b429; border-radius: 8px; background: #fff8e6; color: #8a5a00; font: 700 13px 'DM Sans', sans-serif; cursor: pointer; white-space: nowrap; }
.btn-rate-add:hover { background: #ffefc2; }
.rating-show { margin-top: 6px; }
.rating-show .stars { font-size: 18px; }
.rating-none { margin-top: 6px; font-size: 13px; color: #6c757d; display: flex; align-items: center; gap: 6px; }
.rate-box { max-width: 420px; text-align: center; }
.rate-stars { display: flex; justify-content: center; gap: 6px; margin: 8px 0 4px; }
.rate-stars button { width: 52px; height: 52px; border: 0; background: transparent; cursor: pointer; border-radius: 10px; color: #c9ced2; font-size: 36px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.rate-stars button.on { color: #f0b429; }
.rate-stars button:hover { background: #fff8e6; }
.rate-label { font-size: 14px; font-weight: 700; color: #6c5300; min-height: 20px; margin-bottom: 10px; }
.rate-box textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #ced4da; border-radius: 10px; font: inherit; font-size: 15px; resize: vertical; }
.rate-actions { display: grid !important; grid-template-columns: auto 1fr 1fr !important; }
.rate-actions .btn:disabled { opacity: .5; cursor: default; }
@media (max-width: 768px) { .rate-actions { grid-template-columns: 1fr 1fr !important; } .rate-actions > span { display: none; } .rate-actions #rateDel { grid-column: 1 / -1; } }

/* Murid: form tambah/ubah akun */
.murid-form-wrap { border: 1px solid #e3ebe8; border-radius: 10px; padding: 14px; margin-bottom: 14px; background: #fbfdfc; }
.murid-form-wrap h3 { margin: 0 0 10px; font: 700 15px 'Space Grotesk', sans-serif; color: #14232d; }
.murid-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.murid-form input[type="text"], .murid-form input[type="password"] { flex: 1 1 200px; min-height: 42px; padding: 8px 12px; border: 1px solid #ced4da; border-radius: 8px; font-size: 14px; background: #fff; }
.murid-aktif { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: #3d4d55; min-height: 42px; }
.murid-aktif input { width: 18px; height: 18px; accent-color: #27b879; }
.murid-hint { margin-top: 8px; font-size: 12px; color: #6c757d; }
.murid-table tr.murid-nonaktif td { color: #8a989e; }

/* Toolbar tabel: cari, filter, jumlah baris */
.dt { margin-top: 4px; }
.dt-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 12px 0 10px; }
.dt-search { flex: 1 1 240px; position: relative; display: flex; align-items: center; }
.dt-search i { position: absolute; left: 11px; color: #6c757d; font-size: 16px; pointer-events: none; }
.dt-search input { width: 100%; height: 38px; padding: 0 12px 0 34px; border: 1px solid #ced4da; border-radius: 8px; font: 14px 'DM Sans', sans-serif; background: #fff; }
.dt-search input:focus, .dt-field select:focus { outline: none; border-color: #27b879; box-shadow: 0 0 0 3px rgba(39,184,121,.18); }
.dt-field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: #6c757d; font-weight: 600; }
.dt-field select { height: 38px; padding: 0 30px 0 10px; border: 1px solid #ced4da; border-radius: 8px; background: #fff; font: 14px 'DM Sans', sans-serif; color: #212529; min-width: 150px; }
.dt-size select { min-width: 84px; }
.dt-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
.dt-info { font-size: 13px; color: #6c757d; }
.dt-pages { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.dt-pg { min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid #dee2e6; border-radius: 6px; background: #fff; color: #0b5ed7; font: 600 13px 'DM Sans', sans-serif; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.dt-pg:hover:not(:disabled) { background: #eef4ff; }
.dt-pg.on { background: #0b5ed7; border-color: #0b5ed7; color: #fff; }
.dt-pg:disabled { color: #adb5bd; cursor: default; background: #f8f9fa; }
.dt-gap { padding: 0 4px; color: #6c757d; }
.bs-table thead th.dt-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.bs-table thead th.dt-sort:hover { background: #eef2f5; }
.bs-table thead th.dt-sort.on { color: #0b5ed7; }
.bs-table thead th.dt-sort i { font-size: 13px; opacity: .7; vertical-align: -1px; }
.bs-table thead th.dt-sort.on i { opacity: 1; }
.bs-table td.dt-empty { text-align: center; color: #6c757d; padding: 22px 12px; }
.bantuan-table td { vertical-align: top; }
.bantuan-table .help-msg { margin: 0; }
.dt-sort-m { display: none; }
@media (max-width: 768px) {
    .dt-sort-m { display: flex; }
    .dt-field, .dt-size, .dt-field select { width: 100%; }
    .dt-toolbar { gap: 8px; }
    .dt-search input { height: 44px; font-size: 16px; }
    .dt-field select { height: 44px; font-size: 16px; }
    .dt-info { width: 100%; text-align: center; }
    .dt-search { flex-basis: 100%; }
    .dt-pg { min-width: 40px; height: 40px; }
    .dt-foot { justify-content: center; text-align: center; }
    .bantuan-table td { display: block; }
}
/* HP: setiap baris menjadi kartu, tombol aksi tetap terlihat tanpa menggeser tabel */
@media (max-width: 768px) {
    .table-wrap:has(.bs-table) { overflow: visible; border: 0; background: transparent; }
    .bs-table, .bs-table.tugas-table { display: block; min-width: 0 !important; background: transparent; }
    .bs-table thead { display: none; }
    .bs-table tbody { display: block; }
    .bs-table tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; background: #fff; border: 1px solid #dee2e6; border-radius: 10px; padding: 12px; margin-bottom: 10px; }
    .bs-table tbody tr:hover td { background: transparent !important; }
    .bs-table td { display: block; border: 0; padding: 0; background: transparent !important; }
    .bs-table td.col-no { display: none; }
    .bs-table td.col-act { width: auto; margin-left: auto; }
    .bs-table tr.late-row { border-color: #f1aeb5; background: #fff5f5; }
    .bs-table tr.row-editing { border-color: #27b879; background: #e7f5ee; }
    .btn-act { height: 40px; width: 40px; padding: 0; margin-left: 0; }
    .btn-act .btn-label { display: none; }
}
.pekerjaan-chip button { border: 0; background: transparent; color: inherit; cursor: pointer; width: 32px; height: 32px; min-height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.pekerjaan-chip button:hover { background: #d4f1e3; }
.pekerjaan-chip button[data-pekdel] { color: #c0392b; }
.help-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
.help-status { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 10px; white-space: nowrap; }
.help-status.baru { background: #fdecea; color: #c0392b; }
.help-status.proses { background: #e9f3ff; color: #1d5fa3; }
.help-status.selesai { background: #e9f9f2; color: #1f7a52; }
.help-note { margin: 6px 0; font-size: 13px; background: #f1fbf6; padding: 8px 10px; border-radius: 8px; }
.help-actions { display: flex; justify-content: flex-end; }
.help-done { margin-top: 12px; }
.help-done summary { cursor: pointer; font-weight: 600; color: #5b6b73; padding: 8px 0; min-height: 44px; display: flex; align-items: center; }
.help-item.help-baru { border-left: 5px solid #e45f5a; }
.help-item.help-proses { border-left: 5px solid #3b7fc0; }
.help-item.help-selesai { border-left: 5px solid #27b879; opacity: .85; }
@media (max-width: 768px) { .help-actions .btn { width: 100%; min-height: 48px; justify-content: center; } }
body.role-siswa .new-task-banner { margin-top: 4px; }
body.role-siswa .new-task-banner .btn { width: 100%; justify-content: center; min-height: 48px; }
/* Tombol "Tandai sudah dibaca": biru terang, besar, dan jelas di atas banner kuning */
.btn-read { background: #0b5ed7; color: #fff; font: 700 15px 'DM Sans', sans-serif; min-height: 48px; padding: 0 20px; border-radius: 10px; box-shadow: 0 3px 10px rgba(11,94,215,.35); display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: 0; }
.btn-read i { font-size: 20px; }
.btn-read:hover { background: #0a50b8; transform: translateY(-1px); }
.btn-read:active { transform: translateY(0); }
.btn-read:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px #0b5ed7; }
.new-task-banner .btn-read { width: auto; }
@media (max-width: 768px) { .new-task-banner .btn-read { width: 100%; justify-content: center; } }
