/* A2Z Barbershop — Customer App — Main Styles */
:root {
  --bg:        #141414;
  --surface:   #1c1c1c;
  --card:      #2a2a2a;
  --border:    #383838;
  --border-lt: #2e2e2e;

  --text:      #f0f0f0;
  --text-sec:  #999999;
  --text-mute: #666666;

  --accent:    #c9a84c;
  --accent-bg: #2a2410;
  --accent-bd: #3d3618;

  --green:     #7ecf7e;
  --green-bg:  #1e2e1e;
  --green-bd:  #2a432a;

  --red:       #e05050;
  --red-bg:    #2e1e1e;
  --red-bd:    #4a2a2a;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  --nav-h:    64px;
  --hdr-h:    58px;
  --max-w:    430px;

  --font:    'Poppins', system-ui, sans-serif;
  --font-ar: 'Tajawal', system-ui, sans-serif;
  --ease:    200ms ease;

  /* legacy aliases kept for booking.js compatibility */
  --color-bg:           var(--bg);
  --color-surface:      var(--surface);
  --color-primary:      var(--text);
  --color-primary-light:#cccccc;
  --color-accent:       var(--accent);
  --color-accent-light: #f0dfa0;
  --color-muted:        var(--text-sec);
  --color-muted-light:  var(--text-mute);
  --color-danger:       var(--red);
  --color-success:      var(--green);
  --color-warning:      var(--accent);
  --color-border:       var(--border);
  --color-text:         var(--text);
  --color-text-secondary: var(--text-sec);
  --radius-full:        9999px;
  --shadow-sm:          0 1px 4px rgba(0,0,0,0.4);
  --shadow-md:          0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:          0 8px 32px rgba(0,0,0,0.6);
  --transition:         var(--ease);
  --nav-height:         var(--nav-h);
  --header-height:      var(--hdr-h);
  --max-width:          var(--max-w);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh; min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select, textarea { font: inherit; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* App shell */
#app {
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--surface);
  position: relative;
}

/* ── Header ── */
.app-header {
  height: var(--hdr-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border-lt);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px;
  position: sticky; top: 0; z-index: 100;
  flex-shrink: 0;
}
.app-logo {
  height: 30px;
  width: auto;
  object-fit: contain;
  display: block;
}
.app-logo-fallback {
  font-size: 19px; font-weight: 800; letter-spacing: -0.5px;
  color: var(--accent);
}
.header-right { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  width: 38px; height: 38px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--border);
  color: var(--text-sec); font-size: 12px; font-weight: 700;
  transition: background var(--ease), color var(--ease);
  min-width: 38px;
}
.icon-btn:hover { background: #333; color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.avatar-btn {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  overflow: hidden; background: var(--card);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-sec); font-size: 13px; font-weight: 600;
}
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

/* ── Page content ── */
.page-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-h) + 16px);
  background: var(--bg);
}

/* ── Bottom navigation ── */
.bottom-nav {
  height: var(--nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border-lt);
  display: flex; align-items: center;
  position: sticky; bottom: 0; z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
  flex-shrink: 0;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
  min-height: 44px; padding: 8px 4px;
  color: var(--text-mute);
  transition: color var(--ease);
  font-size: 10px; font-weight: 500; letter-spacing: 0.2px;
  position: relative;
}
.nav-item svg {
  width: 20px; height: 20px; fill: none;
  stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.nav-item.active { color: var(--text); }
.nav-item.active::after {
  content: ''; position: absolute; bottom: 6px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--text);
}
/* hide emoji icons if any remain */
.nav-icon { display: none; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 24px; height: 48px;
  border-radius: var(--radius-md);
  font-size: 15px; font-weight: 600;
  transition: opacity var(--ease), transform var(--ease);
  min-width: 44px;
}
.btn:active  { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; pointer-events: none; }

