/* ShiftSwap Bee v6 - Clean Single File */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  --honey: #ff8c00;
  --honey-dk: #cc6600;
  --gold: #ffd166;
  --black: #0a0a08;
  --dark: #111109;
  --surface: #1a1a14;
  --surface2: #222218;
  --border: #2e2e22;
  --text: #f0ead6;
  --muted: #8a8570;
  --green: #2ecc71;
  --red: #e74c3c;
  --r: 14px;
  --rs: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Outfit', -apple-system, sans-serif;
  background: var(--black);
  color: var(--text);
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
}

/* ── SCREENS ── */
.screen { display: none; flex-direction: column; min-height: 100vh; }
.screen.active { display: flex; }

/* ── LOADING ── */
#screen-loading {
  align-items: center; justify-content: center; gap: 20px;
}
.loading-bee { font-size: 52px; animation: float 2s ease-in-out infinite; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
.loading-logo {
  font-size: 28px; font-weight: 800;
  color: var(--honey); letter-spacing: -0.5px;
}
.loading-spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border); border-top-color: var(--honey);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── JOIN ── */
#screen-join { padding: 0; }
.join-hero {
  background: linear-gradient(160deg, var(--surface), var(--dark));
  border-bottom: 1px solid var(--border);
  padding: 52px 24px 32px;
  text-align: center;
}
.app-bee { font-size: 32px; display: block; margin-bottom: 6px; }
.app-logo { font-size: 30px; font-weight: 800; color: var(--honey); margin-bottom: 4px; }
.app-tagline { font-size: 14px; color: var(--muted); }
.join-body { padding: 24px; }
.group-preview {
  background: rgba(255,140,0,.08); border: 1.5px solid rgba(255,140,0,.4);
  border-radius: var(--rs); padding: 14px 16px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
}
.group-preview-icon { font-size: 24px; }
.group-preview .group-name { font-weight: 700; font-size: 16px; color: var(--honey); }
.group-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── FORMS ── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--muted); margin-bottom: 7px;
  letter-spacing: .08em; text-transform: uppercase;
}
.form-group input, .form-group select {
  width: 100%; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--rs);
  padding: 13px 16px; color: var(--text);
  font-family: 'Outfit', sans-serif; font-size: 16px; outline: none;
  transition: border-color .2s;
}
.form-group input:focus, .form-group select:focus { border-color: var(--honey); }
.form-group select option { background: var(--surface); }

/* ── BUTTONS ── */
.btn-primary {
  width: 100%; background: var(--honey); color: #000;
  border: none; border-radius: var(--rs); padding: 15px;
  font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 700;
  cursor: pointer; margin-top: 4px; display: block;
}
.btn-primary:active { opacity: .85; }

.btn-secondary {
  width: 100%; background: transparent; color: var(--muted);
  border: 1.5px solid var(--border); border-radius: var(--rs); padding: 14px;
  font-family: 'Outfit', sans-serif; font-size: 15px;
  cursor: pointer; margin-top: 10px; display: block;
}
.btn-secondary:hover { border-color: var(--honey); color: var(--honey); }

.btn-whatsapp {
  width: 100%; background: #25d366; color: #fff;
  border: none; border-radius: var(--rs); padding: 14px;
  font-family: 'Outfit', sans-serif; font-size: 15px; font-weight: 600;
  cursor: pointer; margin-top: 10px; display: block;
}

.btn-emergency {
  width: 100%; background: var(--red); color: #fff;
  border: none; border-radius: var(--rs); padding: 16px;
  font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 700;
  cursor: pointer; display: block;
}

.btn-sm { width: auto !important; padding: 9px 18px !important; font-size: 14px !important; margin-top: 0 !important; display: inline-block !important; }
.btn-back {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); padding: 8px 14px; border-radius: 8px;
  cursor: pointer; font-size: 15px; font-family: 'Outfit', sans-serif;
}

