/* ===================================================================
   Reyes Haircutters Lipa Branch — Design tokens
   Display: Fraunces (warm, characterful serif) — used with restraint
   Body/UI: Inter — clean and legible for forms & data
   Data:    IBM Plex Mono — for scores and numbers in dashboards
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,500&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root{
  --ink:        #201A16;
  --ink-soft:   #5B4E40;
  --canvas:     #F3EFE7;
  --paper:      #FFFFFF;
  --brass:      #A9793C;
  --brass-dark: #7E5A29;
  --moss:       #4B5D46;
  --rose:       #B65C56;
  --border:     #E4DCCB;
  --shadow:     0 10px 30px rgba(32,26,22,0.08);
  --radius:     14px;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; }
body{
  margin:0;
  font-family:'Inter', sans-serif;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.5;
}
h1,h2,h3,.display{
  font-family:'Fraunces', serif;
  font-weight:600;
  letter-spacing: -0.01em;
  margin: 0 0 .4em 0;
}
a{ color: var(--brass-dark); }
p{ margin: 0 0 1em 0; }
img{ max-width:100%; display:block; }

/* Focus visibility (accessibility floor) */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, label:focus-visible{
  outline: 3px solid var(--brass);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.container{ max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---------------- Buttons ---------------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font-family:'Inter',sans-serif; font-weight:600; font-size:15px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor:pointer; text-decoration:none; transition: transform .12s ease, background .15s ease;
}
.btn-primary{ background: var(--ink); color:#fff; }
.btn-primary:hover{ background: var(--brass-dark); transform: translateY(-1px); }
.btn-outline{ background:transparent; border-color: var(--border); color: var(--ink); }
.btn-outline:hover{ border-color: var(--brass); color: var(--brass-dark); }
.btn-block{ width:100%; }
.btn-sm{ padding:8px 14px; font-size:13px; }
.btn-danger{ background: var(--rose); color:#fff; }

/* ---------------- Snip-mark divider (signature element) ---------------- */
.snip-divider{
  display:flex; align-items:center; gap:12px; margin: 28px 0; color: var(--brass);
}
.snip-divider::before, .snip-divider::after{
  content:""; flex:1; height:1px; background: var(--border);
}
.snip-divider svg{ width:18px; height:18px; flex-shrink:0; }

/* =========================================================
   PUBLIC FEEDBACK FORM
   ========================================================= */
.public-hero{
  background: radial-gradient(120% 140% at 15% -10%, #33291f 0%, var(--ink) 55%, #150f0c 100%);
  color: #F3EFE7;
  padding: 48px 0 90px;
  text-align:center;
  position: relative;
}
.public-hero .eyebrow{
  text-transform: uppercase; letter-spacing:.14em; font-size:12px;
  color: #D9B98A; font-weight:600; margin-bottom:14px;
}
.public-hero h1{
  font-size: clamp(28px, 6vw, 40px); color:#fff; margin-bottom:10px;
}
.public-hero p.sub{ color:#D8CDBC; max-width:440px; margin:0 auto; font-size:15px; }

.public-wrap{ max-width: 560px; margin: -60px auto 60px; padding: 0 18px; }
.card{
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 28px 24px;
}
.form-section + .form-section{ margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--border); }
.form-step-label{
  font-size:12px; text-transform:uppercase; letter-spacing:.1em; color: var(--brass-dark);
  font-weight:700; margin-bottom: 10px; display:block;
}
label.field-label{ display:block; font-weight:600; margin-bottom:6px; font-size:14px; }

select, textarea, input[type=text], input[type=password]{
  width:100%; padding: 12px 14px; border-radius: 10px; border:1px solid var(--border);
  font-family:'Inter',sans-serif; font-size:15px; background:#fff; color: var(--ink);
}
textarea{ resize: vertical; min-height: 90px; }
.char-count{ font-size:12px; color: var(--ink-soft); text-align:right; margin-top:4px; }
.hint{ font-size:12.5px; color: var(--ink-soft); margin-top:4px; }

/* Accessible star rating (no JS required) */
.stars{
  display:flex; flex-direction: row-reverse; justify-content:center; gap:6px; font-size: 40px;
}
.stars input{ position:absolute; opacity:0; width:1px; height:1px; }
.stars label{
  cursor:pointer; color:#DED2BC; transition: color .12s ease, transform .12s ease; line-height:1;
}
.stars input:checked ~ label,
.stars label:hover,
.stars label:hover ~ label{ color: var(--brass); }
.stars input:focus-visible + label{ outline: 3px solid var(--brass); outline-offset:3px; border-radius:6px; }
.rating-caption{ text-align:center; font-size:13px; color: var(--ink-soft); margin-top:6px; min-height:16px; }

.msg-success{ background:#EFF3ED; border:1px solid var(--moss); color:#2F3D2C; padding:12px 16px; border-radius:10px; margin-bottom:18px; font-size:14px; }
.msg-error{ background:#FBEFE9; border:1px solid var(--rose); color:#7A322C; padding:12px 16px; border-radius:10px; margin-bottom:18px; font-size:14px; }

.thankyou{ text-align:center; padding: 90px 20px; }
.thankyou .seal{
  width:74px; height:74px; border-radius:50%; background: var(--moss); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:34px; margin: 0 auto 20px;
}

.public-footer{ text-align:center; font-size:12.5px; color: var(--ink-soft); padding: 10px 20px 40px; }

/* =========================================================
   LOGIN
   ========================================================= */
.login-wrap{
  min-height: 100vh; display:flex; align-items:center; justify-content:center;
  background: var(--ink); padding: 20px;
}
.login-card{ width:100%; max-width: 380px; }
.login-card .card{ padding: 32px 26px; }
.login-brand{ text-align:center; margin-bottom: 22px; }
.login-brand .eyebrow{ text-transform:uppercase; letter-spacing:.14em; font-size:11px; color: var(--brass-dark); font-weight:700; }
.login-brand h1{ font-size:22px; margin-top:6px; }

/* =========================================================
   APP SHELL (staff & owner dashboards)
   ========================================================= */
.app-shell{ display:flex; min-height:100vh; }
.app-sidebar{
  width: 232px; flex-shrink:0; background: var(--ink); color:#EDE6D8;
  padding: 22px 16px; display:flex; flex-direction:column;
}
.app-sidebar .brand{ padding: 6px 8px 22px; border-bottom:1px solid rgba(255,255,255,.1); margin-bottom:16px; }
.app-sidebar .brand .eyebrow{ font-size:10.5px; text-transform:uppercase; letter-spacing:.12em; color:#C9AE84; }
.app-sidebar .brand strong{ display:block; font-family:'Fraunces',serif; font-size:17px; margin-top:4px; }
.app-nav a{
  display:flex; align-items:center; gap:10px; color:#D9D0C2; text-decoration:none;
  padding: 11px 12px; border-radius:10px; font-size:14px; font-weight:500; margin-bottom:2px;
}
.app-nav a:hover{ background: rgba(255,255,255,.06); color:#fff; }
.app-nav a.active{ background: var(--brass); color:#fff; }
.app-sidebar .sidebar-footer{ margin-top:auto; padding-top:16px; border-top:1px solid rgba(255,255,255,.1); font-size:13px; }
.app-sidebar .sidebar-footer a{ color:#D9D0C2; display:block; padding:8px 12px; text-decoration:none; border-radius:8px; }
.app-sidebar .sidebar-footer a:hover{ background: rgba(255,255,255,.06); color:#fff; }

.app-main{ flex:1; min-width:0; }
.app-topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding: 20px 28px; border-bottom:1px solid var(--border); background: var(--paper);
}
.app-topbar h1{ font-size:20px; margin:0; }
.app-content{ padding: 26px 28px 60px; }

.grid-cards{ display:grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap:16px; margin-bottom: 26px; }
.stat-card{ background: var(--paper); border:1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.stat-card .label{ font-size:12.5px; color: var(--ink-soft); text-transform:uppercase; letter-spacing:.06em; margin-bottom:8px; }
.stat-card .value{ font-family:'IBM Plex Mono', monospace; font-size:28px; font-weight:600; color: var(--ink); }
.stat-card .value small{ font-size:14px; font-weight:500; color: var(--ink-soft); }

.panel{ background: var(--paper); border:1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom:24px; }
.panel .panel-head{ display:flex; align-items:center; justify-content:space-between; padding: 18px 22px; border-bottom:1px solid var(--border); flex-wrap:wrap; gap:10px; }
.panel .panel-head h2{ font-size:16px; margin:0; }
.panel-body{ padding: 20px 22px; }

.tabs{ display:flex; gap:6px; flex-wrap:wrap; }
.tabs a{
  font-size:13px; font-weight:600; padding:7px 13px; border-radius:999px; text-decoration:none;
  color: var(--ink-soft); border:1px solid var(--border);
}
.tabs a.active{ background: var(--ink); color:#fff; border-color: var(--ink); }

/* Ranking list */
.rank-list{ list-style:none; margin:0; padding:0; }
.rank-list li{
  display:flex; align-items:center; gap:14px; padding: 13px 0; border-bottom: 1px solid var(--border);
}
.rank-list li:last-child{ border-bottom:none; }
.rank-badge{
  width:32px; height:32px; border-radius:50%; background: var(--canvas); border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center; font-family:'IBM Plex Mono',monospace;
  font-weight:600; font-size:13px; color: var(--ink-soft); flex-shrink:0;
}
.rank-list li:nth-child(1) .rank-badge{ background: var(--brass); color:#fff; border-color: var(--brass); }
.rank-name{ flex:1; min-width:0; }
.rank-name strong{ display:block; font-size:14.5px; }
.rank-name span{ font-size:12.5px; color: var(--ink-soft); }
.rank-score{ font-family:'IBM Plex Mono',monospace; font-weight:600; font-size:15px; display:flex; align-items:center; gap:6px; }
.rank-bar-track{ width:90px; height:6px; background: var(--canvas); border-radius:999px; overflow:hidden; display:none; }
.rank-bar-fill{ height:100%; background: var(--brass); }
@media(min-width:640px){ .rank-bar-track{ display:block; } }

/* Tables */
table.data-table{ width:100%; border-collapse:collapse; font-size:14px; }
.data-table th{ text-align:left; font-size:11.5px; text-transform:uppercase; letter-spacing:.06em; color: var(--ink-soft); padding: 10px 12px; border-bottom:2px solid var(--border); }
.data-table td{ padding: 12px; border-bottom:1px solid var(--border); vertical-align:top; }
.data-table tr:last-child td{ border-bottom:none; }
.stars-static{ color: var(--brass); letter-spacing:1px; }
.comment-cell{ max-width:320px; color: var(--ink); }
.empty-state{ text-align:center; padding: 40px 20px; color: var(--ink-soft); }

.badge{ display:inline-block; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:600; }
.badge-moss{ background:#EAF0E7; color: var(--moss); }
.badge-rose{ background:#F8E9E6; color:#8C463F; }
.badge-brass{ background:#F3E7D4; color: var(--brass-dark); }

.field-row{ display:grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap:14px; margin-bottom:16px; }

@media (max-width: 860px){
  .app-shell{ flex-direction:column; }
  .app-sidebar{ width:100%; flex-direction:row; align-items:center; padding:14px 16px; overflow-x:auto; }
  .app-sidebar .brand{ border:none; padding:0 14px 0 0; margin:0; }
  .app-nav{ display:flex; gap:4px; }
  .app-sidebar .sidebar-footer{ margin:0 0 0 auto; padding:0; border:none; display:flex; }
  .app-content{ padding: 20px 16px 50px; }
  .app-topbar{ padding:16px; }
}
