/* ChatbotWK — tema LIGHT (#f1f5f9 / #ffffff / #2563eb) */
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; background:#f1f5f9; color:#1e293b; min-height:100vh; }
.app { display:flex; min-height:100vh; }

/* Sidebar (light) */
.sidebar { width:232px; flex-shrink:0; background:#ffffff; border-right:1px solid #e2e8f0; display:flex; flex-direction:column; padding:20px 12px; position:sticky; top:0; height:100vh; overflow-y:auto; }
.sidebar-brand { padding:4px 10px 16px; border-bottom:1px solid #e2e8f0; margin-bottom:12px; }
.sidebar-brand .brand-title { font-size:20px; font-weight:800; color:#2563eb; }
.sidebar-brand .brand-sub { font-size:12px; color:#64748b; margin-top:2px; }
.sidebar-nav { display:flex; flex-direction:column; gap:2px; flex:1; }
.sidebar-nav .nav-group { font-size:11px; text-transform:uppercase; color:#94a3b8; padding:14px 10px 4px; font-weight:700; letter-spacing:.06em; }
.sidebar-nav a { color:#334155; text-decoration:none; padding:9px 12px; border-radius:8px; font-size:14px; display:flex; gap:10px; align-items:center; }
.sidebar-nav a:hover { background:#eff6ff; }
.sidebar-nav a.active { background:#2563eb; color:#fff; }
.sidebar-footer { border-top:1px solid #e2e8f0; padding-top:12px; margin-top:12px; }
.sidebar-footer .user-name { font-size:13px; font-weight:600; }

.main { flex:1; padding:24px 28px; min-width:0; }
.topbar { display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; }
.topbar h1 { font-size:22px; font-weight:800; }
.topbar .role-tag { font-size:12px; background:#2563eb; color:#fff; padding:4px 10px; border-radius:99px; font-weight:600; }
.user-meta { font-size:13px; color:#64748b; }

/* Flash */
.flash { padding:12px 16px; border-radius:10px; margin-bottom:18px; font-size:14px; }
.flash.success, .flash.info { background:#ecfdf5; color:#065f46; border:1px solid #a7f3d0; }
.flash.error { background:#fef2f2; color:#991b1b; border:1px solid #fecaca; }

/* Cards & grid */
.card { background:#fff; border:1px solid #e2e8f0; border-radius:14px; padding:18px 20px; margin-bottom:18px; }
.card h2 { font-size:16px; font-weight:700; margin-bottom:12px; }
.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:14px; }
.kpi { background:#fff; border:1px solid #e2e8f0; border-radius:14px; padding:16px 18px; }
.kpi .num { font-size:26px; font-weight:800; color:#2563eb; }
.kpi .lbl { font-size:13px; color:#64748b; margin-top:4px; }

/* Table */
table { width:100%; border-collapse:collapse; font-size:14px; }
th,td { text-align:left; padding:10px 10px; border-bottom:1px solid #eef2f7; vertical-align:top; }
th { color:#64748b; font-size:12px; text-transform:uppercase; letter-spacing:.04em; background:#f8fafc; }
tr:hover td { background:#f8fafc; }

/* Badges */
.badge { display:inline-block; padding:3px 10px; border-radius:99px; font-size:12px; font-weight:600; }
.badge.menunggu { background:#fef3c7; color:#92400e; }
.badge.dikonfirmasi, .badge.selesai, .badge.disetujui { background:#d1fae5; color:#065f46; }
.badge.ditolak, .badge.error, .badge.batal { background:#fee2e2; color:#991b1b; }
.badge.bot { background:#dbeafe; color:#1d4ed8; }
.badge.agen { background:#ede9fe; color:#5b21b6; }
.badge.disunting { background:#fef9c3; color:#a16207; }

/* Forms */
form.inline-form { display:inline; }
label { display:block; font-size:12px; font-weight:600; color:#475569; margin:8px 0 4px; }
input[type=text],input[type=password],input[type=number],input[type=date],select,textarea {
  width:100%; padding:9px 12px; border:1px solid #d1d5db; border-radius:8px; font-size:14px; font-family:inherit; background:#fff; }
textarea { min-height:70px; }
.btn { display:inline-block; padding:9px 16px; border:none; border-radius:8px; font-size:14px; font-weight:600; cursor:pointer; text-decoration:none; }
.btn-primary { background:#2563eb; color:#fff; }
.btn-primary:hover { background:#1d4ed8; }
.btn-success { background:#059669; color:#fff; }
.btn-danger { background:#dc2626; color:#fff; }
.btn-light { background:#e2e8f0; color:#334155; }
.btn-ghost { background:transparent; color:#2563eb; border:1px solid #bfdbfe; }
.row-inputs { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:10px; }
.form-row { display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; }
.form-row .fcell { flex:1; min-width:120px; }
.checkbox-inline { display:flex; align-items:center; gap:6px; margin-top:18px; font-size:13px; color:#475569; }
.checkbox-inline input { width:auto; }
.table-actions { display:flex; gap:6px; }
.btn-sm { padding:5px 11px; font-size:12px; }

/* Chat bubbles (kanal simulasi + detail) */
.chatbox { background:#f8fafc; border:1px solid #e2e8f0; border-radius:14px; padding:16px; max-height:420px; overflow-y:auto; }
.msg { max-width:78%; margin-bottom:10px; padding:9px 13px; border-radius:12px; font-size:14px; line-height:1.45; clear:both; }
.msg.pelanggan { background:#2563eb; color:#fff; float:left; border-bottom-left-radius:4px; }
.msg.bot { background:#ffffff; border:1px solid #e2e8f0; float:left; border-bottom-left-radius:4px; }
.msg.agen { background:#d1fae5; color:#065f46; float:right; border-bottom-right-radius:4px; }
.msg .who { font-size:11px; font-weight:700; display:block; margin-bottom:2px; opacity:.75; }
.msg .time { font-size:11px; opacity:.6; display:block; margin-top:4px; text-align:right; }
.chat-input { display:flex; gap:10px; margin-top:14px; align-items:center; }
.chat-input input { flex:1; }
.txt-copilot { background:#eff6ff; border:1px solid #bfdbfe; color:#1e40af; font-size:13px; }
.muted { color:#64748b; font-size:13px; }
.mt { margin-top:12px; } .mb { margin-bottom:12px; }

/* Login */
.login-wrap { min-height:100vh; display:flex; align-items:center; justify-content:center; background:linear-gradient(160deg,#eff6ff,#f1f5f9); }
.login-card { width:380px; background:#fff; border:1px solid #e2e8f0; border-radius:16px; padding:30px 32px; box-shadow:0 10px 30px rgba(37,99,235,.08); }
.login-card h1 { font-size:20px; font-weight:800; color:#2563eb; margin-bottom:4px; }
.login-card p.sub { color:#64748b; font-size:13px; margin-bottom:20px; }