/* ============================================================
   css/components.css — All UI components (LIGHT THEME)
   ============================================================ */

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; font-size: 13px; border-radius: var(--r);
  cursor: pointer; border: 1px solid var(--border2);
  background: var(--bg2); color: var(--text2);
  font-family: 'DM Sans', sans-serif; transition: all .15s;
  white-space: nowrap; box-shadow: var(--shadow-sm);
}
.btn:hover   { background: var(--bg3); color: var(--text); border-color: var(--border2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; box-shadow: 0 2px 8px rgba(22,163,74,.25); }
.btn-primary:hover { background: var(--accent2); border-color: var(--accent2); color: #fff; }

.btn-full  { width: 100%; justify-content: center; padding: 10px 16px; font-size: 14px; }
.btn-sm    { padding: 5px 10px; font-size: 12px; box-shadow: none; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--bg3); }
.btn-danger { color: var(--red); border-color: #fca5a5; background: var(--bg2); box-shadow: none; }
.btn-danger:hover { background: var(--red-light); }

/* ── Forms ── */
.form-group  { margin-bottom: 1.1rem; }
.form-label  { font-size: 12px; color: var(--text2); font-weight: 500; margin-bottom: 5px; display: block; }
.form-input  {
  width: 100%; background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 9px 12px;
  color: var(--text); font-size: 13px; font-family: 'DM Sans', sans-serif;
  outline: none; transition: border-color .15s, box-shadow .15s;
  box-shadow: var(--shadow-sm);
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(22,163,74,.1); }
.form-input::placeholder { color: var(--text3); }
.form-input:disabled { opacity: .5; cursor: not-allowed; background: var(--bg3); }
select.form-input option { background: #fff; }
textarea.form-input { resize: vertical; min-height: 75px; }
.form-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; padding: 3px 8px; border-radius: 100px; font-weight: 500;
}
.badge-green  { background: var(--accent-light); color: #15803d; }
.badge-amber  { background: var(--amber-light);  color: #92400e; }
.badge-blue   { background: var(--blue-light);   color: #1d4ed8; }
.badge-red    { background: var(--red-light);    color: #b91c1c; }
.badge-gray   { background: var(--bg4);          color: var(--text2); }
.badge-purple { background: var(--purple-light); color: #6d28d9; }

/* ── Cards ── */
.card    { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--rl); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.card-sm { padding: 1rem 1.25rem; }

/* ── Metric cards ── */
.metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 1.5rem; }
.metric  {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--rl); padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.metric-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; }
.metric-value { font-size: 28px; font-family: 'DM Serif Display', serif; color: var(--text); line-height: 1; }
.metric-sub   { font-size: 12px; margin-top: .4rem; }

/* ── Tables ── */
.table-wrap { border: 1px solid var(--border); border-radius: var(--rl); overflow: hidden; box-shadow: var(--shadow-sm); }
table  { width: 100%; border-collapse: collapse; }
thead  { background: var(--bg3); }
th {
  padding: 10px 16px; text-align: left; font-size: 11px;
  font-weight: 600; color: var(--text2); text-transform: uppercase;
  letter-spacing: .06em; border-bottom: 1px solid var(--border);
}
td {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  color: var(--text2); font-size: 13px; vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr { cursor: pointer; transition: background .1s; }
tbody tr:hover td { background: var(--bg3); }
td strong  { color: var(--text); font-weight: 500; }
td .cell-sub { font-size: 11px; color: var(--text3); margin-top: 2px; }

/* ── Tabs ── */
.tabs {
  display: flex; gap: 2px; background: var(--bg3);
  border-radius: var(--r); padding: 3px; margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}
.tab {
  padding: 7px 14px; border-radius: 8px; font-size: 13px;
  cursor: pointer; color: var(--text2); transition: all .15s;
  border: none; background: none; font-family: 'DM Sans', sans-serif;
}
.tab.active { background: var(--bg2); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 500; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.35);
  display: flex; align-items: flex-start; justify-content: center;
  z-index: 200; padding: 3rem 1rem;
  backdrop-filter: blur(4px);
}
.modal-box {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--rl); width: 540px; max-height: 85vh;
  overflow-y: auto; box-shadow: var(--shadow-lg);
}
.modal-header {
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--bg2); z-index: 1;
}
.modal-title { font-family: 'DM Serif Display', serif; font-size: 18px; color: var(--text); }
.modal-body  { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* ── Search ── */
.search-bar { position: relative; }
.search-bar i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text3); font-size: 14px; pointer-events: none; }
.search-bar input { padding-left: 32px; }

/* ── Calendar ── */
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.cal-month-label { font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--text); min-width: 180px; }
.cal-nav { display: flex; align-items: center; gap: 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 5px; }
.cal-day-label { text-align: center; font-size: 11px; color: var(--text3); padding: 4px 0; font-weight: 600; text-transform: uppercase; }
.cal-cell {
  min-height: 84px; background: var(--bg2);
  border: 1px solid var(--border); border-radius: var(--r);
  padding: 7px; cursor: pointer; transition: border-color .15s;
  box-shadow: var(--shadow-sm);
}
.cal-cell:hover  { border-color: var(--accent); }
.cal-cell.today  { border-color: var(--accent); border-width: 2px; }
.cal-cell.dim    { opacity: .35; pointer-events: none; box-shadow: none; background: var(--bg3); }
.cal-date { font-size: 12px; color: var(--text3); margin-bottom: 4px; font-weight: 500; }
.cal-cell.today .cal-date { color: var(--accent); font-weight: 700; }
.cal-event-chip {
  font-size: 10px; padding: 2px 5px; border-radius: 4px;
  margin-bottom: 2px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; font-weight: 500;
}
.cal-more { font-size: 10px; color: var(--text3); margin-top: 2px; }

/* ── Staff grid ── */
.staff-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.staff-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--rl); padding: 1.25rem; text-align: center;
  transition: all .15s; box-shadow: var(--shadow-sm);
}
.staff-card:hover { border-color: var(--border2); box-shadow: var(--shadow); transform: translateY(-1px); }
.staff-avatar {
  width: 50px; height: 50px; border-radius: 50%;
  margin: 0 auto 10px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600; font-family: 'DM Serif Display', serif;
}
.staff-name   { font-family: 'DM Serif Display', serif; font-size: 15px; color: var(--text); margin-bottom: 2px; }
.staff-role   { font-size: 12px; color: var(--text2); margin-bottom: 4px; }
.staff-events { font-size: 12px; color: var(--accent); margin-bottom: 8px; font-weight: 500; }
.staff-phone  { font-size: 11px; color: var(--text3); margin-bottom: 2px; }
.avail-bar    { display: flex; gap: 3px; justify-content: center; margin-top: 8px; }
.avail-pip    { width: 10px; height: 10px; border-radius: 50%; }
.avail-label  { font-size: 10px; color: var(--text3); margin-top: 4px; margin-bottom: 10px; }

