/* ═══════════════════════════════════════════════
   OCEAN PRODUCTION — COMPONENTS
   All reusable UI elements
═══════════════════════════════════════════════ */

/* ── STAT CARDS ───────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.stat-card {
  background: var(--card); border-radius: var(--r-lg);
  padding: 20px; border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.stat-lbl { font-size: 12px; color: var(--soft); margin-bottom: 6px; font-weight: 600; }
.stat-val { font-family: 'Cairo'; font-size: 30px; font-weight: 900; line-height: 1; }
.stat-sub { font-size: 12px; margin-top: 6px; color: var(--soft); }

.stat-card.blue   .stat-val { color: var(--blue); }
.stat-card.green  .stat-val { color: var(--green); }
.stat-card.red    .stat-val { color: var(--red); }
.stat-card.orange .stat-val { color: var(--orange); }

/* ── SECTION CARD ─────────────────────── */
.card {
  background: var(--card); border-radius: var(--r-lg);
  border: 1px solid var(--line); overflow: hidden;
  margin-bottom: 20px; box-shadow: var(--shadow);
}
.card-head {
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-family: 'Cairo'; font-weight: 800; font-size: 15px; }

/* ── LIST ITEMS ───────────────────────── */
.list-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
  transition: background var(--t); cursor: pointer;
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: #F8FAFC; }

