/* ============================================
   Sistem Tagihan Bulanan Wartawan
   CSS - Clean, Premium, Responsive
   ============================================ */

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

:root {
    --emerald-50: #ecfdf5; --emerald-100: #d1fae5; --emerald-200: #a7f3d0;
    --emerald-300: #6ee7b7; --emerald-400: #34d399; --emerald-500: #10b981;
    --emerald-600: #059669; --emerald-700: #047857; --emerald-800: #065f46;
    --amber-50: #fffbeb; --amber-100: #fef3c7; --amber-200: #fde68a;
    --amber-600: #d97706; --amber-700: #b45309;
    --red-50: #fef2f2; --red-100: #fee2e2; --red-200: #fecaca;
    --red-600: #dc2626; --red-700: #b91c1c;
    --slate-50: #f8fafc; --slate-100: #f1f5f9; --slate-200: #e2e8f0;
    --slate-300: #cbd5e1; --slate-400: #94a3b8; --slate-500: #64748b;
    --slate-600: #475569; --slate-700: #334155; --slate-800: #1e293b;
    --slate-900: #0f172a;
    --wa-green: #25D366;
    --radius: 8px; --radius-lg: 12px; --radius-xl: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,.06); --shadow-lg: 0 8px 32px rgba(0,0,0,.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--slate-800); background: var(--slate-50);
    line-height: 1.5; min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

.container { max-width: 720px; margin: 0 auto; padding: 0 1rem; }

/* ---- Utilities ---- */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--slate-500); }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.text-lg { font-size: 1.125rem; }
.text-emerald { color: var(--emerald-600); }
.text-red { color: var(--red-600); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.mb-4 { margin-bottom: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.flex-1 { flex: 1; }

.hidden-mobile { display: block; }
.show-mobile { display: none; }

@media (max-width: 640px) {
    .hidden-mobile { display: none !important; }
    .show-mobile { display: block !important; }
}

/* ============================================
   LOGIN PAGE (index.php)
   ============================================ */
.login-wrapper {
    min-height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: #000;
    position: relative; overflow: hidden; padding: 1.5rem;
}

/* Animated Background Orbs */
.login-bg-orbs {
    position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.orb {
    position: absolute; border-radius: 50%;
    filter: blur(80px); opacity: 0.15;
}
.orb-1 {
    width: 400px; height: 400px;
    background: var(--emerald-500);
    top: -100px; right: -100px;
    animation: floatOrb1 8s ease-in-out infinite;
}
.orb-2 {
    width: 300px; height: 300px;
    background: var(--emerald-400);
    bottom: -80px; left: -80px;
    animation: floatOrb2 10s ease-in-out infinite;
}
.orb-3 {
    width: 200px; height: 200px;
    background: var(--emerald-300);
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    animation: floatOrb3 12s ease-in-out infinite;
}

@keyframes floatOrb1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-40px, 40px); }
}
@keyframes floatOrb2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}
@keyframes floatOrb3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

.login-container {
    width: 100%; max-width: 28rem;
    position: relative; z-index: 1;
    display: flex; flex-direction: column; align-items: center;
}