.divider {
  text-align: center; color: var(--muted); font-size: 13px; margin: 8px 0;
  position: relative;
}
.divider::before, .divider::after {
  content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--border);
}
.divider::before { left: 0; } .divider::after { right: 0; }

/* ── MAIN SCREEN ── */
#screen-main { padding-bottom: 72px; }

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 640px;
  background: rgba(10,10,8,.96); border-top: 1px solid var(--border);
  display: flex; z-index: 100;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 10px 4px 8px; background: none; border: none;
  color: var(--muted); font-family: 'Outfit', sans-serif;
  font-size: 11px; font-weight: 500; cursor: pointer;
  position: relative; transition: color .2s;
}
.nav-item.active { color: var(--honey); }
.nav-icon { font-size: 22px; margin-bottom: 3px; display: block; }
.badge {
  position: absolute; top: 6px; right: 50%; transform: translateX(12px);
  background: var(--red); color: white; font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* ── TABS ── */
.tab-content { display: none; }
.tab-content.active { display: block; }

.tab-header {
  padding: 22px 20px 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.tab-header h2 { font-size: 22px; font-weight: 800; }
.tab-header-bee { font-size: 22px; }

/* ── SOS HERO ── */
.sos-hero {
  padding: 24px 20px;
  background: linear-gradient(180deg, #200a0a 0%, #0d0d0d 60%);
  border-bottom: 1px solid rgba(231,76,60,.25);
}
.sos-eyebrow {
  text-align: center;
  font-size: 11px; font-weight: 800;
  letter-spacing: .25em; text-transform: uppercase;
  color: var(--red); margin-bottom: 3px;
}
.sos-sub {
  text-align: center; font-size: 12px;
  color: var(--muted); font-style: italic; margin-bottom: 18px;
}
.sos-main-btn {
  width: 100%; background: var(--red);
  border: none; border-radius: var(--r);
  padding: 32px 20px; cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
  box-shadow: 0 6px 32px rgba(231,76,60,.5);
  transition: transform .1s;
}
.sos-main-btn:active { transform: scale(.97); }
.sos-main-icon { font-size: 52px; line-height: 1; }
.sos-main-text {
  font-family: 'Outfit', sans-serif;
  font-size: 32px; font-weight: 900; color: #fff;
  letter-spacing: .02em; text-align: center; line-height: 1.1;
}
.sos-main-hint {
  font-size: 13px; color: rgba(255,255,255,.7);
  text-align: center;
}

/* ── HOME STATS ── */
.home-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  background: var(--border); gap: 1px;
}
.stat-card {
  background: var(--surface); padding: 16px 8px;
  text-align: center; cursor: pointer;
}
.stat-card:active { background: var(--surface2); }
.stat-icon { font-size: 20px; display: block; margin-bottom: 4px; }
.stat-label { font-size: 10px; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 4px; }
.stat-num { font-size: 22px; font-weight: 800; color: var(--honey); }

/* ── SOS FORM HEADER ── */
.sos-form-header {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  background: rgba(231,76,60,.05);
}

/* ── SWAP SECTIONS ── */
.swap-section {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r); margin: 16px 20px 0; overflow: hidden;
}
.swap-section.give-section { border-color: rgba(255,140,0,.5); }
.swap-section.want-section { border-color: rgba(46,204,113,.4); }
.swap-section-header {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.give-section .swap-section-header { background: rgba(255,140,0,.08); }
.want-section .swap-section-header { background: rgba(46,204,113,.06); }
.swap-section-icon { font-size: 20px; flex-shrink: 0; }
.swap-section-title { font-size: 14px; font-weight: 700; }
.swap-section-desc { font-size: 11px; color: var(--muted); margin-top: 2px; }
.swap-section-body { padding: 16px 18px; }

/* ── SLOT / REASON GRIDS ── */
.slot-grid, .reason-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.slot-btn, .reason-btn {
  background: var(--dark); border: 1.5px solid var(--border);
  border-radius: 8px; padding: 11px 8px; color: var(--muted);
  font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 500;
  cursor: pointer; text-align: center; transition: all .15s; line-height: 1.3;
}
.slot-btn:hover { border-color: var(--honey); color: var(--honey); }
.slot-btn.active { border-color: var(--honey); background: rgba(255,140,0,.1); color: var(--honey); font-weight: 700; }
.slot-btn.active-want { border-color: var(--green); background: rgba(46,204,113,.1); color: var(--green); font-weight: 700; }
.reason-btn:hover { border-color: var(--red); color: var(--red); }
.reason-btn.active { border-color: var(--red); background: rgba(231,76,60,.1); color: var(--red); font-weight: 700; }

.submit-area { padding: 16px 20px 4px; }

/* ── ADVANCED ── */
.advanced-toggle {
  margin: 14px 20px 0; padding: 12px 16px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--rs); font-family: 'Outfit', sans-serif;
  font-size: 13px; color: var(--muted); cursor: pointer;
  display: flex; align-items: center; gap: 8px;
}
.advanced-toggle:hover { color: var(--honey); border-color: var(--honey); }
.extra-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; margin-top: 12px; }
.extra-form-header { padding: 12px 16px; background: var(--surface2); border-bottom: 1px solid var(--border); font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 700; color: var(--honey); }
.extra-form-body { padding: 16px; }

