* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: #EEF1F6;
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(232,163,61,0.3); }
:focus-visible { outline: 2px solid #E8A33D; outline-offset: 2px; }
h1, h2, h3 { font-family: 'Fraunces', serif; color: #1C2541; margin: 0; }
h1 { font-size: 1.5rem; font-weight: 600; }
a { text-decoration: none; color: inherit; }
input, select, textarea, button { font-family: inherit; font-size: 0.875rem; }

/* ---------- layout ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 252px; flex-shrink: 0; min-height: 100vh;
  background: linear-gradient(180deg, #1C2541 0%, #202c4d 100%);
  display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; align-self: flex-start;
  box-shadow: 2px 0 12px rgba(10,15,35,0.08);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 20px; }
.brand-logo { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25)); }
.brand-name { font-family: 'Fraunces', serif; color: #fff; font-size: 1.15rem; font-weight: 600; letter-spacing: 0.01em; }
.sidebar-toggle { margin-left: auto; background: none; border: none; color: #94a3b8; cursor: pointer; padding: 4px; border-radius: 6px; display: flex; }
.sidebar-toggle:hover { color: #fff; background: rgba(255,255,255,0.08); }
.sidebar-toggle svg { width: 16px; height: 16px; }
.sidebar nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
  color: #a9b4cc; font-size: 0.875rem; font-weight: 500; transition: background .15s, color .15s, transform .1s;
}
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,0.06); }
.nav-item.active { color: #fff; background: linear-gradient(135deg, rgba(232,163,61,0.22), rgba(197,106,46,0.14)); box-shadow: inset 0 0 0 1px rgba(232,163,61,0.25); }
.nav-item.active .nav-icon { opacity: 1; color: #E8A33D; }
.sidebar-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.1); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; color: #cbd5e1; font-size: 0.875rem; transition: background .15s; }
.user-chip:hover { background: rgba(255,255,255,0.05); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #2E3A55, #3a4770); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600; flex-shrink: 0; box-shadow: 0 0 0 2px rgba(255,255,255,0.08); }
.logout-link { display: flex; align-items: center; gap: 8px; padding: 8px; margin-top: 4px; border-radius: 10px; color: #94a3b8; font-size: 0.875rem; transition: background .15s, color .15s; }
.logout-link:hover { color: #fff; background: rgba(244,63,94,0.12); }

.topbar { display: none; align-items: center; justify-content: space-between; background: linear-gradient(180deg, #1C2541, #202c4d); padding: 12px 16px; position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 10px rgba(10,15,35,0.15); }
.topbar .brand-logo { width: 26px; height: 26px; }
.topbar .logout-link { color: #94a3b8; padding: 4px; }

.main { flex: 1; min-width: 0; padding: 32px; max-width: 900px; margin: 0 auto; width: 100%; }
.subtitle { color: #64748b; font-size: 0.875rem; margin: 4px 0 0; }

.bottom-nav { display: none; }

/* ---------- sidebar collapse (desktop) ---------- */
@media (min-width: 861px) {
  .sidebar { transition: width .18s ease, padding .18s ease; }
  #sidebar-expand-btn {
    display: none; position: fixed; top: 18px; left: 12px; z-index: 30; background: #1C2541; color: #fff;
    border: none; border-radius: 8px; width: 30px; height: 30px; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  }
  #sidebar-expand-btn svg { width: 16px; height: 16px; }
  .sidebar-collapsed .sidebar { width: 72px; padding-left: 10px; padding-right: 10px; }
  .sidebar-collapsed .brand-name,
  .sidebar-collapsed .nav-label,
  .sidebar-collapsed .sidebar-toggle { display: none; }
  .sidebar-collapsed .brand { justify-content: center; margin-bottom: 24px; }
  .sidebar-collapsed .nav-item { justify-content: center; padding: 12px 0; }
  .sidebar-collapsed .user-chip { justify-content: center; }
  .sidebar-collapsed .logout-link { justify-content: center; }
  .sidebar-collapsed #sidebar-expand-btn { display: flex; }
}

@media (max-width: 860px) {
  .sidebar { display: none; }
  .topbar { display: flex; }
  .main { padding: 20px 16px 92px; }
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: linear-gradient(180deg, #1C2541, #202c4d);
    border-top: 1px solid rgba(255,255,255,0.1); z-index: 20; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 10px rgba(10,15,35,0.15);
  }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; color: #94a3b8; font-size: 0.65rem; font-weight: 500; padding: 6px 4px; border-radius: 8px; transition: color .15s; }
  .bottom-nav a svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; }
  .bottom-nav a.active { color: #E8A33D; }
}

/* ---------- page head / buttons ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head h1 { letter-spacing: -0.01em; }
.btn-primary {
  background: linear-gradient(135deg, #1C2541, #2E3A55); color: #fff; border: none; font-weight: 600; font-size: 0.875rem;
  padding: 10px 16px; border-radius: 10px; cursor: pointer; transition: opacity .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 3px 10px rgba(28,37,65,0.25);
}
.btn-primary:hover { opacity: 0.92; box-shadow: 0 5px 14px rgba(28,37,65,0.32); transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary.full { width: 100%; margin-top: 4px; }
.btn-primary.small { padding: 9px 14px; font-size: 0.8rem; border-radius: 9px; }
.btn-mini {
  background: #1C2541; color: #fff; border: none; font-weight: 600; font-size: 0.72rem;
  padding: 6px 10px; border-radius: 6px; cursor: pointer; white-space: nowrap;
}
.icon-btn { background: none; border: none; color: #cbd5e1; cursor: pointer; font-size: 0.8rem; padding: 4px; border-radius: 4px; transition: color .15s; }
.icon-btn:hover { color: #f43f5e; }
.icon-btn.on-dark { color: rgba(255,255,255,0.65); }
.icon-btn.on-dark:hover { color: #fff; }
.inline-form { display: inline-flex; }

/* ---------- day tabs ---------- */
.day-tabs { display: flex; gap: 2px; margin-bottom: 28px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 4px; overflow-x: auto; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.day-tab { padding: 9px 16px; font-size: 0.85rem; font-weight: 500; color: #94a3b8; border-radius: 9px; white-space: nowrap; transition: background .15s, color .15s; }
.day-tab:hover { color: #475569; background: #f4f6fa; }
.day-tab.active { color: #fff; background: linear-gradient(135deg, #1C2541, #2E3A55); font-weight: 600; box-shadow: 0 2px 6px rgba(28,37,65,0.25); }

/* ---------- kalender (navigasi minggu per tanggal) ---------- */
.week-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.week-strip { display: flex; gap: 6px; flex: 1; overflow-x: auto; }
.week-day {
  flex: 1; min-width: 52px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px; border-radius: 10px; border: 1px solid #e2e8f0; color: #64748b; text-decoration: none;
  transition: border-color .15s, background .15s, transform .1s;
}
.week-day:hover { border-color: #cbd5e1; transform: translateY(-1px); }
.week-day.active { background: linear-gradient(135deg, #1C2541, #2E3A55); border-color: #1C2541; color: #fff; box-shadow: 0 3px 8px rgba(28,37,65,0.25); }
.week-day.is-today:not(.active) { border-color: #C56A2E; color: #C56A2E; }
.week-day-name { font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.week-day-num { font-size: 0.95rem; font-weight: 600; }
.occurrence-moved { background: #FBF0E3; color: #96682B; margin-left: 6px; }
.occurrence-skipped { opacity: 0.6; }

/* ---------- timeline ---------- */
.timeline-wrap { display: flex; gap: 12px; }
.timeline-labels { display: flex; flex-direction: column; justify-content: space-between; width: 38px; flex-shrink: 0; font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; color: #94a3b8; padding: 4px 0; }
.timeline { flex: 1; min-width: 0; min-height: 480px; border-radius: 12px; overflow: visible; border: none; background: transparent; box-shadow: none; display: flex; flex-direction: column; gap: 6px; }
.timeline-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 0.875rem; padding: 60px 0; border: 1px dashed #dbe2ec; border-radius: 12px; background: #fff; }
.block { flex-basis: 0; padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-radius: 12px; border: none; }
.block.spacer { background: transparent; min-height: 8px; }
.block.busy { box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.block.busy .block-name { color: #fff; font-weight: 600; font-size: 0.875rem; }
.block.busy .block-meta { color: rgba(255,255,255,0.75); font-size: 0.7rem; margin-top: 2px; }
.block.gap {
  background-color: #FBF3E5;
  background-image: repeating-linear-gradient(135deg, #FBF3E5 0px, #FBF3E5 8px, #F6E9CC 8px, #F6E9CC 16px);
  border: 1px solid #F2DFB8;
}
.block.gap .block-name { color: #96682B; font-weight: 600; font-size: 0.875rem; }
.block.gap .block-meta { color: #96682B; opacity: 0.8; font-size: 0.7rem; margin-top: 2px; }

/* ---------- cards / lists ---------- */
.section-title { font-size: 0.8rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.03em; margin: 32px 0 12px; }
.empty-note { color: #94a3b8; font-size: 0.875rem; }
.card-list { display: flex; flex-direction: column; gap: 8px; }
.row-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff;
  border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: box-shadow .15s, transform .1s, border-color .15s;
}
.row-card:hover { box-shadow: 0 4px 12px rgba(15,23,42,0.07); border-color: #dbe2ec; transform: translateY(-1px); }
.row-card.done { opacity: 0.6; }
.row-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.row-title { font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.row-title.strike { text-decoration: line-through; }
.row-sub { font-size: 0.75rem; color: #64748b; margin-top: 2px; }
.dot { width: 8px; height: 32px; border-radius: 4px; flex-shrink: 0; }
.text-overdue { color: #f43f5e; font-weight: 600; }

/* ---------- semua kegiatan: stat cards ---------- */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 32px; }
@media (max-width: 700px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 14px; padding: 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.03); transition: transform .15s, box-shadow .15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.06); }
.stat-icon { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.stat-value { font-family: 'Fraunces', serif; font-size: 1.35rem; font-weight: 600; color: #1C2541; line-height: 1.1; }
.stat-label { font-size: 0.72rem; color: #94a3b8; margin-top: 2px; }

.section-block { margin-bottom: 36px; }
.section-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.section-title-row .section-title { margin: 0; }
.section-count { font-size: 0.75rem; color: #94a3b8; font-weight: 500; }

.day-divider {
  font-size: 0.68rem; font-weight: 700; color: #C56A2E; text-transform: uppercase; letter-spacing: 0.05em;
  margin: 16px 0 6px; padding-left: 2px;
}
.day-divider:first-child { margin-top: 0; }

.activity-card {
  display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 12px; padding: 12px 14px; box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.activity-card:hover { box-shadow: 0 6px 16px rgba(0,0,0,0.07); transform: translateY(-1px); border-color: #dbe2ec; }
.activity-icon {
  width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.activity-body { flex: 1; min-width: 0; }
.activity-card .badge { flex-shrink: 0; }

.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px dashed #dbe2ec; border-radius: 14px; padding: 36px 20px; text-align: center; background: #fafbfd;
}
.empty-state .empty-icon { font-size: 28px; }
.empty-state p { color: #94a3b8; font-size: 0.875rem; margin: 0 0 4px; }

.badge { font-size: 0.68rem; font-weight: 600; padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.priority-tinggi { background: #FBEAEA; color: #A63A3A; }
.priority-sedang { background: #FBF0E3; color: #C56A2E; }
.priority-rendah { background: #EAF4EE; color: #4A8C6E; }

.check-btn {
  width: 20px; height: 20px; border-radius: 6px; border: 2px solid #cbd5e1; background: #fff;
  flex-shrink: 0; cursor: pointer; color: #fff; font-size: 0.7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0;
}
.check-btn.checked { background: #4A8C6E; border-color: #4A8C6E; }

/* ---------- forms ---------- */
.form-card, .course-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.form-card { padding: 16px; margin-bottom: 32px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }
label { display: block; font-size: 0.75rem; font-weight: 500; color: #64748b; margin-bottom: 12px; }
input[type=text], input[type=date], input[type=time], input[type=number], input[type=password], select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 9px 12px; border: 1px solid #e2e8f0; border-radius: 8px;
  outline: none; transition: border-color .15s, box-shadow .15s; background: #fff; color: #1e293b;
}
input:focus, select:focus, textarea:focus { border-color: #1C2541; box-shadow: 0 0 0 3px rgba(28,37,65,0.1); }
textarea { resize: vertical; }

.inline-add-form { display: flex; gap: 8px; margin-bottom: 24px; }
.inline-add-form input { margin: 0; }

/* ---------- materi kuliah ---------- */
.course-list { display: flex; flex-direction: column; gap: 12px; }
.course-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.course-toggle { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.course-icon { width: 32px; height: 32px; border-radius: 8px; background: #EAF0FB; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 15px; }
.course-name { display: block; font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.course-count { display: block; font-size: 0.72rem; color: #94a3b8; margin-top: 1px; }
.course-body { border-top: 1px solid #f1f5f9; padding: 16px; }
.meeting-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; background: #f8fafc; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.meeting-number { font-size: 0.7rem; font-weight: 600; color: #C56A2E; }
.meeting-title { font-size: 0.875rem; font-weight: 500; color: #1e293b; margin-top: 1px; }
.meeting-notes { font-size: 0.75rem; color: #64748b; margin-top: 4px; white-space: pre-wrap; }
.add-meeting-box { background: #f7f8fb; border-radius: 8px; padding: 12px; }
.add-meeting-label { font-size: 0.75rem; font-weight: 600; color: #64748b; margin-bottom: 8px; }
.add-meeting-box input, .add-meeting-box textarea { margin-bottom: 8px; }

/* ---------- modal ---------- */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.3); align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal.open { display: flex; }
.modal-box { background: #fff; border-radius: 18px; width: 100%; max-width: 420px; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); max-height: 90vh; overflow-y: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.hint-box { background: #FBF3E5; color: #96682B; font-size: 0.75rem; border-radius: 8px; padding: 8px 12px; margin-bottom: 16px; }

/* ---------- Avatar foto ---------- */
.avatar-img { object-fit: cover; }
.user-chip { text-decoration: none; }
.user-chip:hover { color: #fff; }

/* ---------- Halaman Profil ---------- */
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.profile-avatar-wrap { position: relative; width: 84px; height: 84px; flex-shrink: 0; }
.profile-avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: #2E3A55; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 600; font-family: 'Fraunces', serif; }
.profile-avatar-edit { position: absolute; bottom: -2px; right: -2px; width: 30px; height: 30px; border-radius: 50%; background: #C56A2E; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; border: 2px solid #fff; }
.profile-name { font-family: 'Fraunces', serif; font-size: 1.3rem; font-weight: 600; color: #1C2541; }
.profile-username { color: #94a3b8; font-size: 0.85rem; margin-top: 2px; }
.profile-section { margin-bottom: 28px; }
.alert-success { background: #EAF4EE; color: #2f6b4f; font-size: 0.82rem; border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; }
.alert-error { background: #FBEAEA; color: #A63A3A; font-size: 0.82rem; border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; }

/* ---------- Rekomendasi AI ---------- */
.ai-btn { background: linear-gradient(135deg, #6B4A9E, #C56A2E); color: #fff; border: none; padding: 10px 16px; border-radius: 10px; font-size: 0.82rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 3px 10px rgba(107,74,158,0.3); transition: opacity .15s, transform .1s, box-shadow .15s; }
.ai-btn:hover { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 5px 14px rgba(107,74,158,0.38); }
.ai-idea-list { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.ai-idea { background: #F7F5FB; border: 1px solid #E7E1F2; border-radius: 10px; padding: 12px 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ai-idea p { font-size: 0.85rem; color: #3a2f52; margin: 0; flex: 1; }
.ai-idea button { flex-shrink: 0; }
.ai-loading { text-align: center; color: #94a3b8; font-size: 0.85rem; padding: 20px 0; }
.ai-source-note { font-size: 0.7rem; color: #94a3b8; margin-top: 10px; }

/* ---------- Upload foto -> pindai jadwal ---------- */
.scan-preview { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; margin-bottom: 28px; }
.scan-preview-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.scan-row { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 8px; align-items: center; padding: 8px 4px; border-bottom: 1px solid #f1f5f9; }
.scan-row:last-child { border-bottom: none; }
.scan-row input[type=text] { margin: 0; padding: 6px 8px; font-size: 0.8rem; }
.scan-row select, .scan-row input[type=time] { margin: 0; padding: 6px 6px; font-size: 0.78rem; }
.file-drop { border: 2px dashed #dbe2ec; border-radius: 12px; padding: 24px 16px; text-align: center; color: #94a3b8; font-size: 0.85rem; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.file-drop:hover { border-color: #C56A2E; color: #C56A2E; background: #FBF3E5; }
.file-drop input { display: none; }
.file-drop-name { margin-top: 8px; font-weight: 600; color: #1e293b; font-size: 0.8rem; }

.scan-tabs { display: flex; gap: 2px; margin-bottom: 16px; background: #F4F6FA; border-radius: 10px; padding: 3px; }
.scan-tab { flex: 1; background: none; border: none; padding: 8px 6px; font-size: 0.76rem; font-weight: 600; color: #64748b; border-radius: 8px; cursor: pointer; transition: background .15s, color .15s; white-space: nowrap; }
.scan-tab:hover { color: #1C2541; }
.scan-tab.active { background: #fff; color: #1C2541; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.scan-panel textarea { width: 100%; border: 1px solid #dbe2ec; border-radius: 10px; padding: 10px 12px; font-family: inherit; font-size: 0.85rem; resize: vertical; }
.scan-panel textarea:focus { outline: none; border-color: #C56A2E; box-shadow: 0 0 0 3px rgba(197,106,46,0.12); }

/* ---------- auth screens ---------- */
.auth-body {
  display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px;
  background:
    radial-gradient(circle at 15% 20%, rgba(232,163,61,0.16), transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(28,37,65,0.12), transparent 50%),
    linear-gradient(160deg, #1C2541 0%, #232f52 45%, #2E3A55 100%);
  position: relative; overflow: hidden;
}
.auth-wrap { width: 100%; max-width: 400px; position: relative; z-index: 1; }
.auth-logo { display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.auth-logo-img { width: 220px; max-width: 70%; height: auto; filter: drop-shadow(0 8px 20px rgba(0,0,0,0.35)); }
.auth-card {
  background: #fff; border-radius: 20px; padding: 32px 28px; margin-top: 15px;
  box-shadow: 0 20px 50px rgba(10,15,35,0.35); border: 1px solid rgba(255,255,255,0.6);
  position: relative;
}
.auth-card h1 { font-size: 1.4rem; margin-bottom: 4px; }
.auth-card .subtitle { margin-bottom: 22px; }
.auth-switch { font-size: 0.8rem; color: #94a3b8; text-align: center; margin-top: 22px; }
.auth-switch a { color: #C56A2E; font-weight: 600; transition: color .15s; }
.auth-switch a:hover { color: #E8A33D; }
.auth-note { font-size: 0.7rem; color: rgba(255,255,255,0.55); text-align: center; margin-top: 20px; line-height: 1.5; }
.alert-error, .alert-success {
  display: flex; gap: 6px; align-items: flex-start; font-size: 0.78rem;
  border-radius: 10px; padding: 10px 12px; margin-bottom: 18px; font-weight: 500;
}
.alert-error { background: #fef2f2; color: #dc2626; }
.alert-success { background: #ecfdf3; color: #15803d; }

.auth-card label { margin-bottom: 16px; }
.input-icon { position: relative; margin-top: 4px; }
.input-icon svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: #94a3b8; pointer-events: none;
}
.input-icon input { margin-top: 0; padding-left: 38px; }
.input-icon input[type=password], .input-icon input[type=text].pw-field { padding-right: 40px; }
.pw-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; padding: 4px; cursor: pointer; color: #94a3b8;
  display: flex; align-items: center; justify-content: center; transition: color .15s;
}
.pw-toggle:hover { color: #64748b; }
.pw-toggle svg { width: 18px; height: 18px; }
.pw-toggle .eye-off { display: none; }
.pw-toggle.is-visible .eye-on { display: none; }
.pw-toggle.is-visible .eye-off { display: block; }
.auth-card input[type=text], .auth-card input[type=password] {
  padding-top: 11px; padding-bottom: 11px; border-radius: 10px; font-size: 0.9rem;
  border: 1.5px solid #e2e8f0;
}
.auth-card input[type=text]:focus, .auth-card input[type=password]:focus {
  border-color: #E8A33D; box-shadow: 0 0 0 3px rgba(232,163,61,0.15);
}
.auth-card .btn-primary.full {
  margin-top: 6px; padding: 12px; border-radius: 10px; font-size: 0.9rem;
  background: linear-gradient(135deg, #1C2541, #2E3A55);
  box-shadow: 0 6px 16px rgba(28,37,65,0.3);
}
.auth-card .btn-primary.full:hover { opacity: 0.92; transform: translateY(-1px); }

.auth-divider { display: flex; align-items: center; gap: 10px; margin: 20px 0; color: #94a3b8; font-size: 0.72rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: #e2e8f0; }
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 11px; border-radius: 10px; border: 1.5px solid #e2e8f0; background: #fff;
  color: #334155; font-size: 0.875rem; font-weight: 600; transition: background .15s, border-color .15s, transform .1s;
}
.btn-google:hover { background: #f8fafc; border-color: #cbd5e1; transform: translateY(-1px); }

/* ---------- Asisten AI (chat) ---------- */
.ai-chat-wrap { display: flex; flex-direction: column; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; overflow: hidden; box-shadow: 0 2px 10px rgba(15,23,42,0.04); height: min(600px, 68vh); }
.ai-chat-log { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.ai-msg { display: flex; }
.ai-msg-user { justify-content: flex-end; }
.ai-msg-bot { justify-content: flex-start; }
.ai-msg-bubble { max-width: 82%; padding: 12px 15px; border-radius: 14px; font-size: 0.86rem; line-height: 1.5; }
.ai-msg-user .ai-msg-bubble { background: linear-gradient(135deg, #1C2541, #2E3A55); color: #fff; border-bottom-right-radius: 4px; }
.ai-msg-bot .ai-msg-bubble { background: #F4F6FA; color: #1e293b; border-bottom-left-radius: 4px; }
.ai-steps { display: flex; flex-direction: column; gap: 8px; }
.ai-step { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: #94a3b8; transition: color .2s; }
.ai-step.done { color: #1e293b; }
.ai-step-dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; flex-shrink: 0; }
.ai-step.pending .ai-step-dot { background: #E8A33D; animation: ai-pulse 1s ease-in-out infinite; }
.ai-step.done .ai-step-dot { background: #1C6B5E; }
@keyframes ai-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: 0.5; } }
.ai-action-list { margin-top: 10px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px 12px; }
.ai-action-row { border-bottom: 1px solid #f1f5f9; }
.ai-action-row:last-child { border-bottom: none; }
.ai-error { color: #b91c1c; font-size: 0.85rem; margin-top: 4px; }
.ai-success { color: #1C6B5E; font-size: 0.85rem; font-weight: 600; }

.ai-chat-form { display: flex; gap: 8px; padding: 14px; border-top: 1px solid #e2e8f0; background: #fafbfc; }
.ai-chat-form select { flex-shrink: 0; width: auto; padding: 10px 8px; border-radius: 10px; border: 1px solid #dbe2ec; font-size: 0.8rem; }
.ai-chat-form input[type=text] { flex: 1; padding: 10px 14px; border-radius: 10px; border: 1px solid #dbe2ec; font-size: 0.86rem; }
.ai-chat-form input[type=text]:focus { outline: none; border-color: #C56A2E; box-shadow: 0 0 0 3px rgba(197,106,46,0.12); }
