/* ============================================================
   Team Taurus Social App  v3 — Full stylesheet
   Gold / white / maroon theme
   ============================================================ */
:root {
  --gold:        #c8920a;
  --gold-dark:   #9c6f00;
  --gold-light:  #e8b93a;
  --gold-pale:   #fff8ee;
  --gold-border: #f0d080;
  --maroon:      #6b0a1e;
  --white:       #ffffff;
  --bg:          #f7f4ef;
  --grey-100:    #f5f5f5;
  --grey-200:    #eeeeee;
  --grey-300:    #dddddd;
  --grey-500:    #888888;
  --grey-700:    #555555;
  --grey-900:    #222222;
  --red:         #d32f2f;
  --green:       #2e7d32;
  --radius:      14px;
  --radius-sm:   8px;
  --shadow:      0 2px 12px rgba(0,0,0,.10);
  --shadow-lg:   0 6px 30px rgba(0,0,0,.16);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--grey-900);
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

img { max-width: 100%; display: block; }
a   { color: var(--gold-dark); text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }

/* ── Top header ─────────────────────────────────────── */
.top-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 2px solid var(--gold);
  padding: 10px 16px;
  display: flex; align-items: center; gap: 10px;
}
.top-header .logo-wrap {
  display: flex; align-items: center; gap: 8px; flex: 1;
}
.top-header .logo-img { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; }
.top-header .brand-text { line-height: 1.15; }
.top-header .brand-name { font-size: 14px; font-weight: 800; color: var(--maroon); }
.top-header .brand-site { font-size: 10px; color: var(--grey-500); text-transform: uppercase; letter-spacing: .5px; }
.top-header .header-actions { display: flex; align-items: center; gap: 8px; }

/* Notification bell */
.notif-bell {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%; background: var(--gold-pale); border: 1.5px solid var(--gold-border);
  color: var(--gold-dark); text-decoration: none;
}
.notif-bell svg { width: 20px; height: 20px; }
.notif-badge {
  position: absolute; top: 3px; right: 3px;
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px; padding: 0 3px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--white);
}
.notif-badge.hidden { display: none; }

/* Hamburger drawer button */
.drawer-btn {
  background: none; border: none; padding: 4px;
  color: var(--grey-700); display: flex; align-items: center;
}
.drawer-btn svg { width: 24px; height: 24px; }

/* ── Bottom nav ─────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: var(--white); border-top: 1.5px solid var(--grey-200);
  display: flex; z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 8px 4px 6px;
  color: var(--grey-500); font-size: 10px; font-weight: 600;
  text-decoration: none; gap: 3px; transition: color .15s;
}
.bottom-nav a svg { width: 22px; height: 22px; }
.bottom-nav a.active, .bottom-nav a:hover { color: var(--gold-dark); }
.bottom-nav .fab {
  background: var(--gold); color: var(--white) !important;
  border-radius: 50%; width: 48px; height: 48px;
  margin-top: -16px; box-shadow: 0 2px 10px rgba(200,146,10,.5);
  justify-content: center; font-size: 22px; padding: 0;
}
.bottom-nav .fab svg { width: 26px; height: 26px; }

/* page padding so content isn't hidden behind fixed bars */
.page-body { padding: 0 0 74px; }

/* ── Flash messages ─────────────────────────────────── */
.flash-wrap { padding: 0 12px; margin-top: 8px; }
.flash {
  padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13.5px;
  margin-bottom: 8px; font-weight: 500;
}
.flash.success { background: #e8f5e9; color: #1b5e20; border-left: 4px solid var(--green); }
.flash.error   { background: #ffebee; color: #b71c1c; border-left: 4px solid var(--red); }

/* ── Cards & surfaces ───────────────────────────────── */
.card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); margin: 12px;
  overflow: hidden;
}
.simple-card {
  background: var(--white); border-radius: var(--radius-sm);
  border: 1px solid var(--grey-200); padding: 14px;
  margin-bottom: 10px;
}

/* ── Forms ──────────────────────────────────────────── */
.form-wrap { padding: 16px; }
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--grey-700); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .4px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; border: 1.5px solid var(--grey-300); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 14px; background: var(--white);
  transition: border-color .15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--gold); }
.form-group textarea { min-height: 80px; resize: vertical; }

