/* Fajaan Admin Panel — clean professional theme, teal #0F766E to match the app */
:root {
  --teal: #0F766E; --teal-dark: #0B5E57; --teal-light: #E6F4F2;
  --coral: #FF6B4A; --yellow: #FFC531; --cream: #FFF9F0;
  --ink: #1F2937; --muted: #6B7280; --border: #E5E7EB;
  --bg: #F7F8F7; --surface: #FFFFFF; --danger: #B91C1C; --danger-bg: #FEF2F2;
  --ok: #15803D; --ok-bg: #F0FDF4; --warn-bg: #FFFBEB; --warn: #92400E;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; }
.hidden { display: none !important; }
h1, h2, h3 { margin: 0 0 10px; }
h1 { font-size: 24px; } h2 { font-size: 19px; } h3 { font-size: 16px; }
p { margin: 0 0 10px; }
a { color: var(--teal); }
code { background: #F3F4F6; padding: 1px 5px; border-radius: 4px; font-size: 13px; }
button { cursor: pointer; font: inherit; }
input, select, textarea { font: inherit; padding: 9px 10px; border: 1px solid var(--border);
  border-radius: 8px; width: 100%; background: #fff; }
textarea { min-height: 90px; resize: vertical; }
label { display: block; margin-bottom: 12px; font-weight: 600; font-size: 13px; }
label .hint, .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.check input { width: auto; }

/* Buttons */
.btn { border: 1px solid var(--border); background: #fff; color: var(--ink);
  padding: 9px 16px; border-radius: 8px; font-weight: 600; }
.btn:hover { background: #F3F4F6; }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-dark); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.warn { background: var(--yellow); border-color: var(--yellow); color: #1F2937; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.block { width: 100%; margin-top: 6px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.linklike { background: none; border: none; color: var(--teal); padding: 0;
  font-weight: 600; text-decoration: underline; }

/* Alerts / toast */
.alert { padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.alert.error { background: var(--danger-bg); color: var(--danger); border: 1px solid #FECACA; }
.alert.info { background: var(--teal-light); color: var(--teal-dark); border: 1px solid #BFE8E3; }
.alert.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #FDE68A; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px;
  z-index: 100; box-shadow: 0 4px 16px rgba(0,0,0,.25); }

/* Login */
.screen { min-height: 100vh; }
#loginScreen { display: flex; align-items: flex-start; justify-content: center;
  padding: 48px 16px; background: linear-gradient(180deg, var(--teal-light), var(--bg)); }
.login-card { background: var(--surface); width: 100%; max-width: 460px;
  padding: 28px; border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.08); }
.login-logo { width: 56px; height: 56px; border-radius: 12px; background: var(--teal);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; margin-bottom: 12px; }
.login-card h1 { margin-bottom: 2px; }
.login-card .sub { color: var(--muted); margin-bottom: 18px; }
.fineprint { font-size: 12px; color: var(--muted); margin-top: 18px; }
.steps { padding-left: 20px; } .steps li { margin-bottom: 6px; }

/* Panel shell */
.topbar { background: var(--teal); color: #fff; display: flex; justify-content: space-between;
  align-items: center; padding: 10px 18px; position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 800; font-size: 18px; display: flex; gap: 10px; align-items: center; }
.brand-mark { background: #fff; color: var(--teal); border-radius: 8px; padding: 2px 8px; font-size: 14px; }
.top-right { display: flex; gap: 12px; align-items: center; font-size: 13px; }
.top-right .btn { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.4); color: #fff; }
.shell { display: flex; min-height: calc(100vh - 52px); }
.sidebar { width: 230px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--border);
  padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.sidebar .nav { text-align: left; background: none; border: none; padding: 10px 12px;
  border-radius: 8px; font-weight: 600; color: var(--ink); display: flex;
  justify-content: space-between; align-items: center; }
.sidebar .nav:hover { background: var(--teal-light); }
.sidebar .nav.active { background: var(--teal); color: #fff; }
.badge { background: var(--coral); color: #fff; border-radius: 999px; font-size: 11px;
  padding: 1px 7px; font-weight: 700; }
.badge:empty { display: none; }
.content { flex: 1; padding: 22px 26px; max-width: 1100px; }
.session-info { opacity: .85; }

/* Cards / tables */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin: 14px 0; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.stat .num { font-size: 30px; font-weight: 800; color: var(--teal); }
.stat .lbl { color: var(--muted); font-size: 13px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.card h3 { margin-bottom: 6px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input, .toolbar select { width: auto; flex: 1; min-width: 160px; }
table.tbl { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl th { background: #F9FAFB; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #F3F4F6; }
.pill.pending, .pill.open, .pill.submitted, .pill.awaiting-seller { background: var(--warn-bg); color: var(--warn); }
.pill.approved, .pill.active, .pill.delivered, .pill.closed, .pill.decided { background: var(--ok-bg); color: var(--ok); }
.pill.rejected, .pill.suspended, .pill.reported { background: var(--danger-bg); color: var(--danger); }
.pill.hidden { background: #F3F4F6; color: var(--muted); }
.pill.negative { background: var(--danger-bg); color: var(--danger); }
.doc-photos { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.doc-photos figure { margin: 0; }
.doc-photos img { width: 150px; height: 110px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); display: block; }
.doc-photos figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 4px 12px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.timeline { list-style: none; padding: 0; margin: 10px 0; }
.timeline li { padding: 6px 0 6px 22px; position: relative; color: var(--muted); }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 9px; height: 9px;
  border-radius: 50%; background: #D1D5DB; }
.timeline li.done { color: var(--ink); font-weight: 600; }
.timeline li.done::before { background: var(--teal); }
.msg { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.msg .meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.reply { background: var(--teal-light); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.settings-section { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 18px; }
.modal-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex;
  align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: 14px; padding: 22px; max-width: 560px; width: 100%;
  max-height: 88vh; overflow: auto; }
@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 1px solid var(--border); }
  .field-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .content { padding: 16px; }
}