/* Logo Section */
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo-icon {
    width: 4rem; height: 4rem; border-radius: 1rem;
    background: var(--emerald-600);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.3);
}
.login-logo-icon svg { width: 2rem; height: 2rem; color: #fff; }
.login-title { font-size: 1.75rem; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.login-subtitle { color: var(--slate-400); margin-top: .375rem; font-size: .9375rem; }

/* Login Card */
.login-card {
    width: 100%; background: #fff; border-radius: var(--radius-xl);
    padding: 2rem; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.login-form { margin-top: 0; }

/* Input with Icon */
.input-icon-wrapper { position: relative; }
.input-icon {
    position: absolute; left: .875rem; top: 50%; transform: translateY(-50%);
    color: var(--slate-400); display: flex; pointer-events: none;
}
.form-group .input-icon-wrapper input { padding-left: 2.75rem; }

/* Login Button */
.btn-login {
    height: 3rem; font-size: .9375rem; margin-top: .5rem;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}
.btn-login:hover {
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
    transform: translateY(-1px);
    transition: all .2s;
}

/* Admin Link */
.login-admin-link { margin-top: 1.5rem; }
.login-admin-link .btn-link {
    color: var(--slate-400); font-size: .8125rem;
}
.login-admin-link .btn-link:hover { color: var(--amber-600); }

/* Login Footer */
.login-footer {
    padding: 1.5rem; text-align: center;
    font-size: .75rem; color: var(--slate-500);
    position: relative; z-index: 1;
}

@media (max-width: 480px) {
    .login-wrapper { padding: 1rem; }
    .login-card { padding: 1.5rem; }
    .login-title { font-size: 1.375rem; }
    .login-logo-icon { width: 3.5rem; height: 3.5rem; }
}

/* ============================================
   PAGE WRAP 2 — Full Dark (pencarian.php)
   ============================================ */
.page-wrap2 {
    min-height: 100vh; display: flex; flex-direction: column;
    background: #000; position: relative; overflow-x: hidden;
}

/* Animated Background Orbs for Pencarian */
.pencarian-bg-orbs {
    position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0;
}
.orb-p {
    position: absolute; border-radius: 50%;
    filter: blur(100px); opacity: .08;
}
.orb-p1 {
    width: 500px; height: 500px;
    background: var(--emerald-500);
    top: -150px; right: -120px;
    animation: orbP1 10s ease-in-out infinite;
}
.orb-p2 {
    width: 400px; height: 400px;
    background: var(--emerald-400);
    bottom: -100px; left: -100px;
    animation: orbP2 12s ease-in-out infinite;
}
.orb-p3 {
    width: 250px; height: 250px;
    background: var(--emerald-300);
    top: 40%; left: 30%;
    animation: orbP3 14s ease-in-out infinite;
}
.orb-p4 {
    width: 180px; height: 180px;
    background: #34d399;
    top: 20%; right: 25%;
    animation: orbP4 9s ease-in-out infinite;
    opacity: .05;
}

@keyframes orbP1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-60px, 40px) scale(1.05); }
    66% { transform: translate(30px, -20px) scale(.95); }
}
@keyframes orbP2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(50px, -40px); }
}
@keyframes orbP3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, 30px) scale(1.15); }
}
@keyframes orbP4 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -30px); }
}

