/* ============================================================
   IRWANTO AI PIK — shared "blue calm" theme
   Tokens intentionally match assets/calendar-style.css so the
   whole product (landing → login → dashboard → calendar → admin)
   feels like one continuous surface, not four bolted-together pages.
   ============================================================ */

:root {
  --primary: #4f7cff;
  --primary-hover: #3f68e0;
  --primary-soft: #eaf0ff;
  --primary-soft-strong: #d9e4ff;
  --primary-text: #2a4fc4;

  --surface: #ffffff;
  --surface-alt: linear-gradient(180deg, #fbfcfe 0%, #f1f4f9 100%);
  --surface-muted: linear-gradient(180deg, #f7f9fc 0%, #eef1f6 100%);
  --surface-hover: #f3f6fb;
  --page-bg: #eef1f7;

  --text-main: #2d3348;
  --text-muted: #6b7284;
  --text-faint: #9aa1b3;

  --border: #e2e6ee;
  --border-strong: #cdd4e2;
  --shadow-soft: 0 2px 10px rgba(65, 90, 160, 0.07);
  --shadow-card: 0 1px 3px rgba(65, 90, 160, 0.08);
  --shadow-lift: 0 12px 30px rgba(45, 65, 130, 0.12);

  --success-bg: #e8f6ee;
  --success-text: #1f8a4c;
  --success-border: #bfe6cf;
  --warning-bg: #fdf3e2;
  --warning-text: #b8791a;
  --warning-border: #f2dcae;
  --danger: #e0566b;
  --danger-bg: #fdecef;
  --danger-border: #f6c7d0;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --gap-sm: 8px;
  --gap-md: 16px;
  --gap-lg: 24px;

  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;

  --font-display: 'Sora', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;
}

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

html, body {
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }

.display { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; line-height: 1.08; }
.mono { font-family: var(--font-mono); }

.view { display: none; }
.view.active { display: block; }

/* ---------- BUTTONS ---------- */
.btn {
  padding: 11px 20px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s ease, background var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-card); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }

.btn-ghost { background: var(--surface); color: var(--text-main); border: 1px solid var(--border); }
.btn-ghost:hover:not(:disabled) { border-color: var(--border-strong); background: var(--surface-hover); }

.btn-soft { background: var(--primary-soft); color: var(--primary-text); }
.btn-soft:hover:not(:disabled) { background: var(--primary-soft-strong); }

.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: var(--danger-border); }

.btn-sm { padding: 8px 14px; font-size: 12.5px; }
.btn-lg { padding: 15px 26px; font-size: 14.5px; border-radius: var(--radius-lg); }
.btn-block { width: 100%; }

/* ---------- NAV ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 6%; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: rgba(255,255,255,0.86);
  backdrop-filter: blur(8px); z-index: 50;
}
.logo { display: flex; align-items: baseline; gap: 6px; font-size: 20px; }
.logo .g { color: var(--primary); }
.logo .e { color: var(--text-muted); font-weight: 500; }
.logo-sub { font-size: 10px; color: var(--text-faint); letter-spacing: 0.14em; margin-top: 2px; }
.nav-actions { display: flex; gap: 10px; align-items: center; }

/* ---------- HERO ---------- */
.hero { padding: 92px 6% 64px; max-width: 880px; margin: 0 auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--primary-text); font-size: 12px; font-weight: 600; letter-spacing: 0.1em;
  border: 1px solid var(--primary-soft-strong); background: var(--primary-soft);
  padding: 7px 14px; border-radius: 100px; margin-bottom: 26px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 100px; background: var(--primary); display: inline-block; }
.hero h1 { font-size: clamp(32px, 6vw, 58px); margin-bottom: 20px; color: var(--text-main); }
.hero h1 .accent { color: var(--primary); }
.hero p { color: var(--text-muted); font-size: 16.5px; line-height: 1.65; max-width: 560px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- SECTIONS / STEPS / TIERS ---------- */
.section { padding: 56px 6%; max-width: 1080px; margin: 0 auto; }
.section-head { margin-bottom: 32px; }
.section-head .kicker { color: var(--primary-text); font-size: 12px; letter-spacing: 0.12em; font-weight: 700; }
.section-head h2 { font-size: 26px; margin-top: 8px; color: var(--text-main); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-card); }
.step-num { font-family: var(--font-mono); color: var(--primary); font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.step-card h3 { font-size: 16.5px; margin-bottom: 8px; color: var(--text-main); }
.step-card p { color: var(--text-muted); font-size: 13.5px; line-height: 1.6; }

.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tier-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; position: relative; box-shadow: var(--shadow-card); }
.tier-card.featured { border: 2px solid var(--primary); }
.tier-badge { position: absolute; top: -12px; left: 26px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 100px; letter-spacing: 0.03em; }
.tier-card h3 { font-size: 18px; margin-bottom: 6px; color: var(--text-main); }
.tier-price { font-family: var(--font-mono); font-size: 22px; color: var(--primary); margin: 14px 0; }
.tier-price span { font-size: 12px; color: var(--text-faint); font-family: var(--font-body); }
.tier-card ul { list-style: none; margin-top: 14px; }
.tier-card li { color: var(--text-muted); font-size: 13.5px; padding: 7px 0; border-top: 1px solid var(--border); }
.tier-card li:first-child { border-top: none; }