.btn {
  display: block; width: 100%; padding: 13px;
  border: none; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700; letter-spacing: .3px;
  cursor: pointer; transition: opacity .15s;
}
.btn:active { opacity: .85; }
.btn-gold    { background: linear-gradient(135deg,#e8a800,#c07800); color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--gold); color: var(--gold-dark); }
.btn-red     { background: var(--red); color: #fff; }
.btn-green   { background: var(--green); color: #fff; }
.btn-sm {
  display: inline-block; padding: 6px 14px; font-size: 12px;
  font-weight: 700; border-radius: 20px; border: none; cursor: pointer;
}
.btn-sm.gold    { background: var(--gold); color: #fff; }
.btn-sm.outline { background: transparent; border: 1.5px solid var(--gold); color: var(--gold-dark); }
.btn-sm.red     { background: var(--red); color: #fff; }
.btn-sm.green   { background: var(--green); color: #fff; }

/* ── Section header ─────────────────────────────────── */
.section-header {
  padding: 16px 16px 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.section-header h2 { font-size: 17px; font-weight: 800; color: var(--maroon); }
.section-header p  { font-size: 12px; color: var(--grey-500); margin-top: 2px; }

/* ── Feed / post cards ──────────────────────────────── */
.post-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); margin: 12px; overflow: hidden; }

.post-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; }
.post-header .avatar-wrap { position: relative; }
.post-header .avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
.post-header .post-meta { flex: 1; min-width: 0; }
.post-header .post-title { font-size: 14px; font-weight: 800; color: var(--grey-900); }
.post-header .post-byline { font-size: 11.5px; color: var(--grey-500); margin-top: 1px; }
.post-header .verified-badge {
  display: inline-block; background: var(--gold); color: #fff;
  border-radius: 50%; width: 14px; height: 14px; font-size: 9px;
  text-align: center; line-height: 14px; margin-left: 3px;
}

/* Media carousel */
.carousel { position: relative; background: #000; }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 100%; scroll-snap-align: start; position: relative; }
.carousel-slide img  { width: 100%; height: auto; display: block; object-fit: contain; background: #111; }
.carousel-slide video { width: 100%; height: auto; display: block; max-height: 70vh; }
.carousel-dots { display: flex; justify-content: center; gap: 5px; padding: 6px 0; background: var(--white); }
.carousel-dot  { width: 6px; height: 6px; border-radius: 50%; background: var(--grey-300); transition: background .2s; }
.carousel-dot.active { background: var(--gold); }
.media-counter {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 10px;
}

/* Post description */
.post-description {
  font-size: 13px; color: var(--grey-700); padding: 6px 14px 0;
  line-height: 1.5;
}

/* Action bar */
.action-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px 10px;
}
.action-btn {
  display: flex; align-items: center; gap: 4px;
  background: none; border: none; color: var(--grey-700);
  font-size: 13px; font-weight: 600; padding: 4px 6px;
  border-radius: 20px; transition: background .15s;
}
.action-btn:hover, .action-btn.liked { color: var(--gold-dark); }
.action-btn svg { width: 20px; height: 20px; }
.action-btn.liked svg { fill: var(--gold); stroke: var(--gold); }
.view-count {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto; color: var(--grey-500); font-size: 12px;
}
.view-count svg { width: 16px; height: 16px; }

/* ── Comment modal (Instagram-style) ────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.5); display: none; align-items: flex-end;
}
.modal-overlay.open { display: flex; }
.comment-modal {
  background: var(--white); border-radius: 20px 20px 0 0;
  width: 100%; max-width: 480px; margin: 0 auto;
  max-height: 80vh; display: flex; flex-direction: column;
  animation: slideUp .2s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.comment-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--grey-200);
  font-size: 14px; font-weight: 800;
}
.close-modal-btn { background: none; border: none; font-size: 20px; color: var(--grey-500); padding: 0 4px; }
.comment-modal-list { flex: 1; overflow-y: auto; padding: 10px 14px; }
.comment-modal-form {
  display: flex; gap: 8px; padding: 10px 14px;
  border-top: 1px solid var(--grey-200);
}
.comment-modal-form input {
  flex: 1; border: 1.5px solid var(--grey-300); border-radius: 20px;
  padding: 9px 14px; font-size: 13px;
}
.comment-modal-form input:focus { outline: none; border-color: var(--gold); }
.comment-modal-form button {
  background: var(--gold-dark); color: #fff; border: none;
  border-radius: 50%; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
}
.comment-modal-form button svg { width: 16px; height: 16px; }

/* Comment items */
.comment-item {
  display: flex; gap: 10px; margin-bottom: 14px;
}
.comment-item .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.comment-item .bubble { flex: 1; }
.comment-item .name { font-size: 13px; font-weight: 700; color: var(--grey-900); margin-right: 6px; }
.comment-item .text { font-size: 13px; color: var(--grey-700); line-height: 1.4; }
.comment-item .time { font-size: 10.5px; color: var(--grey-500); margin-top: 3px; }
.comment-item .time button {
  background: none; border: none; color: var(--red); font-size: 10.5px; padding: 0; margin-left: 4px;
}

/* Admin TEAM badge */
.team-badge {
  display: inline-block; font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .3px;
  background: var(--gold); color: #fff;
  padding: 1px 6px; border-radius: 8px; margin-left: 4px; vertical-align: middle;
}

/* Admin reply nested block */
.comment-reply {
  margin: 8px 0 0 16px; padding: 8px 10px;
  background: var(--gold-pale); border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) var(--radius-sm);
}
.comment-reply .name  { font-size: 12.5px; font-weight: 700; }
.comment-reply .text  { font-size: 12.5px; }
.comment-reply .time  { font-size: 10px; color: var(--grey-500); margin-top: 2px; }

/* Reply button (admin only) */
.reply-comment-btn {
  background: none; border: none; color: var(--gold-dark);
  font-size: 10.5px; font-weight: 700; padding: 0; margin-left: 4px;
}
/* Inline reply form */
.reply-form {
  display: flex; gap: 6px; margin: 8px 0 0 16px;
}
.reply-form input {
  flex: 1; border: 1.5px solid var(--grey-300); border-radius: 16px;
  padding: 7px 12px; font-size: 12px;
}
.reply-form input:focus { outline: none; border-color: var(--gold); }
.reply-form button {
  background: var(--gold-dark); color: #fff; border: none;
  border-radius: 16px; padding: 7px 14px; font-size: 12px; font-weight: 700;
}
.empty-hint { text-align: center; color: var(--grey-500); font-size: 13px; padding: 24px 0; }

/* ── Detail page comments (post_detail.html) ───────── */
.detail-comments { padding: 12px 14px 8px; }
.comment-input-bar {
  display: flex; gap: 8px; padding: 10px 14px;
  border-top: 1px solid var(--grey-200); background: var(--white);
  position: sticky; bottom: 74px;
}
.comment-input-bar input {
  flex: 1; border: 1.5px solid var(--grey-300); border-radius: 20px;
  padding: 9px 14px; font-size: 13px;
}
.comment-input-bar input:focus { outline: none; border-color: var(--gold); }
.comment-input-bar button {
  background: var(--gold-dark); color: #fff; border: none;
  border-radius: 50%; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.comment-input-bar button svg { width: 16px; height: 16px; }

/* ── Feedback feed ──────────────────────────────────── */
.feedback-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); margin: 12px; overflow: hidden;
}
.feedback-card video { width: 100%; max-height: 400px; object-fit: contain; background: #000; display: block; }
.feedback-meta { padding: 10px 14px; display: flex; align-items: center; gap: 10px; }
.feedback-meta .avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.feedback-meta .name   { font-size: 13px; font-weight: 700; }
.feedback-meta .caption { font-size: 12px; color: var(--grey-500); }

/* ── Tables (sticky headers) ────────────────────────── */
.table-wrap {
  overflow-x: auto; overflow-y: auto;
  max-height: 70vh;
  border-radius: var(--radius-sm);
  border: 1px solid var(--grey-200);
  margin: 0 12px 12px;
}
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--gold-pale); color: var(--grey-700);
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px;
  padding: 10px 12px; text-align: left;
  border-bottom: 2px solid var(--gold-border);
  white-space: nowrap;
}
.data-table tbody td { padding: 10px 12px; border-bottom: 1px solid var(--grey-200); vertical-align: top; }
.data-table tbody tr:hover { background: var(--grey-100); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ── Status badges ──────────────────────────────────── */
.badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .3px;
  padding: 2px 8px; border-radius: 10px;
}
.badge.pending   { background: #fff8e1; color: #f57f17; border: 1px solid #ffe082; }
.badge.approved  { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.badge.rejected  { background: #ffebee; color: #b71c1c; border: 1px solid #ef9a9a; }
.badge.open      { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.badge.assigned  { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }
.badge.resolved  { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.badge.active    { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.badge.inactive  { background: #eeeeee; color: #555555; border: 1px solid #cccccc; }
.badge.update    { background: #e8eaf6; color: #283593; border: 1px solid #9fa8da; }
.badge.announcement { background: var(--gold-pale); color: var(--gold-dark); border: 1px solid var(--gold-border); }
.badge.alert     { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }

/* ── Filter tabs ────────────────────────────────────── */
.filter-tabs {
  display: flex; gap: 8px; padding: 10px 14px;
  overflow-x: auto; scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  flex-shrink: 0;
  padding: 6px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 700; border: 1.5px solid var(--grey-300);
  background: var(--white); color: var(--grey-700); text-decoration: none;
  transition: all .15s;
}
.filter-tab.active, .filter-tab:hover {
  background: var(--gold); border-color: var(--gold); color: #fff;
}

/* ── Ticket thread ──────────────────────────────────── */
.ticket-header { padding: 14px; border-bottom: 1px solid var(--grey-200); }
.ticket-header h3 { font-size: 16px; font-weight: 800; }
.ticket-header .meta { font-size: 12px; color: var(--grey-500); margin-top: 3px; }
.ticket-header .assigned { font-size: 12px; color: var(--gold-dark); font-weight: 700; margin-top: 4px; }
.ticket-header .description { font-size: 13px; color: var(--grey-700); margin-top: 8px; }

.thread { padding: 10px 14px; }
.message-bubble {
  max-width: 88%; margin-bottom: 10px;
  padding: 9px 13px; border-radius: 16px; font-size: 13.5px; line-height: 1.4;
}
.message-bubble.from-agent  { background: var(--gold-dark); color: #fff; margin-left: auto; border-radius: 16px 16px 4px 16px; }
.message-bubble.from-customer { background: var(--grey-100); color: var(--grey-900); margin-right: auto; border-radius: 16px 16px 16px 4px; }
.message-bubble .bubble-meta { font-size: 10px; margin-top: 4px; opacity: .75; }
.resolve-btn-wrap { padding: 10px 14px; border-top: 1px solid var(--grey-200); }
.reply-input-wrap {
  display: flex; gap: 8px; padding: 10px 14px;
  border-top: 1px solid var(--grey-200); background: var(--white);
  position: sticky; bottom: 74px;
}
.reply-input-wrap input {
  flex: 1; border: 1.5px solid var(--grey-300); border-radius: 20px; padding: 9px 14px; font-size: 13px;
}
.reply-input-wrap input:focus { outline: none; border-color: var(--gold); }
.reply-input-wrap button {
  background: var(--gold-dark); color: #fff; border: none;
  border-radius: 50%; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
}

/* ── Admin drawer ───────────────────────────────────── */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.45);
  display: none;
}
.drawer-overlay.open { display: block; }
.drawer-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 201;
  width: 280px; max-width: 90vw;
  background: var(--white); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .25s ease;
}
.drawer-panel.open { transform: translateX(0); }
.drawer-head {
  background: var(--maroon); color: #fff; padding: 20px 16px 14px;
  display: flex; align-items: center; gap: 10px;
}
.drawer-head img   { width: 40px; height: 40px; border-radius: 8px; }
.drawer-head h4    { font-size: 14px; font-weight: 800; }
.drawer-head small { font-size: 11px; opacity: .8; }
.drawer-close {
  margin-left: auto; background: none; border: none;
  color: #fff; font-size: 22px; padding: 0 4px;
}
.drawer-menu { flex: 1; overflow-y: auto; padding: 10px 0; }
.drawer-menu a {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px; font-size: 14px; font-weight: 600;
  color: var(--grey-700); text-decoration: none;
  transition: background .15s;
}
.drawer-menu a:hover, .drawer-menu a.active { background: var(--gold-pale); color: var(--gold-dark); }
.drawer-menu a svg { width: 20px; height: 20px; flex-shrink: 0; }
.drawer-badge {
  margin-left: auto; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; min-width: 18px; height: 18px;
  border-radius: 9px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
}
.drawer-divider { border: none; border-top: 1px solid var(--grey-200); margin: 6px 14px; }

/* ── Photo frames gallery ───────────────────────────── */
.frame-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; padding: 12px;
}
.frame-card {
  background: var(--white); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); overflow: hidden;
}
.frame-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.frame-card-info { padding: 8px 10px; }
.frame-card-info .name { font-size: 12px; font-weight: 700; color: var(--grey-900); }
.frame-card-info .date { font-size: 10px; color: var(--grey-500); margin-top: 2px; }
.frame-card-actions { display: flex; gap: 6px; padding: 8px 10px 10px; flex-wrap: wrap; }
.frame-card-actions a,
.frame-card-actions button {
  flex: 1; text-align: center; padding: 6px 4px; border-radius: 20px;
  font-size: 11px; font-weight: 700; border: none; text-decoration: none; cursor: pointer;
}
.frame-btn-download { background: var(--gold); color: #fff; }
.frame-btn-delete   { background: #ffebee; color: var(--red); }

/* ── Notifications list ─────────────────────────────── */
.notif-list { padding: 10px 12px; }
.notif-item {
  background: var(--white); border-radius: var(--radius-sm);
  box-shadow: 0 1px 6px rgba(0,0,0,.07); padding: 14px;
  margin-bottom: 10px;
  border-left: 4px solid var(--grey-300);
  transition: border-color .2s;
}
.notif-item.unread { border-left-color: var(--gold); background: var(--gold-pale); }
.notif-item.update       { border-left-color: #3f51b5; }
.notif-item.announcement { border-left-color: var(--gold); }
.notif-item.alert        { border-left-color: #e65100; }
.notif-item h4 { font-size: 14px; font-weight: 800; margin-bottom: 4px; }
.notif-item p  { font-size: 13px; color: var(--grey-700); line-height: 1.4; }
.notif-item .notif-meta { font-size: 10.5px; color: var(--grey-500); margin-top: 6px; }

/* ── Admin notification form ────────────────────────── */
.notif-type-row { display: flex; gap: 8px; }
.notif-type-row > * { flex: 1; }

/* ── Profile page ───────────────────────────────────── */
.profile-hero {
  background: linear-gradient(135deg, var(--maroon) 0%, #3a0010 100%);
  padding: 28px 16px 20px; text-align: center; color: #fff;
}
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--gold); margin: 0 auto 10px;
}
.profile-name { font-size: 18px; font-weight: 800; }
.profile-role { font-size: 12px; opacity: .75; margin-top: 2px; }
.profile-info-block {
  background: var(--white); margin: 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--grey-200);
}
.profile-info-row {
  display: flex; align-items: flex-start; padding: 11px 14px;
  border-bottom: 1px solid var(--grey-200);
}
.profile-info-row:last-child { border-bottom: none; }
.profile-info-label { width: 110px; font-size: 11.5px; font-weight: 700; color: var(--grey-500); flex-shrink: 0; text-transform: uppercase; letter-spacing: .3px; }
.profile-info-value { font-size: 13.5px; color: var(--grey-900); flex: 1; }

/* ── KPI cards ──────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 12px 0; }
.kpi-card {
  background: var(--white); border-radius: var(--radius-sm);
  padding: 14px; text-align: center; box-shadow: var(--shadow);
  border-top: 3px solid var(--gold);
}
.kpi-number { font-size: 26px; font-weight: 900; color: var(--maroon); }
.kpi-label  { font-size: 11px; color: var(--grey-500); font-weight: 600; text-transform: uppercase; margin-top: 2px; }

/* ── Ticket card in list ────────────────────────────── */
.ticket-card {
  background: var(--white); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 14px; margin-bottom: 10px; cursor: pointer;
}
.ticket-card h4 { font-size: 14px; font-weight: 800; margin-bottom: 4px; }
.ticket-card .ticket-meta { font-size: 11.5px; color: var(--grey-500); }
.ticket-card .ticket-desc { font-size: 13px; color: var(--grey-700); margin-top: 4px; }

/* ── Upload post preview grid ───────────────────────── */
.upload-preview-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  padding: 0 14px 10px;
}
.upload-preview-grid img,
.upload-preview-grid video {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px;
}

/* ── Security notice box ────────────────────────────── */
.security-notice {
  background: #fff8e1; border: 1px solid #ffe082; border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 12.5px; color: #5d4037; line-height: 1.5; margin-bottom: 12px;
}

/* ── PWA install banner ─────────────────────────────── */
.pwa-install-bar {
  background: var(--maroon); color: #fff;
  padding: 10px 14px; display: flex; align-items: center; gap: 10px;
  animation: slideDown .3s ease;
}
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
.pwa-install-bar p   { flex: 1; font-size: 13px; font-weight: 600; }
.pwa-install-btn     { background: var(--gold); color: #fff; border: none; border-radius: 20px; padding: 6px 16px; font-size: 12px; font-weight: 700; }
.pwa-dismiss-btn     { background: none; border: none; color: rgba(255,255,255,.7); font-size: 18px; padding: 0 4px; }

/* ── Landing page ───────────────────────────────────── */
.landing { min-height: 100vh; display: flex; flex-direction: column; background: var(--white); }
.landing-hero {
  background: linear-gradient(160deg, var(--maroon) 0%, #3a0010 60%, #1a0008 100%);
  color: #fff; text-align: center; padding: 60px 24px 48px; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
}
.landing-logo { width: 80px; height: 80px; object-fit: contain; border-radius: 16px; }
.landing-hero h1 { font-size: 26px; font-weight: 900; }
.landing-hero p  { font-size: 14px; opacity: .8; max-width: 300px; line-height: 1.6; }
.landing-actions { padding: 24px; display: flex; flex-direction: column; gap: 12px; }

/* ── Auth forms ─────────────────────────────────────── */
.auth-header {
  background: linear-gradient(135deg, var(--maroon), #3a0010);
  color: #fff; padding: 28px 20px 22px; text-align: center;
}
.auth-header img { width: 52px; height: 52px; border-radius: 10px; margin: 0 auto 10px; }
.auth-header h2  { font-size: 20px; font-weight: 800; }
.auth-header p   { font-size: 13px; opacity: .75; margin-top: 4px; }

/* ── Phone input with country selector ─────────────── */
.phone-row { display: flex; gap: 8px; }
.country-select-wrap { position: relative; width: 140px; flex-shrink: 0; }
.country-select-wrap select {
  width: 100%; padding: 10px 8px 10px 36px; font-size: 13px;
  border: 1.5px solid var(--grey-300); border-radius: var(--radius-sm);
  appearance: none; background: var(--white);
}
.country-select-wrap .flag-emoji {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  font-size: 18px; pointer-events: none;
}
.dial-prefix {
  display: flex; align-items: center; justify-content: center;
  background: var(--grey-100); border: 1.5px solid var(--grey-300); border-radius: var(--radius-sm);
  padding: 0 10px; font-size: 13px; font-weight: 700; white-space: nowrap; flex-shrink: 0;
  min-width: 58px;
}
.phone-row .phone-input { flex: 1; }

/* ── 404 ────────────────────────────────────────────── */
.not-found-wrap {
  min-height: 80vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 24px;
}
.not-found-wrap h2 { font-size: 64px; font-weight: 900; color: var(--gold); }
.not-found-wrap p  { font-size: 14px; color: var(--grey-500); margin: 8px 0 20px; }

/* ── Helpers ────────────────────────────────────────── */
.text-center { text-align: center; }
.text-grey   { color: var(--grey-500); }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mb-12 { margin-bottom: 12px; }
.p-14  { padding: 14px; }
.gap-8 { gap: 8px; }
.flex  { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ── Back button ────────────────────────────────────── */
.back-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px 0; color: var(--gold-dark); font-weight: 700;
  font-size: 14px; text-decoration: none; width: fit-content;
}
.back-btn svg { width: 18px; height: 18px; }

/* ── Responsive ─────────────────────────────────────── */
@media (min-width: 481px) {
  .drawer-panel { max-width: 300px; }
}

/* ── PWA Install Modal ──────────────────────────────── */
.install-modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.6); display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}
.install-modal-overlay.open { display: flex; }
.install-modal {
  background: var(--white); border-radius: var(--radius);
  width: 100%; max-width: 400px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: popIn .2s ease;
}
@keyframes popIn { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.install-modal-head {
  background: linear-gradient(135deg, var(--maroon), #3a0010);
  color: #fff; padding: 20px 18px 16px;
  display: flex; align-items: center; gap: 12px;
}
.install-modal-head img { width: 44px; height: 44px; border-radius: 10px; }
.install-modal-head h3 { font-size: 16px; font-weight: 800; }
.install-modal-head p  { font-size: 12px; opacity: .8; margin-top: 2px; }
.install-modal-close { margin-left: auto; background: none; border: none; color: #fff; font-size: 22px; padding: 0 4px; cursor: pointer; }
.install-modal-body { padding: 18px; }
.install-step {
  display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px;
}
.install-step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--gold); color: #fff;
  font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.install-step-text { font-size: 13.5px; color: var(--grey-700); line-height: 1.45; }
.install-step-text strong { color: var(--grey-900); }
.install-platform-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.install-tab {
  flex: 1; padding: 8px 4px; border-radius: 20px;
  border: 1.5px solid var(--grey-300); font-size: 12px; font-weight: 700;
  cursor: pointer; background: var(--white); color: var(--grey-700);
  text-align: center;
}
.install-tab.active { background: var(--gold); border-color: var(--gold); color: #fff; }
.install-chrome-steps, .install-ios-steps { display: none; }
.install-chrome-steps.show, .install-ios-steps.show { display: block; }
.install-pwa-btn {
  display: block; width: 100%; padding: 13px;
  background: linear-gradient(135deg, #e8a800, #c07800);
  color: #fff; border: none; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 800; cursor: pointer; margin-top: 6px;
}
.install-pwa-btn:disabled { opacity: .5; cursor: default; }

/* Install trigger link (in drawer / nav) */
.install-app-link {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px; font-size: 14px; font-weight: 600;
  color: var(--gold-dark) !important; text-decoration: none;
  transition: background .15s; cursor: pointer; background: none; border: none; width: 100%;
}
.install-app-link:hover { background: var(--gold-pale); }
.install-app-link svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ── Frame Template Selection Grid ──────────────────── */
.frame-template-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 6px;
}
.frame-tpl-card {
  border: 2px solid var(--grey-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  position: relative;
  background: var(--white);
}
.frame-tpl-card:hover { border-color: var(--gold-border); }
.frame-tpl-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-light);
}
.frame-tpl-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #111;
}
.frame-tpl-img-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.frame-tpl-check {
  position: absolute; top: 6px; right: 6px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--gold); color: #fff;
  font-size: 12px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.frame-tpl-card.selected .frame-tpl-check { opacity: 1; }
.frame-tpl-name {
  padding: 6px 8px 2px;
  font-size: 12px; font-weight: 700; color: var(--grey-900);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.frame-tpl-badge {
  padding: 0 8px 6px;
  font-size: 10px; font-weight: 800; color: var(--gold-dark);
  text-transform: uppercase; letter-spacing: .3px;
}

/* ── WhatsApp frame button ───────────────────────── */
.frame-btn-whatsapp {
  flex: 1; text-align: center; padding: 6px 4px; border-radius: 20px;
  font-size: 11px; font-weight: 700; border: none; text-decoration: none;
  cursor: pointer; background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.frame-btn-whatsapp:hover { background: #128c7e; }

/* ── Global search bar ──────────────────────────── */
.search-bar-wrap {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; background: var(--white);
  border-bottom: 1px solid var(--grey-200);
}
.search-input {
  flex: 1; border: 1.5px solid var(--grey-300); border-radius: 20px;
  padding: 8px 16px; font-size: 13.5px; background: var(--grey-100);
}
.search-input:focus { outline: none; border-color: var(--gold); background: var(--white); }
.search-submit {
  background: var(--gold-dark); color: #fff; border: none;
  border-radius: 20px; padding: 8px 16px; font-size: 13px; font-weight: 700;
}

/* ── Filter row ─────────────────────────────────── */
.filter-row {
  display: flex; gap: 8px; padding: 8px 12px; flex-wrap: wrap;
  align-items: center; background: var(--white);
  border-bottom: 1px solid var(--grey-200);
}
.filter-row label { font-size: 11px; font-weight: 700; color: var(--grey-500); text-transform: uppercase; }
.filter-row select {
  border: 1.5px solid var(--grey-300); border-radius: 20px;
  padding: 5px 12px; font-size: 12px; background: var(--white);
}
.filter-row select:focus { outline: none; border-color: var(--gold); }