/* ── WISH CARDS ── */
.wishes-label { padding: 16px 20px 6px; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.wish-card { margin: 8px 20px 0; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--honey); border-radius: var(--r); padding: 14px 16px; }
.wish-badge { font-size: 11px; font-weight: 700; color: var(--honey); margin-bottom: 6px; letter-spacing: .06em; text-transform: uppercase; }
.wish-date { font-size: 18px; font-weight: 700; margin-bottom: 2px; }
.wish-slot { font-size: 13px; color: var(--muted); }
.wish-note { font-size: 12px; color: var(--muted); margin-top: 8px; font-style: italic; }
.wish-ask-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; background: rgba(255,140,0,.08); color: var(--honey); border: 1.5px solid rgba(255,140,0,.3); border-radius: 999px; padding: 7px 14px; font-family: 'Outfit', sans-serif; font-size: 12px; font-weight: 600; cursor: pointer; }

/* ── MATCH CARDS ── */
.match-card { margin: 10px 20px 0; background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r); padding: 16px; }
.match-card.pending { border-color: rgba(255,209,102,.4); }
.match-card.accepted { border-color: rgba(46,204,113,.4); }
.match-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.match-status { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.match-card.pending .match-status { color: #ffd166; }
.match-card.accepted .match-status { color: var(--green); }
.match-date { font-size: 13px; color: var(--muted); }
.match-partner { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.match-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── INVITE ── */
#screen-invite { align-items: center; justify-content: center; padding: 40px 24px; }
.invite-box { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 32px 24px; text-align: center; }
.invite-bee { font-size: 48px; display: block; margin-bottom: 12px; }
.invite-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.invite-sub { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.invite-code { font-size: 48px; font-weight: 900; letter-spacing: 8px; color: var(--honey); margin: 8px 0; display: block; }
.invite-url-box { background: var(--dark); border: 1px solid var(--border); border-radius: var(--rs); padding: 12px; font-size: 12px; color: var(--muted); word-break: break-all; margin: 12px 0 20px; text-align: left; }

/* ── CREATE GROUP ── */
#screen-create-group { padding: 0; }
.screen-header { display: flex; align-items: center; gap: 14px; padding: 20px; border-bottom: 1px solid var(--border); }
.screen-header h2 { font-size: 20px; font-weight: 800; }

/* ── CARD ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; margin: 0 20px 14px; }

/* ── MODAL ── */
.modal { position: fixed; inset: 0; display: flex; align-items: flex-end; z-index: 200; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.75); }
.modal-content { position: relative; background: var(--surface); border-radius: var(--r) var(--r) 0 0; border-top: 3px solid var(--honey); padding: 28px 24px; width: 100%; max-width: 640px; margin: 0 auto; }
.modal-content h3 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.modal-content p { color: var(--muted); font-size: 15px; line-height: 1.6; margin-bottom: 18px; }
.modal-shift-info { background: var(--dark); border: 1px solid var(--border); border-radius: var(--rs); padding: 12px 16px; margin-bottom: 18px; font-size: 14px; }

/* ── MEMBERS ── */
.member-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.member-item:last-child { border-bottom: none; }
.member-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--honey); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: #000; flex-shrink: 0; margin-right: 12px; }
.member-name { font-size: 15px; font-weight: 600; }
.member-job { font-size: 12px; color: var(--muted); margin-top: 1px; }
.btn-request { background: rgba(255,140,0,.1); color: var(--honey); border: 1.5px solid rgba(255,140,0,.4); border-radius: 999px; padding: 7px 16px; font-family: 'Outfit', sans-serif; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn-request:disabled { background: rgba(46,204,113,.1); border-color: var(--green); color: var(--green); cursor: default; }

/* ── UTILS ── */
.empty-msg { text-align: center; color: var(--muted); font-size: 15px; padding: 48px 24px; line-height: 1.7; }
.empty-icon { font-size: 36px; display: block; margin-bottom: 12px; }
.group-name { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.invite-code-small { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.lang-selector label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 7px; letter-spacing: .08em; text-transform: uppercase; }

/* ── HOME HEADER ── */
.home-header {
  padding: 40px 20px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(160deg, var(--surface), var(--dark));
}
.home-logo {
  font-size: 24px; font-weight: 800; color: var(--honey);
  margin-bottom: 6px; letter-spacing: -0.3px;
}
.home-tagline { font-size: 14px; color: var(--muted); }

/* ── SOS NAV BUTTON ── */
.nav-sos {
  color: var(--red) !important;
  position: relative;
}
.nav-sos .nav-icon {
  font-size: 26px !important;
  filter: drop-shadow(0 0 6px rgba(231,76,60,.6));
}
.nav-sos.active { color: var(--red) !important; }

/* ── NAV BIGGER (4 items) ── */
.nav-item { padding: 12px 4px 10px; font-size: 12px; }
.nav-icon { font-size: 26px !important; margin-bottom: 4px; }
.nav-sos { color: var(--red) !important; }
.nav-sos .nav-icon { filter: drop-shadow(0 0 8px rgba(231,76,60,.7)); }

/* ── SCHEDULE UPLOAD ── */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--r);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.upload-area:hover {
  border-color: var(--honey);
  background: rgba(255,140,0,.04);
}
.upload-icon { font-size: 32px; margin-bottom: 8px; }
.upload-text { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.upload-sub  { font-size: 12px; color: var(--muted); }

.shift-preview-card {
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: var(--rs);
  padding: 12px;
  margin-bottom: 8px;
}
.shift-preview-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.shift-preview-info { font-size: 12px; color: var(--muted); }

/* ── MY SHIFTS ── */
.shift-day-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-bottom: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--rs); transition: border-color .15s;
}
.shift-day-card.shift-off {
  opacity: .5;
}
.shift-day-left {
  text-align: center; min-width: 36px;
}
.shift-day-name {
  font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 2px;
}
.shift-day-num {
  font-size: 22px; font-weight: 800; color: var(--text); line-height: 1;
}
.shift-day-info {
  flex: 1;
}
.shift-swap-quick {
  background: rgba(255,140,0,.08); color: var(--honey);
  border: 1.5px solid rgba(255,140,0,.3); border-radius: 999px;
  padding: 6px 12px; font-family: 'Outfit', sans-serif;
  font-size: 11px; font-weight: 700; cursor: pointer;
  white-space: nowrap; transition: all .15s;
}
.shift-swap-quick:hover {
  background: rgba(255,140,0,.18); border-color: var(--honey);
}
