/* ══════════════════════════════════════════════
   禾彬不動產 · 行動打卡系統 · 全站樣式
   Mobile-first · Purple brand system
   ══════════════════════════════════════════════ */

:root {
  --brand:         #6B21A8;
  --brand-dark:    #4C1D95;
  --brand-mid:     #7C3AED;
  --brand-light:   #A78BFA;
  --brand-pale:    #EDE9FE;
  --brand-glow:    rgba(107,33,168,0.18);

  --bg:            #F5F3FF;
  --surface:       #FFFFFF;
  --surface-2:     #F9F7FE;
  --surface-3:     #F0EBFF;

  --text:          #1A0533;
  --text-2:        #3B1D6E;
  --muted:         #7C6FA0;
  --muted-light:   #B8A8D4;

  --success:       #059669;
  --success-bg:    #ECFDF5;
  --warning:       #D97706;
  --warning-bg:    #FFFBEB;
  --danger:        #DC2626;
  --danger-bg:     #FEF2F2;
  --info:          #0EA5E9;
  --info-bg:       #F0F9FF;

  --border:        #E4D9F7;
  --border-2:      #D4C5EC;
  --divider:       #EDE9FE;

  --radius-sm:     8px;
  --radius:        14px;
  --radius-lg:     20px;
  --radius-xl:     28px;

  --touch:         48px;
  --shadow-sm:     0 2px 8px rgba(76,29,149,0.08);
  --shadow:        0 4px 20px rgba(76,29,149,0.12);
  --shadow-lg:     0 12px 40px rgba(76,29,149,0.18);

  --header-h:      58px;
  --font-body:     'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --font-ui:       'Inter', 'Noto Sans TC', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; scroll-behavior: smooth; }
body {
  margin: 0; height: 100%;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

/* ── Header ── */
.site-header {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px;
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 60%, var(--brand-mid) 100%);
  color: #fff;
  position: sticky; top: 0; z-index: 60;
  box-shadow: 0 4px 24px rgba(76,29,149,0.35);
  transition: box-shadow 0.2s;
}
.site-header.scrolled { box-shadow: 0 6px 32px rgba(76,29,149,0.5); }
.header-center { flex: 1; display: flex; justify-content: center; }
.brand-logo {
  font-family: var(--font-body); font-weight: 900; font-size: 17px;
  letter-spacing: -0.01em; color: #fff;
}
.brand-accent { color: var(--brand-light); }

.icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255,255,255,0.12); border: none; color: inherit;
  transition: background 0.15s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.icon-btn:active { background: rgba(255,255,255,0.22); transform: scale(0.93); }

.header-actions { display: flex; align-items: center; gap: 6px; }
.notif-btn { position: relative; }
.notif-badge {
  position: absolute; top: 5px; right: 5px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #F43F5E; color: #fff;
  font-size: 9px; font-weight: 700; font-family: var(--font-ui);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--brand-dark);
}
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand-dark); font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,0.4);
  cursor: pointer;
}