footer.site-footer { border-top: 1px solid var(--border); padding: 32px 6%; text-align: center; color: var(--text-faint); font-size: 12.5px; }

/* ---------- AUTH CARD ---------- */
.login-wrap { min-height: calc(100vh - 73px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.login-card { width: 100%; max-width: 392px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 34px 30px; box-shadow: var(--shadow-lift); }
.login-card h2 { font-size: 21px; margin-bottom: 6px; color: var(--text-main); }
.login-card .sub { color: var(--text-muted); font-size: 13.5px; margin-bottom: 24px; }

.auth-tabs { display: flex; background: var(--surface-muted); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 4px; margin-bottom: 22px; }
.auth-tab { flex: 1; text-align: center; padding: 9px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--text-muted); transition: var(--transition); }
.auth-tab.active { background: var(--surface); color: var(--primary-text); box-shadow: var(--shadow-card); }

.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.field input {
  width: 100%; background: var(--surface-muted); border: 1px solid var(--border);
  color: var(--text-main); padding: 11px 13px; border-radius: var(--radius-sm); font-size: 14px; font-family: inherit;
  transition: border-color var(--transition);
}
.field input:focus { outline: none; border-color: var(--primary); background: var(--surface); }

.form-msg { font-size: 13px; padding: 10px 12px; border-radius: var(--radius-sm); margin-bottom: 14px; display: none; }
.form-msg.show { display: block; }
.form-msg.error { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.form-msg.success { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }

.login-foot { text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-muted); }
.login-foot a, .link-btn { color: var(--primary-text); font-weight: 600; cursor: pointer; }
.forgot-link { display: block; text-align: right; font-size: 12px; color: var(--text-faint); margin: -8px 0 14px; cursor: pointer; }
.forgot-link:hover { color: var(--primary-text); }

/* ---------- APP SHELL (dashboard / admin) ---------- */
.dash-top {
  display: flex; align-items: center; justify-content: space-between; padding: 16px 5%;
  border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 40;
}
.dash-tabs { display: flex; gap: 4px; }
.dash-tab { padding: 9px 15px; border-radius: var(--radius-sm); font-size: 13px; color: var(--text-muted); font-weight: 600; transition: var(--transition); }
.dash-tab.active { background: var(--primary-soft); color: var(--primary-text); }
.dash-tab:hover:not(.active) { background: var(--surface-hover); }

.user-chip { display: flex; align-items: center; gap: 10px; background: var(--surface-muted); border: 1px solid var(--border); padding: 6px 14px 6px 6px; border-radius: 100px; }
.avatar { width: 30px; height: 30px; border-radius: 100px; background: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: #fff; flex-shrink: 0; }
.avatar.admin { background: linear-gradient(135deg, #6a5cff, #4f7cff); }
.user-chip .name { font-size: 13px; font-weight: 600; color: var(--text-main); }
.user-chip .role { font-size: 10.5px; color: var(--primary-text); letter-spacing: 0.03em; }

.dash-body { padding: 32px 5% 80px; max-width: 1200px; margin: 0 auto; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 8px; flex-wrap: wrap; gap: 16px; }
.dash-head h1 { font-size: 24px; color: var(--text-main); }
.dash-head p { color: var(--text-muted); font-size: 14px; margin-top: 6px; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 26px 0 32px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 20px; box-shadow: var(--shadow-card); }
.stat .label { font-size: 11.5px; color: var(--text-faint); letter-spacing: 0.04em; text-transform: uppercase; }
.stat .value { font-family: var(--font-mono); font-size: 23px; margin-top: 8px; color: var(--primary-text); }

.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* ---------- TICKET CARDS (signature element) ---------- */
.ticket { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 20px 18px; position: relative; overflow: hidden; box-shadow: var(--shadow-card); animation: rise 0.35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.ticket::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--border); }
.ticket.st-selesai::before { background: var(--success-text); }
.ticket.st-diproses::before { background: var(--warning-text); }
.ticket.st-antre::before { background: var(--text-faint); }

.ticket-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.ticket-num { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.badge { font-size: 10.5px; font-weight: 700; padding: 4px 10px; border-radius: 100px; letter-spacing: 0.03em; white-space: nowrap; }
.badge.st-selesai { background: var(--success-bg); color: var(--success-text); }
.badge.st-diproses { background: var(--warning-bg); color: var(--warning-text); }
.badge.st-antre { background: var(--surface-muted); color: var(--text-muted); border: 1px solid var(--border); }

.ticket h3 { font-size: 16px; margin-bottom: 8px; color: var(--text-main); }
.ticket .prompt { color: var(--text-muted); font-size: 13px; line-height: 1.55; margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ticket-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed var(--border); padding-top: 14px; gap: 10px; flex-wrap: wrap; }
.ticket-time { font-size: 11.5px; color: var(--text-faint); }
.ticket-actions { display: flex; gap: 8px; }

.new-card { background: var(--surface); border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg); padding: 22px; }
.new-card h3 { font-size: 15px; margin-bottom: 4px; color: var(--text-main); }
.new-card p { color: var(--text-muted); font-size: 12.5px; margin-bottom: 14px; }
.new-card textarea {
  width: 100%; background: var(--surface-muted); border: 1px solid var(--border); color: var(--text-main);
  border-radius: var(--radius-sm); padding: 12px; font-family: inherit; font-size: 13.5px; min-height: 76px; resize: vertical; margin-bottom: 10px;
}
.new-card textarea:focus { outline: none; border-color: var(--primary); }
.new-card input[type=text] {
  width: 100%; background: var(--surface-muted); border: 1px solid var(--border); color: var(--text-main);
  border-radius: var(--radius-sm); padding: 10px 12px; font-family: inherit; font-size: 13.5px; margin-bottom: 10px;
}
.new-card input[type=text]:focus { outline: none; border-color: var(--primary); }

/* feature/tool card (e.g. the always-on calendar app) */
.tool-card { background: linear-gradient(135deg, var(--primary-soft), var(--surface)); border: 1px solid var(--primary-soft-strong); border-radius: var(--radius-lg); padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-card); }
.tool-card .tool-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--primary); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; }
.tool-card h3 { font-size: 16px; color: var(--text-main); }
.tool-card p { font-size: 13px; color: var(--text-muted); line-height: 1.55; }

