/* =============================================================================
   Amsiyah product UI — ported from the approved Claude Design artifact
   (Amsiyah Tracker.dc.html + StatCard.dc.html + StatusBadge.dc.html).
   Class names mirror the artifact's blocks; values are the artifact's values.
   ========================================================================== */
@import url('/fonts/tajawal/tajawal.css');

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Tajawal', system-ui, sans-serif;
  background: #FFFFFF;
  color: #1C2B27;
  -webkit-font-smoothing: antialiased;
}
a { color: #12574D; text-decoration: none; }
a:hover { color: #0E4139; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #D8D5CD; border-radius: 8px; border: 2px solid #FFFFFF; }
::-webkit-scrollbar-thumb:hover { background: #C3BFB4; }

@keyframes am-spin { to { transform: rotate(360deg); } }
@keyframes am-fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes am-popIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes am-toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

input, button, select, textarea { font-family: inherit; }
input:focus, textarea:focus, select:focus { outline: none; }
[dir="rtl"] .ltr { direction: ltr; }

/* ---------- App shell ---------- */
.am-app { display: flex; min-height: 100vh; }

.am-sidebar {
  width: 248px; flex: none; background: #FFFFFF; color: #4A5A54;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  border-inline-end: 1px solid #EFEDE7;
}
.am-sidebar-head {
  padding: 18px 20px; display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid #F0EEE8; min-height: 88px;
}
.am-sidebar-head img { height: 58px; width: auto; display: block; }
.am-nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.am-nav-group { font-size: 10.5px; font-weight: 700; color: #9AA39D; letter-spacing: .5px; padding: 12px 12px 4px; }
.am-nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 500;
  color: #5E6B66; transition: background .15s;
}
.am-nav-item svg { color: #6E877F; flex: none; }
.am-nav-item:hover { background: #F5F3EE; color: #5E6B66; }
.am-nav-item.active { background: #12574D; color: #fff; font-weight: 700; }
.am-nav-item.active svg { color: #fff; }
.am-nav-item .grow { flex: 1; }
.am-nav-badge {
  background: #C6A15B; color: #0E3B33; font-size: 11px; font-weight: 800;
  border-radius: 999px; min-width: 20px; height: 20px; padding: 0 6px;
  display: flex; align-items: center; justify-content: center;
}
.am-sidebar-foot { padding: 14px; border-top: 1px solid #F0EEE8; }
.am-user { display: flex; align-items: center; gap: 10px; padding: 8px 6px; }
.am-user-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: #C6A15B; color: #0E3B33;
  font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 14px; flex: none;
}
.am-user-name { font-size: 13.5px; font-weight: 700; color: #1C2B27; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-user-sub { font-size: 11px; color: #9AA39D; }
.am-logout {
  cursor: pointer; color: #9AA39D; display: flex; align-items: center; justify-content: center;
  background: none; border: 0; padding: 0; min-width: 40px; min-height: 40px; margin: -8px -8px -8px 0;
}
.am-logout:hover { color: #12574D; }

.am-maincol { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.am-topbar {
  height: 66px; flex: none; background: rgba(255,255,255,.8); backdrop-filter: blur(8px);
  border-bottom: 1px solid #E7E5DF; display: flex; align-items: center; gap: 16px;
  padding: 0 26px; position: sticky; top: 0; z-index: 20;
}
.am-topbar-info { flex: 1; min-width: 0; }
.am-back { font-size: 12.5px; color: #12574D; cursor: pointer; margin-bottom: 1px; font-weight: 600; display: inline-block; }
.am-title {
  font-size: 19px; font-weight: 800; color: #1C2B27; letter-spacing: -.4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.am-burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: #3C463F; }
.am-new-event {
  height: 40px; border: none; border-radius: 11px; background: #12574D; color: #fff !important;
  font-size: 14px; font-weight: 700; padding: 0 16px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; transition: background .15s;
}
.am-new-event:hover { background: #0E4139; }
.am-new-event .plus { font-size: 19px; line-height: 0; margin-top: -2px; }

/* NOTE: no transform animation on .am-main — a filling transform would become
   the containing block for the position:fixed modal overlays inside pages. */
.am-main { flex: 1; min-width: 0; padding: 26px; max-width: 1240px; width: 100%; margin: 0 auto; }
.am-anim { animation: am-fadeUp .4s ease both; }

/* ---------- Generic card / buttons / forms ---------- */
.am-card { background: #fff; border: 1px solid #E7E5DF; border-radius: 16px; overflow: hidden; }
.am-card-pad { padding: 18px 20px; }
.am-card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid #EFEDE7; gap: 10px; }
.am-card-title { font-size: 15.5px; font-weight: 800; color: #1C2B27; }
.am-card-sub { font-size: 13px; color: #8A938E; margin-top: 3px; }
.am-link { font-size: 13px; color: #12574D; cursor: pointer; font-weight: 600; background: none; border: 0; padding: 0; }

.am-btn {
  height: 44px; border: none; border-radius: 11px; background: #12574D; color: #fff !important;
  font-size: 14px; font-weight: 700; padding: 0 24px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap; transition: background .15s; text-decoration: none;
}
.am-btn:hover { background: #0E4139; }
.am-btn:disabled { opacity: .55; cursor: not-allowed; }
.am-btn.sm { height: 40px; padding: 0 16px; font-size: 13.5px; border-radius: 10px; }
.am-btn.shadow { box-shadow: 0 8px 18px -10px #12574D; }
.am-btn-outline {
  height: 44px; border: 1px solid #DAD7CF; border-radius: 11px; background: #fff; color: #5E6B66;
  font-size: 14px; font-weight: 700; padding: 0 20px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; text-decoration: none;
}
.am-btn-outline:hover { background: #F5F3EE; color: #5E6B66; }
.am-btn-outline.sm { height: 40px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; color: #3C463F; }
.am-btn-outline.sm:hover { border-color: #12574D; }
.am-btn-green-outline {
  height: 40px; border: 1px solid #12574D; border-radius: 10px; background: #fff; color: #12574D !important;
  font-size: 13.5px; font-weight: 700; padding: 0 16px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; text-decoration: none;
}
.am-btn-green-outline:hover { background: #E7F1EE; }

.am-label { display: block; font-size: 13px; font-weight: 600; color: #3C463F; margin-bottom: 7px; }
.am-label .req { color: #C05B44; }
.am-input, .am-select {
  width: 100%; height: 44px; border: 1px solid #DAD7CF; border-radius: 11px;
  padding: 0 13px; font-size: 14px; background: #fff; color: #1A1C1B;
  transition: border-color .15s, box-shadow .15s;
}
.am-textarea {
  width: 100%; border: 1px solid #DAD7CF; border-radius: 11px; padding: 11px 13px;
  font-size: 14px; background: #fff; resize: vertical; line-height: 1.6;
}
.am-input:focus, .am-textarea:focus, .am-select:focus { border-color: #12574D; box-shadow: 0 0 0 3px #12574D22; }
.am-input.mono { background: #FAF9F5; font-family: monospace; font-size: 13.5px; direction: ltr; text-align: left; }
.am-input.mono:focus { background: #fff; }
.am-input.invalid, .am-textarea.invalid { border-color: #C05B44; box-shadow: 0 0 0 3px #C05B4422; }
.am-error { font-size: 12px; color: #B24A34; margin-top: 5px; font-weight: 600; }
.am-hint { font-size: 12px; color: #9AA39D; margin-top: 5px; line-height: 1.6; }

/* ---------- Status badge (ported component) ---------- */
.am-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 4px;
  border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 1;
  white-space: nowrap; border: 1px solid transparent;
}
.am-badge .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.am-badge .tick { font-size: 12px; letter-spacing: -2px; margin-inline-start: -1px; }

/* ---------- Stat card (ported component, calm skin) ---------- */
.am-stat {
  position: relative; border-radius: 16px; padding: 16px 17px; overflow: hidden;
  background: #FFFFFF; border: 1px solid #E7E5DF;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.am-stat .lbl { font-size: 12.5px; font-weight: 600; color: #6B746F; margin-bottom: 7px; line-height: 1.3; }
.am-stat .val { font-size: 33px; font-weight: 800; line-height: 1; color: #1C2B27; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.am-stat .cap { font-size: 11.5px; font-weight: 500; color: #9AA39D; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-stat .ico { flex: none; width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; }

/* ---------- Dashboard ---------- */
.am-grid-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.am-grid-two { display: grid; grid-template-columns: 1.62fr 1fr; gap: 16px; }
.am-side-stack { display: flex; flex-direction: column; gap: 16px; }

.am-ev-row {
  display: flex; align-items: center; gap: 13px; padding: 13px 18px;
  border-bottom: 1px solid #F3F1EB; cursor: pointer; color: inherit; transition: background .12s;
}
.am-ev-row:hover { background: #FAF9F5; color: inherit; }
.am-ev-avatar {
  width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 16px; flex: none;
}
.am-ev-name { font-size: 14.5px; font-weight: 700; color: #1C2B27; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-ev-meta { font-size: 12px; color: #8A938E; margin-top: 2px; }
.am-ev-count { text-align: center; flex: none; width: 74px; }
.am-ev-count b { display: block; font-size: 15px; font-weight: 800; color: #1C2B27; }
.am-ev-count span { font-size: 10.5px; color: #9AA39D; }

.am-rate {
  background: linear-gradient(155deg, #12574D, #0E4139); border-radius: 16px;
  padding: 20px; color: #EAF1EE; position: relative; overflow: hidden;
}
.am-rate::before { content: ""; position: absolute; width: 180px; height: 180px; border: 1px solid #ffffff14; border-radius: 50%; top: -70px; left: -40px; }
.am-rate .t { font-size: 13px; color: #9FC2B8; font-weight: 600; position: relative; }
.am-rate .v { font-size: 44px; font-weight: 900; letter-spacing: -2px; margin-top: 6px; position: relative; }
.am-rate .v small { font-size: 22px; }
.am-rate .bar { height: 8px; border-radius: 6px; background: #ffffff22; margin-top: 12px; overflow: hidden; position: relative; }
.am-rate .bar i { display: block; height: 100%; background: linear-gradient(90deg, #C6A15B, #E3C989); border-radius: 6px; }
.am-rate .s { font-size: 12.5px; color: #9FC2B8; margin-top: 11px; position: relative; }
.am-rate.center { text-align: center; }
.am-rate.center .v { font-size: 46px; margin-top: 2px; }

.am-quick { padding: 6px; }
.am-quick-title { padding: 11px 13px 6px; font-size: 13px; font-weight: 700; color: #6B746F; }
.am-quick-item { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 10px; cursor: pointer; color: inherit; transition: background .12s; }
.am-quick-item:hover { background: #F5F3EE; color: inherit; }
.am-quick-item .qi { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex: none; }
.am-quick-item .qt { font-size: 13.5px; font-weight: 700; color: #1C2B27; }
.am-quick-item .qs { font-size: 11.5px; color: #9AA39D; }
.am-quick-item .chev { margin-inline-start: auto; color: #C3BFB4; font-size: 17px; }

/* ---------- Tables (artifact grid pattern) ---------- */
.am-thead {
  display: grid; gap: 0; padding: 12px 18px; background: #FAF9F5;
  border-bottom: 1px solid #EFEDE7; font-size: 12px; font-weight: 700; color: #8A938E;
}
.am-trow {
  display: grid; gap: 0; padding: 15px 18px; border-bottom: 1px solid #F3F1EB;
  align-items: center; color: inherit; transition: background .12s;
}
a.am-trow { cursor: pointer; }
a.am-trow:hover { background: #FAF9F5; color: inherit; }
.am-td-title { font-size: 14.5px; font-weight: 700; color: #1C2B27; padding-inline-end: 10px; }
.am-td { font-size: 13px; color: #5E6B66; }
.am-td-num { text-align: center; font-size: 14px; font-weight: 700; color: #1C2B27; }
.am-td-green { text-align: center; font-size: 14px; font-weight: 700; color: #12574D; }
.am-td-dim { font-size: 12.5px; color: #9AA39D; }
.cols-events  { grid-template-columns: 1.7fr 1.1fr 1fr .7fr 1.1fr .7fr .9fr; }
.cols-guests  { grid-template-columns: 1.7fr 1.1fr 1.2fr 1fr 1.5fr .8fr; }
.cols-preview { grid-template-columns: 1.4fr 1.1fr 1.1fr .8fr; }
.cols-camp    { grid-template-columns: 1.6fr .9fr 1.1fr .8fr .8fr 1fr; }
.cols-msgs    { grid-template-columns: 1.4fr 1.2fr 1.3fr 1.2fr 1fr; }
.cols-integ   { grid-template-columns: .5fr .8fr 1.2fr 1.3fr 1.1fr .7fr 1fr; }
.cols-users   { grid-template-columns: 1.2fr 1.5fr .9fr .8fr 1.6fr; }

/* mobile card alternative for wide tables */
.am-mrow { display: none; }

/* ---------- Pagination (design-neutral, table footer) ---------- */
.am-pager {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 18px; background: #FAF9F5; border-top: 1px solid #EFEDE7;
}
.am-pager .info { font-size: 12.5px; color: #8A938E; font-weight: 600; }

/* ---------- Filter chips ---------- */
.am-chips-label { font-size: 11.5px; font-weight: 700; color: #9AA39D; margin-bottom: 7px; }
.am-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.am-chip {
  padding: 7px 13px; border-radius: 9px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; border: 1px solid #E0DDD5; background: #fff; color: #5E6B66; white-space: nowrap;
}
.am-chip.active { border-color: #12574D; background: #12574D; color: #fff; }
.am-search {
  flex: 1; min-width: 220px; height: 40px; border: 1px solid #DAD7CF; border-radius: 10px;
  padding: 0 13px; font-size: 13.5px; background: #FAF9F5;
}
.am-search:focus { border-color: #12574D; background: #fff; box-shadow: 0 0 0 3px #12574D22; }

/* ---------- Event details ---------- */
.am-hero { background: #fff; border: 1px solid #E7E5DF; border-radius: 16px; padding: 20px 22px; display: flex; gap: 22px; margin-bottom: 16px; }
.am-hero-main { flex: 1; min-width: 0; }
.am-hero-tag { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; flex-wrap: wrap; }
.am-hero-id { font-size: 12.5px; color: #9AA39D; }
.am-hero-name { font-size: 23px; font-weight: 800; color: #1C2B27; letter-spacing: -.5px; }
.am-hero-meta { display: flex; flex-wrap: wrap; margin-top: 14px; gap: 10px 26px; }
.am-hero-meta .k { font-size: 11.5px; color: #9AA39D; margin-bottom: 2px; }
.am-hero-meta .v { font-size: 13.5px; font-weight: 600; color: #3C463F; }
.am-hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.am-thumb-wrap { flex: none; width: 158px; }
.am-thumb { width: 158px; height: 198px; object-fit: cover; border-radius: 12px; border: 1px solid #E7E5DF; display: block; }
.am-thumb-cap { text-align: center; font-size: 11.5px; color: #9AA39D; margin-top: 7px; }
.am-thumb-empty {
  width: 158px; height: 198px; border-radius: 12px; border: 1.5px dashed #CFCCC2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  cursor: pointer; background: #FAF9F5; text-align: center; padding: 14px;
  font-size: 12px; color: #8A938E; font-weight: 600; line-height: 1.5;
}
.am-thumb-empty:hover { border-color: #12574D; background: #F3F6F4; }

.am-tabs { display: flex; gap: 5px; background: #fff; border: 1px solid #E7E5DF; border-radius: 13px; padding: 6px; margin-bottom: 16px; overflow-x: auto; }
.am-tab {
  display: flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 10px;
  cursor: pointer; font-size: 14px; font-weight: 600; color: #6B746F; white-space: nowrap;
  background: none; border: 0;
}
.am-tab.active { font-weight: 700; color: #12574D; background: #E7F1EE; }
.am-tab .b { background: #C6A15B; color: #fff; font-size: 11px; font-weight: 800; border-radius: 999px; min-width: 19px; height: 19px; padding: 0 6px; display: flex; align-items: center; justify-content: center; }

.am-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; margin-bottom: 16px; }
.am-grid-half { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.am-notes-text { font-size: 13.5px; color: #5E6B66; line-height: 1.9; }

/* guests inside event */
.am-filters { background: #fff; border: 1px solid #E7E5DF; border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; }
.am-filter-groups { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.am-guest-avatar { width: 32px; height: 32px; border-radius: 50%; background: #EDEBE4; color: #6B746F; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: none; }
.am-guest-name { font-size: 13.5px; font-weight: 600; color: #1C2B27; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-unread-mark { font-size: 10.5px; color: #A9781A; font-weight: 700; }
.am-phone { direction: ltr; font-size: 12.5px; color: #5E6B66; text-align: right; font-variant-numeric: tabular-nums; }
.am-reply-snippet { font-size: 12.5px; color: #5E6B66; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-reply-time { font-size: 10.5px; color: #9AA39D; }
.am-row-unread { background: #FBF7EC; }
.am-noresults { padding: 36px; text-align: center; font-size: 13.5px; color: #9AA39D; }

/* replies tab (cards) */
.am-replies { display: flex; flex-direction: column; gap: 12px; }
.am-reply-card { background: #fff; border: 1px solid #E7E5DF; border-radius: 14px; padding: 16px 18px; border-inline-start: 3px solid #EFEDE7; }
.am-reply-card.unread { border-inline-start-color: #C6A15B; }
.am-reply-avatar { width: 40px; height: 40px; border-radius: 50%; background: #E7F1EE; color: #12574D; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; flex: none; }
.am-reply-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.am-reply-name { font-size: 14.5px; font-weight: 700; color: #1C2B27; }
.am-reply-phone { direction: ltr; font-size: 12px; color: #9AA39D; font-variant-numeric: tabular-nums; }
.am-new-pill { font-size: 10.5px; color: #A9781A; font-weight: 800; background: #F7EFD9; padding: 2px 8px; border-radius: 999px; }
.am-reply-when { font-size: 11.5px; color: #9AA39D; }
.am-reply-text { font-size: 14px; color: #3C463F; line-height: 1.7; margin-top: 8px; background: #F5F3EE; border-radius: 10px; padding: 10px 13px; }
.am-reply-actions { display: flex; align-items: center; gap: 9px; margin-top: 12px; flex-wrap: wrap; }
.am-reply-actions .lbl { font-size: 12px; color: #9AA39D; font-weight: 600; }
.am-act { height: 32px; border-radius: 8px; font-size: 12.5px; font-weight: 700; padding: 0 13px; cursor: pointer; transition: all .15s; }
.am-act.attend { border: 1px solid #C7E0D7; background: #E7F1EE; color: #12574D; }
.am-act.attend:hover { background: #12574D; color: #fff; }
.am-act.decline { border: 1px solid #EDD2C7; background: #F7EAE4; color: #B24A34; }
.am-act.decline:hover { background: #B24A34; color: #fff; }
.am-act.unsure { border: 1px solid #ECDFBB; background: #F7EFD9; color: #A9781A; }
.am-act.unsure:hover { background: #A9781A; color: #fff; }

/* report tab */
.am-report-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.am-dist-bar { display: flex; height: 16px; border-radius: 8px; overflow: hidden; background: #F1EFE9; margin-bottom: 20px; }
.am-legend { display: flex; flex-direction: column; gap: 12px; }
.am-legend .row { display: flex; align-items: center; gap: 10px; }
.am-legend .sw { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.am-legend .nm { flex: 1; font-size: 13.5px; color: #3C463F; font-weight: 600; }
.am-legend .ct { font-size: 13.5px; font-weight: 800; color: #1C2B27; }
.am-legend .pc { font-size: 12px; color: #9AA39D; width: 42px; text-align: left; }
.am-funnel { display: flex; flex-direction: column; gap: 13px; }
.am-funnel .row { display: flex; align-items: center; gap: 10px; }
.am-funnel .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.am-funnel .nm { flex: 1; font-size: 13.5px; color: #3C463F; font-weight: 600; }
.am-funnel .ct { font-size: 15px; font-weight: 800; color: #1C2B27; }

/* ---------- Event form (create/edit) ---------- */
.am-eventform { padding: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.am-eventform > div { grid-column: 1 / -1; }
.am-eventform > .am-eventform-half { grid-column: auto; }

/* ---------- Settings ---------- */
.am-settings-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.am-form-col { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.am-form-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.am-form-foot { padding: 16px 22px; border-top: 1px solid #EFEDE7; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.am-status-line { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.am-status-line .d { width: 9px; height: 9px; border-radius: 50%; }
.am-template-box { background: #F0F7F0; border: 1px solid #D6E8DC; border-radius: 12px; padding: 14px; font-size: 13.5px; color: #2C3B36; line-height: 2; }
.am-varchip { background: #C6A15B22; color: #8A6516; border-radius: 5px; padding: 1px 6px; font-weight: 700; font-size: 12.5px; }
.am-note-card { background: #FBF7EC; border: 1px solid #ECDFBB; border-radius: 16px; padding: 16px 18px; }
.am-note-card .t { font-size: 13px; font-weight: 800; color: #8A6516; margin-bottom: 6px; }
.am-note-card .d { font-size: 12.5px; color: #7A6A3F; line-height: 1.8; }
.am-code { direction: ltr; display: block; background: #FAF9F5; border: 1px solid #E7E5DF; border-radius: 9px; padding: 9px 12px; font-family: monospace; font-size: 12px; color: #3C463F; user-select: all; overflow-x: auto; white-space: nowrap; }

/* ---------- Safety banners ---------- */
.am-mock-banner {
  background: #FBF7EC; border-bottom: 1px solid #ECDFBB; color: #8A6516;
  font-size: 12.5px; font-weight: 700; padding: 8px 26px; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
}
.am-mock-banner .d { width: 8px; height: 8px; border-radius: 50%; background: #C79A3A; flex: none; }
.am-lock-banner {
  background: #F7EAE4; border: 1px solid #EDD2C7; border-radius: 12px;
  color: #B24A34; font-size: 13px; line-height: 1.8; padding: 12px 14px;
}
.am-lock-banner code { direction: ltr; unicode-bidi: embed; font-size: 12px; }

/* ---------- Modals ---------- */
.am-overlay {
  position: fixed; inset: 0; background: #1C2B2799; backdrop-filter: blur(3px);
  z-index: 90; display: flex; align-items: center; justify-content: center; padding: 26px;
}
.am-modal { background: #fff; border-radius: 18px; width: 100%; overflow: hidden; display: flex; flex-direction: column; animation: am-popIn .25s ease both; max-height: 88vh; }
.am-modal.w720 { max-width: 720px; }
.am-modal.w660 { max-width: 660px; }
.am-modal.w480 { max-width: 480px; }
.am-modal.w460 { max-width: 460px; }
.am-modal-head { padding: 18px 22px; border-bottom: 1px solid #EFEDE7; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex: none; }
.am-modal-title { font-size: 16px; font-weight: 800; color: #1C2B27; }
.am-modal-sub { font-size: 12.5px; color: #8A938E; margin-top: 2px; }
.am-modal-x { cursor: pointer; color: #9AA39D; font-size: 22px; line-height: 1; background: none; border: 0; padding: 0 4px; }
.am-modal-body { overflow-y: auto; }
.am-modal-foot { padding: 16px 22px; border-top: 1px solid #EFEDE7; display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex: none; flex-wrap: wrap; }
.am-modal-foot .note { font-size: 12.5px; color: #8A938E; margin-inline-end: auto; }

.am-drop {
  border: 2px dashed #CFCCC2; border-radius: 14px; padding: 44px 20px; text-align: center;
  cursor: pointer; background: #FAF9F5; transition: all .15s; display: block;
}
.am-drop:hover, .am-drop.hover { border-color: #12574D; background: #F0F7F3; }
.am-drop .ic { width: 52px; height: 52px; border-radius: 13px; background: #E7F1EE; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; color: #12574D; }
.am-drop .t { font-size: 15px; font-weight: 700; color: #1C2B27; }
.am-drop .s { font-size: 12.5px; color: #9AA39D; margin-top: 6px; }
.am-drop .fakebtn { display: inline-flex; align-items: center; margin-top: 16px; height: 40px; border-radius: 10px; background: #12574D; color: #fff; font-size: 13.5px; font-weight: 700; padding: 0 20px; }

.am-count-chip { border-radius: 9px; padding: 7px 13px; font-size: 12.5px; font-weight: 700; }
.am-count-chip.ok  { background: #E7F1EE; border: 1px solid #C7E0D7; color: #12574D; }
.am-count-chip.dup { background: #F7EFD9; border: 1px solid #ECDFBB; color: #A9781A; }
.am-count-chip.err { background: #F7EAE4; border: 1px solid #EDD2C7; color: #B24A34; }

.am-send-grid { padding: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.am-send-k { font-size: 11.5px; color: #9AA39D; margin-bottom: 3px; }
.am-send-name { font-size: 15px; font-weight: 800; color: #1C2B27; }
.am-meta-boxes { display: flex; gap: 10px; }
.am-meta-box { flex: 1; border-radius: 11px; padding: 12px 14px; }
.am-meta-box.green { background: #F0F7F3; border: 1px solid #D6E8DC; }
.am-meta-box.sand { background: #FAF9F5; border: 1px solid #E7E5DF; }
.am-meta-box .n { font-size: 24px; font-weight: 900; color: #12574D; letter-spacing: -1px; }
.am-meta-box .tpl { direction: ltr; font-size: 15px; font-weight: 800; color: #3C463F; text-align: right; margin-top: 5px; }
.am-meta-box .l { font-size: 11.5px; color: #6B857C; font-weight: 600; }
.am-meta-box.sand .l { color: #9AA39D; margin-top: 4px; }
.am-mini-thumb { width: 112px; height: 140px; object-fit: cover; border-radius: 10px; border: 1px solid #E7E5DF; display: block; }
.am-mini-thumb-empty { width: 112px; height: 140px; border-radius: 10px; border: 1.5px dashed #CFCCC2; display: flex; align-items: center; justify-content: center; font-size: 11.5px; color: #9AA39D; text-align: center; padding: 10px; }
.am-wa { background: #E7E0D6; border-radius: 14px; padding: 16px; background-image: radial-gradient(#00000008 1px, transparent 1px); background-size: 16px 16px; }
.am-wa-bubble { background: #fff; border-radius: 4px 14px 14px 14px; padding: 8px; box-shadow: 0 1px 2px #0000001a; max-width: 260px; }
.am-wa-bubble img { width: 100%; border-radius: 8px; display: block; margin-bottom: 7px; }
.am-wa-text { font-size: 13px; color: #1C2B27; line-height: 1.75; white-space: pre-line; padding: 2px 5px 4px; }
.am-wa-time { text-align: left; font-size: 10px; color: #8A938E; padding: 0 5px; }

.am-spinner { width: 58px; height: 58px; border-radius: 50%; border: 4px solid #E7F1EE; border-top-color: #12574D; margin: 0 auto 16px; animation: am-spin .8s linear infinite; }
.am-done-circle { width: 58px; height: 58px; border-radius: 50%; background: #E7F1EE; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; color: #12574D; }
.am-progress { height: 10px; border-radius: 6px; background: #F1EFE9; overflow: hidden; }
.am-progress i { display: block; height: 100%; background: linear-gradient(90deg, #12574D, #1C7A6B); border-radius: 6px; transition: width .3s; }
.am-prog-caption { text-align: center; font-size: 12.5px; color: #8A938E; margin-top: 8px; }
.am-prog-counters { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding: 20px 26px 8px; }
.am-prog-box { text-align: center; border-radius: 11px; padding: 12px 6px; }
.am-prog-box .n { font-size: 22px; font-weight: 900; }
.am-prog-box .l { font-size: 11px; color: #6B746F; font-weight: 600; }
.am-prog-box.sent { background: #E9EEEC; } .am-prog-box.sent .n { color: #4F6A63; }
.am-prog-box.ok { background: #E7F1EE; } .am-prog-box.ok .n { color: #12574D; }
.am-prog-box.bad { background: #F7EAE4; } .am-prog-box.bad .n { color: #B24A34; }

/* ---------- Empty state ---------- */
.am-empty { background: #fff; border: 1px solid #E7E5DF; border-radius: 16px; padding: 52px 24px; text-align: center; }
.am-empty .ic { width: 56px; height: 56px; border-radius: 14px; background: #F1EFE9; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; color: #12574D; }
.am-empty .h { font-size: 16px; font-weight: 800; color: #1C2B27; }
.am-empty .d { font-size: 13.5px; color: #8A938E; margin-top: 6px; margin-bottom: 20px; line-height: 1.7; }

/* ---------- Toast ---------- */
.am-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #1C2B27; color: #fff; padding: 12px 20px; border-radius: 12px;
  font-size: 14px; font-weight: 600; box-shadow: 0 12px 30px -8px #0009; z-index: 100;
  animation: am-toastIn .3s ease both; display: flex; align-items: center; gap: 10px; max-width: 90vw;
}
.am-toast .ic { color: #8FD8C6; display: flex; }
.am-toast.warn .ic { color: #E3C989; }

/* ---------- Login ---------- */
.am-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #FFFFFF; padding: 40px 20px; }
.am-login-box { width: 100%; max-width: 380px; animation: am-fadeUp .45s ease both; }
.am-login-box .logo { height: 82px; width: auto; display: block; margin: 0 auto 26px; }
.am-login-h { font-size: 22.5px; font-weight: 800; color: #1A1C1B; letter-spacing: -.4px; text-align: center; }
.am-login-s { font-size: 13.5px; color: #8B908C; margin-top: 7px; margin-bottom: 34px; text-align: center; }
.am-login-box .am-label { color: #414743; }
.am-login-box .am-input { height: 44px; border-color: #E4E4E0; border-radius: 10px; font-size: 14.5px; direction: ltr; text-align: left; }
.am-login-row { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 24px; }
.am-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #5E6461; cursor: pointer; }
.am-remember input { width: 15px; height: 15px; accent-color: #12574D; }
.am-forgot { font-size: 13px; color: #12574D; font-weight: 600; white-space: nowrap; }
.am-login-btn { width: 100%; height: 46px; border: none; border-radius: 10px; background: #12574D; color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; }
.am-login-btn:hover { background: #0E4139; }
.am-login-foot { text-align: center; font-size: 12px; color: #A6ABA7; margin-top: 30px; }

/* ---------- Loading ---------- */
.am-loading-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: #9AA39D; }
.am-loading-inline .sp { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #E7F1EE; border-top-color: #12574D; animation: am-spin .8s linear infinite; }
[wire\:loading] { pointer-events: none; }

/* =============================================================================
   Responsive — deliberate 1440 / 834 / 390 behaviour
   ========================================================================== */
@media (max-width: 1100px) {
  .am-grid-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .am-grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .am-grid-two { grid-template-columns: 1fr; }
  .am-report-grid { grid-template-columns: 1fr; }
  .am-settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1023.9px) {
  .am-sidebar {
    position: fixed; inset-inline-start: 0; top: 0; z-index: 95; height: 100vh;
    transform: translateX(100%); transition: transform .22s ease; box-shadow: -12px 0 30px #0002;
  }
  [dir="ltr"] .am-sidebar { transform: translateX(-100%); }
  .am-sidebar.open { transform: translateX(0); }
  .am-drawer-overlay { position: fixed; inset: 0; background: #1C2B2766; z-index: 94; }
  .am-burger { display: flex; }
  .am-topbar { padding: 0 16px; }
  .am-main { padding: 18px 16px; }
}

@media (max-width: 640px) {
  .am-grid-stats { grid-template-columns: 1fr; margin-bottom: 16px; }
  .am-grid-4 { grid-template-columns: 1fr 1fr; }
  .am-grid-half { grid-template-columns: 1fr; }
  .am-title { font-size: 17px; }
  .am-new-event .lbl { display: none; }
  .am-new-event { padding: 0 12px; }
  .am-hero { flex-direction: column-reverse; padding: 16px; }
  .am-thumb-wrap { width: 100%; display: flex; flex-direction: column; align-items: center; }
  .am-hero-actions .am-btn-outline.sm, .am-hero-actions .am-btn.sm { flex: 1 1 auto; justify-content: center; }
  .am-send-grid { grid-template-columns: 1fr; padding: 16px; }
  .am-overlay { padding: 10px 10px 0; align-items: flex-end; }
  .am-modal { max-height: 94vh; border-radius: 18px 18px 0 0; }
  .am-ev-count { display: none; }
  .am-form-row2 { grid-template-columns: 1fr; }
  .am-eventform { grid-template-columns: 1fr; padding: 16px; }
  .am-eventform > .am-eventform-half { grid-column: 1 / -1; }
  .am-modal-foot .am-btn, .am-modal-foot .am-btn-outline { flex: 1; }

  /* wide grids become row-cards on mobile */
  .am-thead { display: none; }
  .am-trow { display: none; }
  .am-mrow {
    display: flex; flex-direction: column; gap: 8px; padding: 14px 16px;
    border-bottom: 1px solid #F3F1EB; color: inherit;
  }
  .am-mrow .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .am-mrow .sub { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
  .am-mrow .meta { font-size: 12px; color: #8A938E; }
}