/* ── Drawer ── */
.drawer {
  position: fixed; left: 0; top: 0; height: 100%; width: 82%; max-width: 320px;
  background: var(--surface);
  z-index: 80;
  transform: translateX(-110%);
  transition: transform 0.26s cubic-bezier(.22,.68,0,1.2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.drawer.show { transform: translateX(0); }
.drawer-mask {
  position: fixed; inset: 0;
  background: rgba(30,0,60,0.45);
  z-index: 70;
  opacity: 0; pointer-events: none;
  transition: opacity 0.26s;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.drawer-mask.show { opacity: 1; pointer-events: auto; }

.drawer-inner {
  display: flex; flex-direction: column; height: 100%;
  padding: 0;
  overflow-y: auto;
}
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 12px;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff;
}
.drawer-brand { }
.drawer-logo-mark { font-size: 20px; font-weight: 900; color: #fff; line-height: 1; }
.drawer-sub { font-size: 11px; color: rgba(255,255,255,0.7); margin-top: 2px; }
.drawer-header .icon-btn { background: rgba(255,255,255,0.15); }

.drawer-user-info {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: var(--brand-pale);
  border-bottom: 1px solid var(--border);
}
.drawer-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.drawer-username { font-weight: 700; font-size: 15px; color: var(--text); }
.drawer-role { font-size: 12px; color: var(--muted); margin-top: 1px; }

.drawer-nav {
  flex: 1; padding: 10px 8px;
  display: flex; flex-direction: column; gap: 2px;
}
.drawer-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 15px; font-weight: 500;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.drawer-link:active, .drawer-link:hover { background: var(--brand-pale); color: var(--brand); }
.drawer-link.active { background: var(--brand-pale); color: var(--brand); font-weight: 700; }
.drawer-link svg { opacity: 0.7; }
.drawer-link.active svg { opacity: 1; }

.drawer-footer {
  padding: 12px 16px 20px;
  border-top: 1px solid var(--border);
}
.drawer-logout-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 11px 14px;
  background: var(--danger-bg); color: var(--danger);
  border: 1px solid #FCA5A5; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  margin-bottom: 10px;
  transition: background 0.15s;
}
.drawer-logout-btn:active { background: #FEE2E2; }
.drawer-version { font-size: 11px; color: var(--muted-light); text-align: center; }

/* ── Main content ── */
.main-content { min-height: calc(100vh - var(--header-h)); }

/* ── Views ── */
.view { }
.hidden { display: none !important; }

/* ══ LOGIN VIEW ══ */
.login-view {
  min-height: calc(100vh - var(--header-h));
  display: flex; align-items: center; justify-content: center;
  padding: 20px 16px 40px;
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #F5F3FF 0%, #EDE9FE 50%, #DDD6FE 100%);
}
.login-bg-shapes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.shape {
  position: absolute; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(139,92,246,0.15), transparent 70%);
  animation: floatShape 8s ease-in-out infinite;
}
.shape-1 { width: 320px; height: 320px; top: -80px; right: -60px; animation-delay: 0s; }
.shape-2 { width: 220px; height: 220px; bottom: 60px; left: -50px; animation-delay: -3s; }
.shape-3 { width: 160px; height: 160px; top: 50%; left: 40%; animation-delay: -5s; }
@keyframes floatShape {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

.login-card {
  width: 100%; max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 28px 24px 24px;
  box-shadow: var(--shadow-lg);
  position: relative; z-index: 1;
  border: 1px solid rgba(167,139,250,0.2);
  animation: slideUp 0.4s cubic-bezier(.22,.68,0,1.1);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-logo-wrap {
  text-align: center;
  margin-bottom: 20px;
}
.login-logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 18px;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand-mid));
  color: #fff; font-size: 18px; font-weight: 900;
  box-shadow: 0 8px 24px rgba(107,33,168,0.35);
  margin-bottom: 10px;
}
.login-logo-sub { font-size: 13px; color: var(--muted); font-weight: 500; }

.login-title { font-size: 20px; font-weight: 900; color: var(--text); margin: 0 0 6px; text-align: center; }
.login-desc { font-size: 13px; color: var(--muted); margin: 0 0 20px; text-align: center; }

.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-icon {
  position: absolute; left: 12px; color: var(--muted-light); pointer-events: none; z-index: 1;
}
.form-input {
  width: 100%; padding: 12px 12px 12px 38px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px; color: var(--text);
  background: var(--surface);
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus {
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.pw-toggle {
  position: absolute; right: 10px;
  background: none; border: none; padding: 6px;
  color: var(--muted-light); border-radius: 6px;
}
.form-hint { font-size: 11px; color: var(--muted-light); margin-top: 4px; }
.form-error {
  background: var(--danger-bg); border: 1px solid #FCA5A5;
  color: var(--danger); border-radius: var(--radius-sm);
  padding: 9px 12px; font-size: 13px; font-weight: 500;
  margin-bottom: 12px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 20px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface); color: var(--muted);
  font-size: 14px; font-weight: 600;
  min-height: var(--touch);
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  cursor: pointer;
  text-align: center;
}
.btn:active { transform: scale(0.96); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-mid) 100%);
  color: #fff; border: none;
  box-shadow: 0 4px 18px rgba(107,33,168,0.4);
}
.btn-primary:active { box-shadow: 0 2px 10px rgba(107,33,168,0.3); }
.btn-login { width: 100%; font-size: 16px; min-height: 52px; border-radius: 12px; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 9px 14px; min-height: 38px; font-size: 13px; }
.btn-danger { color: var(--danger); border-color: #FCA5A5; }
.btn-danger:active { background: var(--danger-bg); }
.btn-spinner .spin { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-hint-box {
  margin-top: 16px; padding: 10px 12px;
  background: var(--surface-3); border: 1px dashed var(--border-2);
  border-radius: var(--radius-sm); font-size: 12px; color: var(--muted);
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.hint-label {
  background: var(--brand-pale); color: var(--brand);
  border-radius: 4px; padding: 2px 6px; font-size: 10px; font-weight: 700; text-transform: uppercase;
  flex-shrink: 0;
}

/* ══ DASHBOARD VIEW ══ */
#dashboardView { padding: 0 0 80px; }

.welcome-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 60%, var(--brand-mid) 100%);
  color: #fff;
  margin-bottom: 0;
}
.welcome-greeting { font-size: 13px; color: rgba(255,255,255,0.75); font-weight: 400; }
.welcome-name { font-size: 18px; font-weight: 900; margin-top: 1px; }
.welcome-date {
  text-align: right; font-size: 11px; color: rgba(255,255,255,0.7);
  line-height: 1.6;
}

.section-label {
  display: flex; align-items: center;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  color: var(--muted); letter-spacing: 0.08em;
  padding: 14px 16px 6px;
}
.section-label-flex { justify-content: space-between; }
.section-count {
  background: var(--brand-pale); color: var(--brand);
  border-radius: 20px; padding: 1px 8px; font-size: 11px; font-weight: 700;
  margin-left: 6px;
}

/* Top Stats */
.top-stats-wrap { padding: 0 16px 4px; overflow: hidden; }
.top-stats {
  display: flex; gap: 10px;
  overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.top-stats::-webkit-scrollbar { display: none; }
.stat {
  min-width: 130px; flex-shrink: 0;
  background: var(--surface); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.stat::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  border-radius: var(--radius) var(--radius) 0 0;
}
.stat .num { font-size: 22px; font-weight: 900; color: var(--brand); line-height: 1; font-family: var(--font-ui); }
.stat .label { font-size: 11px; color: var(--muted); margin-top: 4px; font-weight: 500; }

/* Clocking panel */
.clocking-panel {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; padding: 0 16px; margin-bottom: 4px;
}
.clocking-panel .btn {
  flex-direction: column; gap: 4px;
  padding: 14px 8px; min-height: 60px;
  border-radius: var(--radius); font-size: 14px; font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
}
.clocking-panel .btn:active {
  transform: scale(0.92); filter: brightness(0.9);
}
.clocking-panel .btn .btn-icon { font-size: 18px; line-height: 1; }
.btn-work   { background: linear-gradient(135deg,#5B21B6,#7C3AED); color:#fff; border:none; box-shadow: 0 4px 14px rgba(91,33,182,0.4); }
.btn-off    { background: linear-gradient(135deg,#3B0764,#5B21B6); color:#fff; border:none; box-shadow: 0 4px 14px rgba(59,7,100,0.35); }
.btn-trip   { background: linear-gradient(135deg,#0369A1,#0EA5E9); color:#fff; border:none; box-shadow: 0 4px 14px rgba(3,105,161,0.35); }
.btn-leave-personal { background: linear-gradient(135deg,#7E22CE,#A855F7); color:#fff; border:none; box-shadow: 0 4px 14px rgba(126,34,206,0.35); }
.btn-leave-sick     { background: linear-gradient(135deg,#9D174D,#EC4899); color:#fff; border:none; box-shadow: 0 4px 14px rgba(157,23,77,0.35); }
.btn-leave-special  { background: linear-gradient(135deg,#059669,#34D399); color:#fff; border:none; box-shadow: 0 4px 14px rgba(5,150,105,0.35); }
.btn-dev   { background: linear-gradient(135deg,#92400E,#F59E0B); color:#fff; border:none; box-shadow: 0 4px 14px rgba(146,64,14,0.35); }
.btn-deal  { background: linear-gradient(135deg,#DC2626,#F87171); color:#fff; border:none; box-shadow: 0 4px 14px rgba(220,38,38,0.35); }
.btn-custom { background: var(--surface); border: 2px dashed var(--brand-light); color: var(--brand); box-shadow: none; }

/* Quick actions row */
.quick-actions-row {
  display: flex; gap: 8px; padding: 4px 16px 0;
}
.quick-action-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 8px 14px; border-radius: 20px;
  background: var(--surface); border: 1.5px solid var(--border-2);
  color: var(--muted); font-size: 12px; font-weight: 600;
  min-height: 36px; cursor: pointer;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.quick-action-btn:active { background: var(--brand-pale); color: var(--brand); }

/* Announcements */
#announcements { padding: 0 16px; }
.ann-item {
  background: var(--surface); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.ann-item:active { box-shadow: var(--shadow); }
.ann-pinned-badge {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--brand-pale); color: var(--brand);
  font-size: 10px; font-weight: 700; padding: 2px 7px;
  border-radius: 4px; margin-bottom: 5px;
}
.ann-title { font-weight: 700; font-size: 14px; color: var(--text); margin-bottom: 4px; }
.ann-body { font-size: 13px; color: var(--muted); line-height: 1.5; }
.ann-meta { font-size: 11px; color: var(--muted-light); margin-top: 6px; }

/* Filter chips */
.att-filter-row { display: flex; gap: 6px; }
.filter-chip {
  padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
  border: 1.5px solid var(--border-2); background: var(--surface); color: var(--muted);
  cursor: pointer; min-height: 30px;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.filter-chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Attendance list */
#attendanceList { padding: 0 16px; }
.att-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 8px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  animation: fadeInCard 0.3s ease;
}
@keyframes fadeInCard {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.att-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.att-type-badge {
  display: inline-flex; align-items: center;
  font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 6px;
  flex-shrink: 0;
}
.att-type-work    { background: #EDE9FE; color: #5B21B6; }
.att-type-off     { background: #F3E8FF; color: #4C1D95; }
.att-type-trip    { background: #E0F2FE; color: #0369A1; }
.att-type-personal{ background: #F3E8FF; color: #7E22CE; }
.att-type-sick    { background: #FCE7F3; color: #9D174D; }
.att-type-special { background: #ECFDF5; color: #059669; }
.att-type-dev     { background: #FEF3C7; color: #92400E; }
.att-type-deal    { background: #FEF2F2; color: #DC2626; }
.att-type-custom  { background: var(--surface-3); color: var(--brand); }
.att-time { font-size: 12px; color: var(--muted-light); white-space: nowrap; margin-top: 2px; }
.att-body { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.att-name { font-size: 13px; font-weight: 600; color: var(--text); }
.att-no   { font-size: 11px; color: var(--muted-light); background: var(--surface-3); padding: 1px 6px; border-radius: 4px; }
.att-meta { display: flex; align-items: center; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.att-status-badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px;
}
.status-approved { background: var(--success-bg); color: var(--success); }
.status-pending  { background: var(--warning-bg); color: var(--warning); }
.status-rejected { background: var(--danger-bg); color: var(--danger); }
.att-note { font-size: 11px; color: var(--muted); }

/* Actions row */
.actions-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 4px 16px 0;
  margin-top: 4px;
}

/* Admin panel */
.admin-panel { padding: 0 16px; }
.admin-section-label {
  display: flex; align-items: center; gap: 6px;
  color: var(--brand) !important;
}
.admin-cards { display: flex; flex-direction: column; gap: 12px; }
.admin-card {
  background: var(--surface); border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.admin-card-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.admin-pending-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--divider);
  font-size: 13px;
}
.admin-pending-item:last-child { border-bottom: none; }
.admin-approve-btn {
  padding: 4px 10px; font-size: 11px; font-weight: 700;
  background: var(--success-bg); color: var(--success);
  border: 1px solid #A7F3D0; border-radius: 6px; cursor: pointer;
}
.admin-emp-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0; border-bottom: 1px solid var(--divider); font-size: 13px;
}
.admin-emp-item:last-child { border-bottom: none; }
.admin-emp-no { font-size: 11px; color: var(--muted); background: var(--surface-3); padding: 1px 6px; border-radius: 4px; }
.admin-emp-role { margin-left: auto; font-size: 11px; color: var(--muted-light); }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(30,0,60,0.5);
  display: flex; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: fadeIn 0.18s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  width: 100%; max-width: 520px;
  background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 20px 20px 32px;
  box-shadow: var(--shadow-lg);
  animation: slideUpModal 0.28s cubic-bezier(.22,.68,0,1.1);
  max-height: 85vh; overflow-y: auto;
}
@keyframes slideUpModal {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.modal-title { font-size: 17px; font-weight: 800; color: var(--text); margin: 0; }
.modal-header .icon-btn {
  background: var(--surface-3); color: var(--muted); width: 36px; height: 36px;
}
.modal-body label {
  display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; margin-top: 12px;
}
.modal-body input, .modal-body select, .modal-body textarea {
  width: 100%; padding: 11px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text); background: var(--surface);
  outline: none; font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none; appearance: none;
}
.modal-body input:focus, .modal-body select:focus, .modal-body textarea:focus {
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.modal-body textarea { min-height: 80px; resize: vertical; }
.modal-submit-btn {
  width: 100%; margin-top: 20px; font-size: 15px; min-height: 50px; border-radius: 12px;
}

/* Toast */
.toast-container { position: fixed; right: 14px; top: 70px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #1A0533; color: #fff;
  padding: 11px 16px; border-radius: 12px;
  font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 30px rgba(26,5,51,0.4);
  opacity: 0; transform: translateX(20px);
  transition: all 0.25s cubic-bezier(.22,.68,0,1.2);
  display: flex; align-items: center; gap: 8px;
  max-width: 280px; min-width: 180px;
  border-left: 3px solid var(--brand-light);
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast-success { border-left-color: #34D399; }
.toast-error   { border-left-color: #F87171; }
.toast-info    { border-left-color: var(--brand-light); }

/* Footer */
.site-footer {
  background: linear-gradient(135deg, var(--brand-dark), #1A0533);
  color: rgba(255,255,255,0.7);
  padding: 20px 16px;
  margin-top: 20px;
}
.footer-inner { text-align: center; }
.footer-brand { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.footer-info  { font-size: 12px; margin-bottom: 4px; }
.footer-copy  { font-size: 11px; color: rgba(255,255,255,0.4); }

/* ── No data empty state ── */
.empty-state {
  text-align: center; padding: 28px 16px;
  color: var(--muted); font-size: 14px;
}
.empty-icon { font-size: 36px; margin-bottom: 8px; opacity: 0.5; }

/* ── Responsive: tablet/desktop ── */
@media (min-width: 640px) {
  .login-view { padding: 40px 24px; }
  .login-card { padding: 36px 32px 28px; }
  .clocking-panel { grid-template-columns: repeat(4, 1fr); gap: 12px; }
}

@media (min-width: 900px) {
  .main-content { max-width: 1100px; margin: 0 auto; }
  #dashboardView { padding: 0 0 60px; }
  .clocking-panel { grid-template-columns: repeat(5, 1fr); }
  .admin-cards { flex-direction: row; }
  .admin-card { flex: 1; }
}

/* ── Safe areas (notch etc.) ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .site-footer { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}