/* ---------- EMPTY / LOADING STATES ---------- */
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-faint); }
.empty-state .icon { font-size: 30px; margin-bottom: 10px; }
.empty-state p { font-size: 13.5px; }
.skeleton { background: linear-gradient(90deg, var(--surface-muted) 25%, var(--surface-hover) 50%, var(--surface-muted) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-md); height: 150px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- ADMIN TABLE ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); margin-bottom: 26px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 10px; }
.panel-head h2 { font-size: 15.5px; color: var(--text-main); }
.panel-head .count { font-size: 12px; color: var(--text-faint); }

.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-filter { padding: 6px 13px; border-radius: 100px; font-size: 12px; font-weight: 600; color: var(--text-muted); background: var(--surface-muted); border: 1px solid var(--border); transition: var(--transition); }
.chip-filter.active { background: var(--primary); color: #fff; border-color: var(--primary); }

table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th { text-align: left; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-faint); padding: 10px 20px; border-bottom: 1px solid var(--border); background: var(--surface-muted); white-space: nowrap; }
table.data-table td { padding: 14px 20px; border-bottom: 1px solid var(--border); color: var(--text-main); vertical-align: top; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: var(--surface-hover); }
.cell-prompt { max-width: 340px; }
.cell-prompt .txt { color: var(--text-muted); font-size: 12.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user .u-mini { width: 26px; height: 26px; border-radius: 100px; background: var(--primary-soft); color: var(--primary-text); font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.status-select {
  font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text-main); cursor: pointer;
}
.role-badge { font-size: 10.5px; font-weight: 700; padding: 4px 10px; border-radius: 100px; letter-spacing: 0.03em; }
.role-badge.admin { background: var(--primary-soft); color: var(--primary-text); }
.role-badge.user { background: var(--surface-muted); color: var(--text-muted); border: 1px solid var(--border); }

.sync-status { font-size: 11.5px; color: var(--text-faint); display: inline-flex; align-items: center; gap: 6px; }
.sync-status .dot { width: 6px; height: 6px; border-radius: 100px; background: var(--success-text); transition: background var(--transition); }
.sync-status.saving .dot { background: var(--warning-text); }
.sync-status.error .dot { background: var(--danger); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 760px) {
  .steps, .tiers, .stat-row { grid-template-columns: 1fr; }
  .dash-tabs { display: none; }
  table.data-table { font-size: 12px; }
  table.data-table th, table.data-table td { padding: 10px 12px; }
  .cell-prompt { max-width: 180px; }
}