.btn-primary  { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: #e0e0e0; }
.btn-accent   { background: var(--accent); color: var(--bg); }
.btn-accent:hover { opacity: 0.9; }
.btn-outline  { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--text); }
.btn-ghost    { background: var(--card); color: var(--text); }
.btn-danger   { background: var(--red); color: white; }
.btn-full     { width: 100%; }
.btn-sm       { height: 34px; padding: 0 14px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-lg       { height: 54px; font-size: 16px; }

/* ── Cards ── */
.card {
  background: var(--card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden;
}
.card-padded { padding: 16px; }

/* ── Section labels ── */
.slabel {
  color: var(--text-mute); font-size: 10px; letter-spacing: 1.2px;
  text-transform: uppercase; font-weight: 500;
  padding: 18px 18px 10px;
}
.section-title   { font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.section-header  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-link    { font-size: 12px; color: var(--text-sec); font-weight: 500; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 500;
}
.badge-pending   { background: var(--accent-bg); color: var(--accent); border: 1px solid var(--accent-bd); }
.badge-confirmed { background: var(--green-bg);  color: var(--green);  border: 1px solid var(--green-bd); }
.badge-completed { background: var(--green-bg);  color: var(--green);  border: 1px solid var(--green-bd); }
.badge-cancelled { background: var(--red-bg);    color: var(--red);    border: 1px solid var(--red-bd); }
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ── Empty state ── */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px; text-align: center; gap: 12px;
}
.empty-state-icon { font-size: 48px; opacity: 0.25; }
.empty-state h3   { font-size: 17px; font-weight: 600; color: var(--text); }
.empty-state p    { font-size: 13px; color: var(--text-sec); line-height: 1.5; }

/* ── Spinner ── */
.spinner {
  width: 28px; height: 28px;
  border: 2.5px solid var(--border);
  border-top-color: var(--text-sec);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-container {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px; gap: 14px; color: var(--text-sec); font-size: 13px;
}

/* ── Toast ── */
#toast-container {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px); left: 50%;
  transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none; max-width: calc(var(--max-w) - 32px); width: calc(100vw - 32px);
}
.toast {
  background: var(--card); color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 18px; border-radius: var(--radius-md);
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: toast-in 0.3s ease, toast-out 0.3s ease 2.7s forwards;
  pointer-events: auto;
}
.toast-success { background: var(--green-bg); color: var(--green); border-color: var(--green-bd); }
.toast-error   { background: var(--red-bg);   color: var(--red);   border-color: var(--red-bd); }
.toast-warning { background: var(--accent-bg); color: var(--accent); border-color: var(--accent-bd); }
@keyframes toast-in  { from { opacity:0; transform: translateY(12px); } to { opacity:1; transform: translateY(0); } }
@keyframes toast-out { from { opacity:1; } to { opacity:0; } }

/* ── Form elements ── */
.form-group  { display: flex; flex-direction: column; gap: 6px; }
.form-label  { font-size: 12px; font-weight: 600; color: var(--text-sec); letter-spacing: 0.3px; }
.form-input  {
  height: 48px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 0 14px;
  font-size: 15px; color: var(--text); background: var(--card);
  transition: border-color var(--ease); outline: none;
}
.form-input:focus { border-color: var(--text-sec); }
.form-input::placeholder { color: var(--text-mute); }

/* ── Utility ── */
.text-muted    { color: var(--text-sec); }
.text-center   { text-align: center; }
.text-accent   { color: var(--accent); }
.fw-bold       { font-weight: 700; }
.mt-8  { margin-top: 8px; }  .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.px-16 { padding-left: 16px; padding-right: 16px; }
.py-16 { padding-top: 16px; padding-bottom: 16px; }
.p-16  { padding: 16px; } .p-24  { padding: 24px; }
.gap-8  { gap: 8px; }  .gap-16 { gap: 16px; }
.flex  { display: flex; } .flex-col { flex-direction: column; }
.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ── Lang picker page (index.html) ── */
.lang-picker {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; min-height: 100dvh;
  padding: 32px 24px; gap: 32px;
  background: var(--bg); color: var(--text);
}
.lang-picker .brand { font-size: 48px; font-weight: 900; color: var(--accent); letter-spacing: -1px; }
.lang-picker .tagline { font-size: 15px; color: var(--text-sec); text-align: center; }
.lang-picker .lang-prompt { font-size: 17px; font-weight: 600; text-align: center; }
.lang-buttons { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 280px; }
.lang-btn {
  height: 58px; border-radius: var(--radius-md);
  font-size: 17px; font-weight: 700;
  background: var(--card); color: var(--text);
  border: 1.5px solid var(--border);
  transition: border-color var(--ease), background var(--ease);
}
.lang-btn:hover { border-color: var(--accent); background: #2e2e2e; }
