:root {
    --biru: #1877f2;
    --biru-gelap: #0b5cd6;
    --hijau: #16a34a;
    --merah: #dc2626;
    --kuning: #f59e0b;
    --abu: #6b7280;
    --latar: #f0f2f5;
    --kad: #ffffff;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--latar);
    color: #1c1e21;
    padding-bottom: 70px;
    -webkit-tap-highlight-color: transparent;
}
.header-app {
    background: var(--biru);
    color: #fff;
    padding: 14px 16px;
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-app h1 { font-size: 17px; margin: 0; font-weight: 600; }

.kandungan { padding: 12px; max-width: 720px; margin: 0 auto; }

.kad {
    background: var(--kad);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.kad-temujanji {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}
.kad-temujanji .masa {
    font-weight: 700;
    color: var(--biru);
    font-size: 15px;
    min-width: 52px;
}
.kad-temujanji .info { flex: 1; }
.kad-temujanji .nama { font-weight: 600; font-size: 15px; }
.kad-temujanji .meta { font-size: 12.5px; color: var(--abu); margin-top: 2px; }

.tag {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    margin-right: 4px;
}
.tag-dm { background: #fee2e2; color: #b91c1c; }
.tag-hpt { background: #dbeafe; color: #1d4ed8; }
.tag-lain { background: #f3f4f6; color: #374151; }

.btn {
    display: inline-block;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
.btn-utama { background: var(--biru); color: #fff; width: 100%; }
.btn-kecil { padding: 6px 12px; font-size: 13px; }
.btn-hijau { background: var(--hijau); color: #fff; }
.btn-merah { background: var(--merah); color: #fff; }
.btn-luar { background: #fff; border: 1px solid #d1d5db; color: #374151; }

.tick-kehadiran {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    display: flex; align-items: center; justify-content: center;
    background: #fff;
}
.tick-kehadiran.hadir { background: var(--hijau); border-color: var(--hijau); color: #fff; }
.tick-kehadiran.tidak_hadir { background: var(--merah); border-color: var(--merah); color: #fff; }

input, select, textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px; /* elak zoom auto iOS */
    margin-bottom: 10px;
    background: #fff;
}
label { font-size: 13px; font-weight: 600; color: #374151; display: block; margin-bottom: 4px; }

.nav-bawah {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    z-index: 100;
}
.nav-bawah a {
    flex: 1;
    text-align: center;
    padding: 8px 0 6px;
    text-decoration: none;
    color: var(--abu);
    font-size: 11px;
}
.nav-bawah a.aktif { color: var(--biru); font-weight: 700; }
.nav-bawah .ikon { font-size: 20px; display: block; }

.amaran-lebih-had {
    background: #fff7ed;
    border: 1px solid var(--kuning);
    color: #92400e;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 10px;
}

.badge-beban {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}
.beban-rendah { background: #dcfce7; color: #15803d; }
.beban-sederhana { background: #fef9c3; color: #a16207; }
.beban-tinggi { background: #fee2e2; color: #b91c1c; }

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #1c1e21;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s;
}
.toast.tunjuk { opacity: 1; }

.tab-bar {
    display: flex;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid #e5e7eb;
}
.tab-bar button {
    flex: 1;
    border: none;
    background: #fff;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--abu);
}
.tab-bar button.aktif { background: var(--biru); color: #fff; }

.sejarah-item {
    border-left: 3px solid var(--kuning);
    padding: 6px 10px;
    margin-bottom: 6px;
    font-size: 12.5px;
    background: #fffbeb;
    border-radius: 4px;
}

.kosong { text-align: center; color: var(--abu); padding: 30px 10px; font-size: 13px; }