/* ---- Navigation ---- */
.pnav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.pnav-inner {
    max-width: 780px; margin: 0 auto; padding: 0 1rem;
    display: flex; align-items: center; justify-content: space-between;
    height: 56px;
}
.pnav-brand { display: flex; align-items: center; gap: .625rem; }
.pnav-logo {
    width: 32px; height: 32px; border-radius: 8px;
    background: linear-gradient(135deg, var(--emerald-600), var(--emerald-400));
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 10px rgba(5,150,105,.35);
}
.pnav-logo svg { width: 16px; height: 16px; color: #fff; }
.pnav-text { display: flex; flex-direction: column; }
.pnav-title { font-weight: 700; font-size: .875rem; color: #fff; line-height: 1.2; }
.pnav-sub { font-size: .625rem; color: rgba(255,255,255,.35); font-weight: 400; letter-spacing: .02em; }

.pnav-actions { display: flex; align-items: center; gap: .375rem; }
.pnav-link {
    display: inline-flex; align-items: center; gap: .25rem;
    font-size: .6875rem; font-weight: 600; color: rgba(255,255,255,.45);
    padding: .375rem .625rem; border-radius: 8px;
    border: 1px solid rgba(255,255,255,.08); transition: all .2s;
    text-decoration: none;
}
.pnav-link:hover { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); }
.pnav-link-admin:hover { color: var(--amber-200); border-color: rgba(245,158,11,.3); background: rgba(245,158,11,.08); }
.pnav-link-logout:hover { color: #fca5a5; border-color: rgba(239,68,68,.3); background: rgba(239,68,68,.08); }

@media (max-width: 480px) {
    .pnav-sub { display: none; }
    .pnav-inner { height: 50px; }
    .pnav-link span { display: none; }
    .pnav-link { padding: .375rem; }
}

/* ---- Hero Search Section ---- */
.psearch-hero {
    position: relative; z-index: 1;
    padding: 2.5rem 0 2rem;
}
.psearch-inner {
    max-width: 780px; margin: 0 auto; padding: 0 1rem;
}

.psearch-greeting { text-align: center; margin-bottom: 1.75rem; }
.psearch-h1 {
    font-size: 1.75rem; font-weight: 800; color: #fff;
    letter-spacing: -.02em; line-height: 1.2;
    background: linear-gradient(135deg, #fff 0%, var(--emerald-200) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.psearch-desc {
    font-size: .875rem; color: rgba(255,255,255,.35); margin-top: .375rem;
}

/* Search Form */
.psearch-form { margin-bottom: 0; }

.psearch-field {
    display: flex; align-items: center;
    background: rgba(255,255,255,.07);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    padding: .375rem .375rem .375rem 1rem;
    transition: all .25s;
    box-shadow: 0 4px 24px rgba(0,0,0,.3);
}
.psearch-field-focus,
.psearch-field:focus-within {
    background: rgba(255,255,255,.1);
    border-color: rgba(16,185,129,.4);
    box-shadow: 0 4px 24px rgba(0,0,0,.3), 0 0 0 3px rgba(16,185,129,.12), 0 0 40px rgba(16,185,129,.08);
}

.psearch-field-icon {
    color: rgba(255,255,255,.3); flex-shrink: 0; display: flex;
    transition: color .25s;
}
.psearch-field:focus-within .psearch-field-icon { color: var(--emerald-400); }

.psearch-input {
    flex: 1; border: none; background: transparent; font-size: 1rem;
    font-family: inherit; color: #fff; outline: none;
    padding: .625rem .5rem; min-width: 0;
}
.psearch-input::placeholder { color: rgba(255,255,255,.25); }

.psearch-clear {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%;
    color: rgba(255,255,255,.3); flex-shrink: 0; transition: all .15s;
}
.psearch-clear:hover { color: #fca5a5; background: rgba(239,68,68,.1); }

.psearch-btn {
    background: linear-gradient(135deg, var(--emerald-600), var(--emerald-500));
    color: #fff; border: none;
    border-radius: 10px; padding: .5625rem 1.25rem;
    font-size: .875rem; font-weight: 600; font-family: inherit;
    cursor: pointer; white-space: nowrap; transition: all .2s;
    flex-shrink: 0;
    display: inline-flex; align-items: center; gap: .375rem;
    box-shadow: 0 4px 12px rgba(5,150,105,.3);
}
.psearch-btn:hover {
    background: linear-gradient(135deg, var(--emerald-700), var(--emerald-600));
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(5,150,105,.4);
}

/* Stats Dashboard */
.pstat-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: .75rem; margin-top: 2rem;
}
.pstat-card {
    background: rgba(255,255,255,.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: var(--radius-lg);
    padding: 1rem;
    display: flex; align-items: flex-start; gap: .75rem;
    transition: all .25s; position: relative; overflow: hidden;
}
.pstat-card:hover {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.12);
    transform: translateY(-2px);
}
.pstat-icon {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.pstat-icon-teal { background: rgba(20,184,166,.12); color: #5eead4; }
.pstat-icon-rose { background: rgba(244,63,94,.12); color: #fda4af; }
.pstat-icon-mint { background: rgba(16,185,129,.12); color: #6ee7b7; }

.pstat-body { min-width: 0; }
.pstat-val {
    font-size: 1.0625rem; font-weight: 700; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    line-height: 1.3;
}
.pstat-val-rose { color: #fda4af; }
.pstat-val-mint { color: #6ee7b7; }
.pstat-lbl {
    font-size: .625rem; color: rgba(255,255,255,.3); margin-top: .125rem;
    text-transform: uppercase; letter-spacing: .05em; font-weight: 500;
}

/* Stat card bottom accent bar */
.pstat-bar {
    position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    opacity: 0; transition: opacity .25s;
}
.pstat-card:hover .pstat-bar { opacity: 1; }
.pstat-bar-teal { background: linear-gradient(90deg, #14b8a6, transparent); }
.pstat-bar-rose { background: linear-gradient(90deg, #f43f5e, transparent); }
.pstat-bar-mint { background: linear-gradient(90deg, var(--emerald-500), transparent); }

@media (max-width: 640px) {
    .psearch-hero { padding: 1.5rem 0 1.25rem; }
    .psearch-h1 { font-size: 1.375rem; }
    .psearch-desc { font-size: .8125rem; }
    .psearch-greeting { margin-bottom: 1.25rem; }
    .pstat-grid { grid-template-columns: 1fr; gap: .5rem; }
    .pstat-card { padding: .875rem; }
    .pstat-val { font-size: .9375rem; }
    .psearch-input { font-size: .875rem; }
}

/* ---- Search Results ---- */
.presults {
    flex: 1; position: relative; z-index: 1;
    padding: 1.5rem 0 2rem;
}
.presults-inner {
    max-width: 780px; margin: 0 auto; padding: 0 1rem;
}

/* Results Info Banner */
.presults-info {
    display: flex; align-items: center; gap: .625rem;
    font-size: .8125rem; color: rgba(255,255,255,.5); margin-bottom: 1rem;
    padding: .625rem 1rem;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(8px);
}
.presults-info strong { color: rgba(255,255,255,.8); }
.presults-info-icon {
    width: 28px; height: 28px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.presults-info-ok { background: rgba(16,185,129,.12); color: #6ee7b7; }
.presults-info-empty { background: rgba(255,255,255,.06); color: rgba(255,255,255,.3); }

/* Results Grid */
.pr-grid { display: flex; flex-direction: column; gap: .875rem; }

/* Result Card */
.pr-card {
    background: rgba(255,255,255,.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all .25s;
}
.pr-card:hover {
    background: rgba(255,255,255,.08);
    border-color: rgba(16,185,129,.25);
    box-shadow: 0 8px 32px rgba(0,0,0,.3), 0 0 0 1px rgba(16,185,129,.1);
    transform: translateY(-2px);
}

.pr-card-top {
    display: flex; align-items: center; gap: .875rem;
    padding: 1.25rem 1.25rem 1rem;
    flex-wrap: wrap;
}

.pr-avatar {
    width: 46px; height: 46px; border-radius: 12px;
    background: linear-gradient(135deg, var(--emerald-600), var(--emerald-400));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.125rem; font-weight: 700; flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(5,150,105,.3);
}

.pr-identity { flex: 1; min-width: 0; }
.pr-name {
    font-size: 1rem; font-weight: 700; color: #fff;
    letter-spacing: -.01em;
}
.pr-meta { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: .25rem; }

.pr-chip {
    font-size: .625rem; font-weight: 600; padding: .1875rem .5rem;
    border-radius: 999px; letter-spacing: .02em;
}
.pr-chip-pos {
    background: rgba(255,255,255,.08); color: rgba(255,255,255,.45);
    border: 1px solid rgba(255,255,255,.06);
}
.pr-chip-area {
    background: rgba(16,185,129,.1); color: #6ee7b7;
    border: 1px solid rgba(16,185,129,.15);
    display: inline-flex; align-items: center; gap: .1875rem;
}

.pr-badge {
    font-size: .6875rem; font-weight: 600; padding: .3125rem .625rem;
    border-radius: 999px; white-space: nowrap;
    display: inline-flex; align-items: center; gap: .25rem;
}
.pr-badge-warn {
    background: rgba(244,63,94,.12); color: #fda4af;
    border: 1px solid rgba(244,63,94,.2);
}
.pr-badge-late {
    background: rgba(245,158,11,.12); color: #fcd34d;
    border: 1px solid rgba(245,158,11,.25);
}
.pr-badge-ok {
    background: rgba(16,185,129,.12); color: #6ee7b7;
    border: 1px solid rgba(16,185,129,.2);
}

/* Card Stats Row */
.pr-stats {
    display: flex; align-items: center; justify-content: center;
    padding: .875rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,.05);
    border-bottom: 1px solid rgba(255,255,255,.05);
    background: rgba(0,0,0,.15);
}
.pr-stat-item { flex: 1; text-align: center; min-width: 0; }
.pr-stat-num {
    font-size: .875rem; font-weight: 700; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pr-stat-red { color: #fda4af; }
.pr-stat-green { color: #6ee7b7; }
.pr-stat-lbl2 {
    font-size: .5625rem; color: rgba(255,255,255,.3); margin-top: .125rem;
    text-transform: uppercase; letter-spacing: .06em; font-weight: 500;
}
.pr-stat-divider {
    width: 1px; height: 28px;
    background: rgba(255,255,255,.06);
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .pr-stats { flex-direction: column; gap: .5rem; }
    .pr-stat-item { display: flex; align-items: center; justify-content: space-between; text-align: left; }
    .pr-stat-lbl2 { margin-top: 0; }
    .pr-stat-divider { width: 100%; height: 1px; }
}

/* Card Action Button */
.pr-action-btn {
    display: flex; align-items: center; justify-content: center; gap: .375rem;
    padding: .875rem 1.25rem;
    background: linear-gradient(135deg, rgba(16,185,129,.12), rgba(16,185,129,.06));
    color: #6ee7b7; font-size: .8125rem; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: all .2s; text-decoration: none;
    letter-spacing: .01em;
}
.pr-action-btn:hover {
    background: linear-gradient(135deg, rgba(16,185,129,.2), rgba(16,185,129,.1));
    color: #a7f3d0;
}
.pr-action-btn svg { transition: transform .2s; }
.pr-action-btn:hover svg { transform: translateX(3px); }

/* ---- Pencarian Footer ---- */
.pfooter {
    position: relative; z-index: 1; margin-top: auto;
    border-top: 1px solid rgba(255,255,255,.05);
    padding: 1rem;
}
.pfooter-inner {
    max-width: 780px; margin: 0 auto;
    display: flex; align-items: center; justify-content: center; gap: .375rem;
    font-size: .6875rem; color: rgba(255,255,255,.2);
}

/* Legacy page-wrap for detail.php compatibility */
.page-wrap {
    min-height: 100vh; display: flex; flex-direction: column;
    background: var(--slate-50);
}

/* ============================================
   DETAIL PAGE (detail.php)
   ============================================ */

/* Top Header */
.top-header {
    background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--slate-200); position: sticky; top: 0; z-index: 50;
}
.header-inner {
    max-width: 72rem; margin: 0 auto; padding: .75rem 1rem;
    display: flex; align-items: center; justify-content: space-between;
}
.header-left { display: flex; align-items: center; gap: .625rem; }
.header-right { display: flex; align-items: center; gap: .5rem; }

.header-back-link {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: var(--radius);
    color: var(--slate-500); transition: all .15s;
    border: 1px solid var(--slate-200);
}
.header-back-link:hover {
    color: var(--emerald-600); border-color: var(--emerald-200); background: var(--emerald-50);
}

.header-logo {
    width: 2.25rem; height: 2.25rem; border-radius: .5rem; display: flex;
    align-items: center; justify-content: center;
}
.header-logo svg { width: 1.25rem; height: 1.25rem; color: #fff; }
.header-logo.emerald { background: var(--emerald-600); }
.header-logo.amber { background: var(--amber-600); }
.header-title { font-weight: 600; color: var(--slate-800); font-size: 1rem; }

@media (max-width: 640px) {
    .header-inner { padding: .5rem; }
    .header-title.hidden-mobile { display: none !important; }
}

/* Main Content (detail) */
.main-content { max-width: 72rem; margin: 0 auto; padding: 1.5rem 1rem; width: 100%; }

/* Cards */
.card {
    background: #fff; border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 1.5rem;
    border: 1px solid var(--slate-200);
}
.card-emerald-gradient { border-color: var(--emerald-200); background: linear-gradient(to right, var(--emerald-50), #fff); }
.card-danger-border { border-color: var(--red-200); }
.card-amber-border { border-color: var(--amber-200); }
.card-emerald-border { border-color: var(--emerald-200); }
.card-red-border { border-color: var(--red-200); }
.card-header {
    padding: 1rem 1.25rem .75rem;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: .5rem;
}
.card-title { font-size: 1.125rem; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.card-header-actions { display: flex; align-items: center; gap: .375rem; }

/* Profile */
.profile-card { padding: 1.5rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.profile-avatar {
    width: 3.5rem; height: 3.5rem; border-radius: 1rem; display: flex;
    align-items: center; justify-content: center; color: #fff;
    font-size: 1.25rem; font-weight: 700; flex-shrink: 0;
}
.profile-avatar.emerald { background: var(--emerald-600); }
.profile-name { font-size: 1.25rem; font-weight: 700; color: var(--slate-800); }
.profile-badges { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: .25rem; }
.profile-phone {
    display: inline-flex; align-items: center; gap: .25rem;
    font-size: .8125rem; color: var(--slate-500); margin-top: .25rem;
}

/* Summary Grid */
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 640px) { .summary-grid { grid-template-columns: 1fr; } }
.card-stat { padding: 1rem; text-align: center; }
.stat-label { font-size: .75rem; color: var(--slate-500); text-transform: uppercase; letter-spacing: .05em; }
.stat-value { font-size: 1.25rem; font-weight: 700; margin-top: .25rem; }
.stat-sub { font-size: .75rem; color: var(--slate-400); margin-top: .25rem; }
.stat-red { color: var(--red-600); }
.stat-emerald { color: var(--emerald-600); }
.stat-dark { color: var(--slate-700); }

/* Badges */
.badge { display: inline-block; padding: .125rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 500; }
.badge-sm { font-size: .625rem; padding: .0625rem .375rem; }
.badge-emerald { background: var(--emerald-100); color: var(--emerald-700); }
.badge-red { background: var(--red-100); color: var(--red-700); }
.badge-gray { background: var(--slate-100); color: var(--slate-600); }

/* Tables */
.table-wrapper { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left; font-size: .75rem; font-weight: 500; color: var(--slate-500);
    text-transform: uppercase; letter-spacing: .05em; padding: .75rem;
    background: var(--slate-50); border-bottom: 1px solid var(--slate-100);
}
.data-table td { padding: .75rem; border-bottom: 1px solid var(--slate-50); }
.data-table tbody tr:hover { background: var(--slate-50); }

/* Responsive table on mobile */
@media (max-width: 640px) {
    .data-table { font-size: .8125rem; }
    .data-table th, .data-table td { padding: .5rem .375rem; }
    .data-table .btn-sm { padding: .1875rem .5rem; font-size: .6875rem; }
}

/* Mobile Cards */
.mobile-cards { padding: .75rem; display: flex; flex-direction: column; gap: .75rem; }
.mobile-card { background: var(--slate-50); border-radius: var(--radius); padding: 1rem; }
.mobile-card-danger { background: var(--red-50); }
.mobile-card-late { background: var(--amber-50); }
.mobile-card-emerald { background: var(--emerald-50); }
.mobile-card-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.mobile-card-action { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid rgba(0,0,0,.06); }

/* Empty State */
.card-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem; text-align: center; }
.card-empty .empty-icon { color: var(--slate-300); margin-bottom: 1rem; }
.card-empty h3 { font-size: 1.125rem; font-weight: 600; color: var(--slate-600); }
.card-empty p { color: var(--slate-400); margin-top: .25rem; }

/* Detail Footer */
.page-footer {
    background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
    border-top: 1px solid var(--slate-200);
    padding: 1rem; text-align: center;
    font-size: .875rem; color: var(--slate-500); margin-top: auto;
}

/* ============================================
   ACTION BAR (Bayar / Nanti / Kirim WA)
   ============================================ */
.action-bar {
    display: flex; align-items: center; gap: .75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--slate-100);
    background: var(--slate-50);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.action-bar-center {
    justify-content: center;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.btn-action-nanti {
    flex-shrink: 0;
}
.btn-action-wa {
    flex: 1;
}

/* ============================================
   WHATSAPP BUTTON
   ============================================ */
.btn-wa {
    background: var(--wa-green); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; gap: .375rem;
    padding: .5rem 1rem; font-size: .875rem; font-weight: 600;
    border-radius: var(--radius); border: none; cursor: pointer;
    transition: all .15s; text-decoration: none; line-height: 1.25rem;
    font-family: inherit;
}
.btn-wa:hover {
    background: #1EB954;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-bayar {
    min-width: auto;
}

/* ============================================
   WHATSAPP MODAL
   ============================================ */
.wa-modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}

.wa-modal {
    width: 100%; max-width: 480px; background: #fff;
    border-radius: var(--radius-xl); overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalSlideUp .3s ease-out;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.wa-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem; background: var(--slate-50);
    border-bottom: 1px solid var(--slate-200);
}
.wa-modal-title {
    display: flex; align-items: center; gap: .5rem;
    font-weight: 700; font-size: 1rem; color: var(--slate-800);
}
.wa-modal-close {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid var(--slate-200);
    cursor: pointer; font-size: 1.125rem; color: var(--slate-500);
    transition: all .15s; font-family: inherit;
}
.wa-modal-close:hover {
    background: var(--red-50); border-color: var(--red-200); color: var(--red-600);
}

.wa-modal-body { padding: 1.25rem; }

.wa-no-phone {
    text-align: center; padding: 1.5rem .5rem; color: var(--slate-500);
    display: flex; flex-direction: column; align-items: center; gap: .5rem;
}
.wa-no-phone svg { color: var(--amber-600); }

.wa-phone-info {
    display: flex; align-items: center; gap: .375rem;
    padding: .625rem .875rem; background: var(--emerald-50);
    border: 1px solid var(--emerald-200); border-radius: var(--radius);
    margin-bottom: 1rem; font-size: .875rem; color: var(--slate-700);
}
.wa-phone-info svg { color: var(--emerald-600); flex-shrink: 0; }
.wa-phone-info strong { color: var(--emerald-700); }

.wa-template-section { margin-bottom: 1rem; }
.wa-label {
    display: block; font-size: .875rem; font-weight: 600;
    color: var(--slate-700); margin-bottom: .375rem;
}
.wa-label-hint { font-weight: 400; color: var(--slate-400); font-size: .75rem; }

.wa-textarea {
    width: 100%; min-height: 100px; padding: .75rem;
    border: 1px solid var(--slate-300); border-radius: var(--radius);
    font-size: .875rem; font-family: inherit; color: var(--slate-800);
    resize: vertical; line-height: 1.5;
    background: #fff; transition: border-color .15s;
}
.wa-textarea:focus {
    outline: none; border-color: var(--emerald-600);
    box-shadow: 0 0 0 3px rgba(5,150,105,.12);
}

.wa-vars-hint {
    font-size: .75rem; color: var(--slate-400); margin-top: .5rem;
    line-height: 1.6;
}
.wa-vars-hint strong { color: var(--slate-500); }
.wa-vars-hint code {
    background: var(--slate-100); padding: .0625rem .375rem;
    border-radius: 4px; font-size: .6875rem; color: var(--emerald-700);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.wa-modal-actions {
    display: flex; align-items: center; gap: .5rem;
    padding-top: .75rem; border-top: 1px solid var(--slate-100);
}
.wa-modal-actions .btn { flex: 1; justify-content: center; height: 2.75rem; }

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast {
    position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(20px);
    z-index: 2000; opacity: 0; transition: all .3s ease-out;
    pointer-events: none;
}
.toast-show {
    opacity: 1; transform: translateX(-50%) translateY(0);
}
.toast-content {
    display: flex; align-items: center; gap: .5rem;
    background: var(--emerald-600); color: #fff;
    padding: .75rem 1.25rem; border-radius: var(--radius-lg);
    font-size: .875rem; font-weight: 500;
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.3);
    white-space: nowrap;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block; font-size: .875rem; font-weight: 600;
    color: var(--slate-700); margin-bottom: .375rem;
}
.form-group input,
.form-group select {
    width: 100%; height: 2.75rem; padding: 0 .75rem;
    border: 1px solid var(--slate-300); border-radius: var(--radius);
    background: var(--slate-50); color: var(--slate-800);
    font-size: .875rem; font-family: inherit; transition: all .15s;
}
.form-group input:focus,
.form-group select:focus {
    outline: none; border-color: var(--emerald-600);
    box-shadow: 0 0 0 3px rgba(5,150,105,.12);
    background: #fff;
}
.form-hint { font-size: .75rem; color: var(--slate-400); margin-top: .25rem; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .375rem;
    padding: .5rem 1rem; font-size: .875rem; font-weight: 600;
    border-radius: var(--radius); border: none; cursor: pointer;
    transition: all .15s; text-decoration: none; line-height: 1.25rem;
    font-family: inherit;
}
.btn-sm { padding: .25rem .625rem; font-size: .75rem; }
.btn-full { width: 100%; justify-content: center; height: 3rem; }
.btn-emerald { background: var(--emerald-600); color: #fff; }
.btn-emerald:hover { background: var(--emerald-700); }
.btn-amber { background: var(--amber-600); color: #fff; }
.btn-amber:hover { background: var(--amber-700); }
.btn-outline { background: #fff; color: var(--slate-600); border: 1px solid var(--slate-300); }
.btn-outline:hover { background: var(--slate-50); }
.btn-ghost { background: transparent; color: var(--slate-500); }
.btn-ghost:hover { background: var(--slate-100); }
.btn-amber-outline { color: var(--amber-700); border-color: var(--amber-200); }
.btn-amber-outline:hover { background: var(--amber-50); }
.btn-link {
    background: none; border: none; cursor: pointer; color: var(--slate-400);
    font-size: .8125rem; display: inline-flex; align-items: center; gap: .25rem;
    transition: color .15s; font-family: inherit;
}
.btn-link:hover { color: var(--amber-600); }

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: .75rem; border-radius: var(--radius); font-size: .875rem;
    text-align: center; margin-bottom: 1rem;
    display: flex; align-items: center; justify-content: center; gap: .5rem;
}
.alert-error { background: var(--red-50); border: 1px solid var(--red-200); color: var(--red-700); }
.alert-success { background: var(--emerald-50); border: 1px solid var(--emerald-200); color: var(--emerald-700); }

/* ============================================
   CAPTCHA WIDGETS
   ============================================ */
.captcha-widget {
    display: flex;
    justify-content: center;
    margin-bottom: .75rem;
}

.captcha-widget > div {
    transform-origin: top center;
}

/* Scale down captcha on small screens */
@media (max-width: 380px) {
    .captcha-widget > div {
        transform: scale(0.85);
    }
}

/* ============================================
   SCROLLBAR
   ============================================ */
.table-wrapper::-webkit-scrollbar { height: 6px; }
.table-wrapper::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 3px; }