.li-av {
  width: 44px; height: 44px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.li-info  { flex: 1; min-width: 0; }
.li-name  { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-sub   { font-size: 12px; color: var(--soft); margin-top: 2px; }
.li-end   { text-align: left; flex-shrink: 0; }
.li-amount { font-family: 'Cairo'; font-weight: 800; font-size: 15px; }

/* ── BADGES ───────────────────────────── */
.badge {
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: var(--r-sm);
  display: inline-block; cursor: default; white-space: nowrap;
}
.badge.green  { background: var(--green-light);  color: var(--green); }
.badge.red    { background: var(--red-light);    color: var(--red); }
.badge.orange { background: var(--orange-light); color: var(--orange); }
.badge.blue   { background: var(--blue-light);   color: var(--blue); }

/* ── BUTTONS ──────────────────────────── */
.btn {
  padding: 10px 20px; border-radius: var(--r-sm);
  border: none; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all var(--t);
  display: inline-flex; align-items: center; gap: 6px;
}
.btn:active { transform: scale(.97); }

.btn-blue    { background: var(--blue);  color: #FFF; }
.btn-blue:hover { background: var(--blue-dark); }
.btn-green   { background: var(--green); color: #FFF; }
.btn-green:hover { filter: brightness(.9); }
.btn-red     { background: var(--red);   color: #FFF; }
.btn-outline { background: transparent; color: var(--soft); border: 1.5px solid var(--line); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-sm   { padding: 7px 14px; font-size: 12px; border-radius: var(--r-sm); }
.btn-ghost {
  background: transparent; border: none; cursor: pointer;
  font-size: 16px; opacity: .6; padding: 6px; border-radius: var(--r-sm);
}
.btn-ghost:hover { opacity: 1; background: #F1F5F9; }

/* ── TASK CARDS ───────────────────────── */
.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.task-card {
  background: var(--card); border-radius: 14px;
  border: 1.5px solid var(--line); padding: 18px;
  transition: all .2s; box-shadow: var(--shadow);
}
.task-card:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.task-card.done  { opacity: .75; }

.task-top    { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.task-typebadge { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: var(--r-sm); }
.task-time-lbl  { font-size: 11px; color: var(--mute); }
.task-title  { font-weight: 800; font-size: 15px; margin-bottom: 3px; }
.task-client { font-size: 13px; color: var(--soft); }
.task-notes  { font-size: 12px; color: var(--soft); margin-top: 6px; font-style: italic; }

.task-bottom {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
}
.task-emp { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--soft); }
.ta-dot {
  width: 26px; height: 26px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
}
.task-actions { display: flex; gap: 6px; align-items: center; }

.task-status-btn {
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: var(--r-sm);
  cursor: pointer; border: none; transition: all var(--t);
}
.task-status-btn.pending  { background: var(--orange-light); color: var(--orange); }
.task-status-btn.progress { background: var(--blue-light);   color: var(--blue); }
.task-status-btn.done     { background: var(--green-light);  color: var(--green); }

/* ── RESTAURANT CARDS ─────────────────── */
.restaurants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.restaurant-card {
  background: var(--card); border-radius: var(--r-lg);
  border: 1.5px solid var(--line); overflow: hidden;
  cursor: pointer; transition: all .2s; box-shadow: var(--shadow);
}
.restaurant-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.rc-header { padding: 18px; display: flex; align-items: center; justify-content: space-between; }
.rc-emoji  {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.rc-body     { padding: 0 18px 18px; }
.rc-name     { font-family: 'Cairo'; font-weight: 900; font-size: 17px; margin-bottom: 4px; }
.rc-service  { font-size: 13px; color: var(--soft); margin-bottom: 12px; min-height: 20px; }
.rc-footer   { display: flex; align-items: center; justify-content: space-between; }
.rc-fee      { font-family: 'Cairo'; font-weight: 800; font-size: 15px; color: var(--text); }
.rc-fee small { font-size: 11px; color: var(--mute); }
.rc-tasks    { font-size: 12px; color: var(--soft); background: var(--bg); padding: 4px 10px; border-radius: var(--r-sm); }

/* ── RESTAURANT SHEET ─────────────────── */
.sheet-header {
  border-radius: var(--r-lg); padding: 20px 24px; margin-bottom: 20px;
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.sheet-left    { display: flex; gap: 16px; align-items: flex-start; }
.sheet-emoji   {
  width: 56px; height: 56px; border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0;
}
.sheet-name    { font-family: 'Cairo'; font-size: 22px; font-weight: 900; margin-bottom: 4px; }
.sheet-service { font-size: 14px; color: var(--soft); margin-bottom: 4px; }
.sheet-meta    { font-size: 13px; color: var(--soft); }
.sheet-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── DATE PILLS (Calendar & Filters) ──── */
.date-pills {
  display: flex; gap: 8px; margin-bottom: 20px;
  overflow-x: auto; padding-bottom: 4px;
}
.date-pills::-webkit-scrollbar { display: none; }
.dpill {
  flex-shrink: 0; padding: 8px 18px; border-radius: var(--r-sm);
  border: 1.5px solid var(--line); background: var(--card);
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all var(--t); color: var(--soft);
}
.dpill.active { background: var(--blue); color: #FFF; border-color: var(--blue); }

/* ── FORMS ────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  font-size: 13px; font-weight: 700; color: var(--soft);
  margin-bottom: 6px; display: block;
}
.form-input {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  font-size: 14px; color: var(--text);
  background: var(--bg); outline: none; transition: border var(--t);
}
.form-input:focus { border-color: var(--blue); background: #FFF; }
select.form-input { appearance: none; cursor: pointer; }
textarea.form-input { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.form-actions {
  display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px;
}
.form-divider { height: 1px; background: var(--line); margin: 16px 0; }

/* ── MODAL ────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(10,15,30,.65); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 100;
}
.modal-bg.open { opacity: 1; pointer-events: auto; }

.modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -52%) scale(.92);
  width: min(500px, 95vw); max-height: 90vh; overflow-y: auto;
  background: var(--card); border-radius: var(--r-xl);
  opacity: 0; pointer-events: none;
  transition: all var(--t-spring); z-index: 101;
}
.modal.open {
  opacity: 1; pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.modal-head {
  padding: 20px 24px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--card);
  z-index: 2; border-radius: var(--r-xl) var(--r-xl) 0 0;
}
.modal-title { font-family: 'Cairo'; font-weight: 800; font-size: 18px; }
.modal-x {
  width: 32px; height: 32px; border-radius: var(--r-sm); border: none;
  background: var(--bg); cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  color: var(--soft); transition: all var(--t);
}
.modal-x:hover { background: var(--red-light); color: var(--red); }
.modal-body { padding: 24px; }

/* ── EMPTY STATE ──────────────────────── */
.empty { text-align: center; padding: 52px 20px; color: var(--mute); }
.empty-icon { font-size: 52px; margin-bottom: 14px; }
.empty-text { font-size: 15px; font-weight: 600; }
.empty-hint { font-size: 13px; margin-top: 6px; }

/* ── TOAST NOTIFICATION ───────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--nav); color: #FFF;
  padding: 12px 24px; border-radius: var(--r-md);
  font-size: 14px; font-weight: 700;
  z-index: 999; opacity: 0; pointer-events: none;
  transition: all .3s var(--t-spring);
  max-width: 90vw; text-align: center;
}
.toast.show    { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error   { background: var(--red); }
.toast.success { background: var(--green); }

/* ── EMPLOYEE TASK STATS ──────────────── */
.emp-stats { display: flex; gap: 10px; margin-bottom: 20px; }
.emp-stat {
  flex: 1; background: var(--card); border-radius: var(--r-md);
  padding: 14px 10px; text-align: center; border: 1px solid var(--line);
}
.es-num { font-family: 'Cairo'; font-size: 24px; font-weight: 900; }
.es-lbl { font-size: 11px; color: var(--soft); font-weight: 600; margin-top: 2px; }
.emp-stat.orange .es-num { color: var(--orange); }
.emp-stat.blue   .es-num { color: var(--blue); }
.emp-stat.green  .es-num { color: var(--green); }

/* ── EMPLOYEE TASK CARDS ──────────────── */
.emp-task-card {
  background: var(--card); border-radius: 14px;
  border: 1.5px solid var(--line); padding: 18px;
  margin-bottom: 14px; box-shadow: var(--shadow);
}
.emp-task-card.done { opacity: .7; }

.etc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.etc-type   { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: var(--r-sm); }
.etc-title  { font-family: 'Cairo'; font-size: 17px; font-weight: 900; margin-bottom: 6px; }
.etc-restaurant { font-size: 13px; color: var(--soft); margin-bottom: 6px; }
.etc-meta   { display: flex; gap: 14px; font-size: 12px; color: var(--mute); margin-bottom: 10px; }
.etc-notes  {
  font-size: 13px; color: var(--soft); background: var(--bg);
  border-radius: var(--r-sm); padding: 10px 12px;
  margin-bottom: 12px; line-height: 1.7;
}
.etc-btn {
  width: 100%; padding: 12px; border-radius: 11px; border: none;
  font-size: 15px; font-weight: 800; cursor: pointer; transition: all .2s;
}
.etc-btn:active { transform: scale(.97); }
.etc-btn.pending  { background: var(--blue);  color: #FFF; }
.etc-btn.progress { background: var(--green); color: #FFF; }
.etc-btn.done { background: var(--bg); color: var(--soft); border: 1.5px solid var(--line); }