/* ── Packages ── */
.pkg-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-bottom: 1.5rem; }
.pkg-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--rl); padding: 1.25rem;
  transition: all .15s; box-shadow: var(--shadow-sm);
}
.pkg-card:hover  { border-color: var(--border2); box-shadow: var(--shadow); }
.pkg-card.featured { border-color: var(--accent); border-width: 2px; box-shadow: 0 4px 16px rgba(22,163,74,.12); }
.pkg-name  { font-family: 'DM Serif Display', serif; font-size: 16px; color: var(--text); margin-bottom: .25rem; }
.pkg-price { font-size: 24px; font-weight: 700; color: var(--accent); margin: .5rem 0; }
.pkg-price span { font-size: 13px; color: var(--text3); font-weight: 400; }
.pkg-features { list-style: none; margin-top: .75rem; }
.pkg-features li { font-size: 12px; color: var(--text2); padding: 3px 0; display: flex; align-items: center; gap: 6px; }
.pkg-features li::before { content: '✓'; color: var(--accent); font-weight: 700; font-size: 11px; }
.pkg-stats {
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; font-size: 12px;
}
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.menu-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 0; border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--text2);
}

/* ── Invoices ── */
.invoice-paper {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--rl); padding: 2rem; max-width: 660px;
  box-shadow: var(--shadow);
}
.invoice-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border);
}
.invoice-logo { font-family: 'DM Serif Display', serif; font-size: 22px; color: var(--text); }
.invoice-logo span { color: var(--accent); }
.invoice-number { font-size: 22px; font-family: 'DM Serif Display', serif; color: var(--accent); text-align: right; }
.invoice-label  { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.invoice-table  { width: 100%; border-collapse: collapse; }
.invoice-table th {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text3); padding: 8px 0; border-bottom: 1px solid var(--border);
  text-align: left; font-weight: 600;
}
.invoice-table td { padding: 10px 0; color: var(--text2); font-size: 13px; border-bottom: 1px solid var(--border); }
.invoice-table td:last-child { text-align: right; color: var(--text); }
.invoice-total-block { display: flex; justify-content: flex-end; margin-top: 1.5rem; }
.invoice-total-val { font-size: 28px; font-family: 'DM Serif Display', serif; color: var(--accent); }

/* ── Notifications ── */
.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif-item {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1rem 1.25rem;
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px;
  align-items: start; cursor: pointer; transition: all .15s;
  box-shadow: var(--shadow-sm);
}
.notif-item:hover    { border-color: var(--border2); box-shadow: var(--shadow); }
.notif-item.unread   { border-left: 3px solid var(--accent); background: #f0fdf4; }
.notif-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.notif-body  { font-size: 12px; color: var(--text2); line-height: 1.5; }
.notif-time  { font-size: 11px; color: var(--text3); white-space: nowrap; }
.notif-dot   { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; display: inline-block; margin-left: 6px; vertical-align: middle; }

/* ── Profile ── */
.profile-grid { display: grid; grid-template-columns: 280px 1fr; gap: 1.5rem; }
.profile-avatar-big {
  width: 80px; height: 80px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-family: 'DM Serif Display', serif;
  margin: 0 auto 1rem;
}

/* ── Event strip (dashboard) ── */
.event-strip {
  display: grid; grid-template-columns: 4px 1fr auto;
  gap: 14px; align-items: center; padding: 1rem 1.25rem; cursor: pointer;
}
.event-stripe { width: 4px; height: 38px; border-radius: 2px; }
.event-name   { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.event-meta   { font-size: 12px; color: var(--text2); }
