/* Concreate Event Creator - Admin UI
   Brand: putih/hitam dari logo, aksen merah #C8102E (dot logo) */
:root {
  --red: #C8102E;
  --black: #111111;
  --ink: #1d1d1f;
  --gray: #6b7280;
  --line: #e5e5e5;
  --bg: #fafafa;
  --card: #ffffff;
  --green: #15803d;
  --amber: #b45309;
  --blue: #1f5fbf;
  --radius: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px;
}
h1,h2,h3 { font-weight: 700; letter-spacing: -0.01em; }

/* ===== Brand ===== */
.brand-dot {
  display: inline-block; width: 22px; height: 22px; border-radius: 50%;
  background: var(--black); position: relative;
}
.brand-dot:after {
  content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--red);
}
.brand-dot.sm { width: 16px; height: 16px; }
.brand-dot.sm:after { inset: 4px; }
.brand-word span, .topbar-word b { color: var(--red); font-weight: inherit; }

/* ===== Login ===== */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--black); }
.login-card { background: #fff; border-radius: 16px; padding: 40px 36px; width: 360px; text-align: center; }
.brand-mark { margin-bottom: 12px; }
.brand-word { font-size: 26px; letter-spacing: 0.18em; font-weight: 800; }
.brand-sub { color: var(--gray); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; margin: 6px 0 26px; }
.login-card form { text-align: left; }
.login-card label { display: block; font-size: 12px; font-weight: 600; color: var(--gray); margin: 14px 0 4px; }
.login-card input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.login-card input:focus { outline: 2px solid var(--black); border-color: var(--black); }
.login-err { color: var(--red); font-size: 12px; min-height: 18px; margin-top: 10px; }

/* ===== Topbar ===== */
.topbar {
  background: var(--black); color: #fff; display: flex; align-items: center;
  gap: 28px; padding: 0 24px; height: 56px; position: sticky; top: 0; z-index: 50;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; }
.topbar-brand .brand-dot { background: #fff; }
.topbar-word { font-weight: 800; letter-spacing: 0.15em; font-size: 15px; }
.topnav { display: flex; gap: 4px; flex: 1; }
.topnav a {
  color: #bbb; text-decoration: none; padding: 8px 14px; border-radius: 8px;
  font-weight: 600; font-size: 13px;
}
.topnav a:hover { color: #fff; }
.topnav a.active { color: #fff; background: rgba(255,255,255,0.12); }
.topbar-user { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.topbar-user small { color: #999; }

.container { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }

/* ===== Cards / layout ===== */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.page-head h2 { font-size: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat .label { font-size: 12px; color: var(--gray); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.stat .value { font-size: 24px; font-weight: 800; margin-top: 6px; }
.stat.accent { border-top: 3px solid var(--red); }

/* ===== Tables ===== */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--gray); text-transform: uppercase; letter-spacing: 0.05em; padding: 8px 10px; border-bottom: 2px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: #f5f5f5; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }

/* ===== Badges / status ===== */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; }
.st-INQUIRY { background: #f3f4f6; color: #374151; border: 1px dashed #9ca3af; }
.st-CONFIRMED { background: #dcfce7; color: var(--green); }
.st-ONGOING { background: #dbeafe; color: var(--blue); }
.st-DONE { background: #111; color: #fff; }
.st-CANCELLED { background: #fee2e2; color: var(--red); }
.st-DRAFT { background: #f3f4f6; color: #374151; }
.st-SENT { background: #fef3c7; color: var(--amber); }
.st-APPROVED { background: #dcfce7; color: var(--green); }
.st-REJECTED { background: #fee2e2; color: var(--red); }
.type-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }

/* ===== Buttons / forms ===== */
.btn { border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn:hover { background: #f5f5f5; }
.btn-primary { background: var(--black); border-color: var(--black); color: #fff; }
.btn-primary:hover { background: #2a2a2a; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { opacity: 0.9; }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,0.3); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; margin-top: 16px; padding: 11px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.form-row.single { grid-template-columns: 1fr; }
.fld label { display: block; font-size: 12px; font-weight: 600; color: var(--gray); margin-bottom: 4px; }
.fld input, .fld select, .fld textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-family: inherit;
}
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 2px solid var(--black); }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filters input, .filters select { padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }

/* ===== Modal ===== */
.modal-wrap { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow: auto; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 720px; }
.modal.wide { max-width: 940px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; }
.modal-close { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--gray); }
.modal-body { padding: 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ===== Calendar ===== */
.cal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.cal-head h3 { font-size: 17px; min-width: 160px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); border-left: 1px solid var(--line); border-top: 1px solid var(--line); background: #fff; border-radius: var(--radius); overflow: hidden; }
.cal-dow { background: var(--black); color: #fff; font-size: 11px; font-weight: 700; text-align: center; padding: 8px 0; text-transform: uppercase; letter-spacing: 0.06em; }
.cal-cell { min-height: 96px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; font-size: 12px; }
.cal-cell.other { background: #f7f7f7; color: #bbb; }
.cal-cell.today .cal-date { background: var(--red); color: #fff; }
.cal-date { font-weight: 700; display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%; margin-bottom: 4px; }
.cal-ev { display: block; padding: 2px 6px; border-radius: 5px; margin-bottom: 3px; color: #fff; font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.inq { background: #fff !important; border: 1px dashed var(--gray); color: var(--ink); }
.cal-clash { color: var(--red); font-weight: 700; font-size: 10px; }

/* ===== Misc ===== */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--black); color: #fff; padding: 12px 22px; border-radius: 10px; font-size: 13px; font-weight: 600; transition: transform 0.25s; z-index: 200; }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--red); }
.muted { color: var(--gray); font-size: 12px; }
.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray); margin: 18px 0 8px; }
.timeline { list-style: none; }
.timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--line); position: relative; font-size: 13px; }
.timeline li:before { content: ""; position: absolute; left: -5px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.timeline .muted { display: block; }
.empty { text-align: center; color: var(--gray); padding: 30px 0; }
.right { text-align: right; }
.mt { margin-top: 14px; }
.warn-box { background: #fef3c7; border: 1px solid #f59e0b; color: #92400e; padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 12px; }

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .topbar { gap: 12px; padding: 0 12px; overflow-x: auto; }
  .topbar-user span { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .cal-cell { min-height: 64px; }
}
