/* =============================================
   Admin Panel Stylesheet
   ============================================= */
:root {
  --navy:       #08122a;
  --navy-mid:   #0f1f42;
  --gold:       #c9a84c;
  --silver:     #a8b8d0;
  --white:      #ffffff;
  --bg:         #f0f4fc;
  --bg-card:    #ffffff;
  --text:       #1a2744;
  --text-mid:   #4a5e80;
  --border:     #d8e0f0;
  --green:      #27ae60;
  --red:        #e74c3c;
  --radius:     10px;
  --shadow:     0 2px 16px rgba(8,18,42,.1);
  --transition: .25s ease;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Heebo', sans-serif;
  direction: rtl;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
.hidden { display: none !important; }

/* ======= Login ======= */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #060d1c 0%, #0f1f42 100%);
}
.login-card {
  background: var(--white);
  border-radius: 16px;
  padding: 48px 40px;
  width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo span {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}
.login-logo small { color: var(--text-mid); font-size: .85rem; }
.pw-wrap { position: relative; display: flex; }
.pw-wrap input { flex: 1; border-radius: var(--radius) !important; padding-left: 44px !important; }
.pw-wrap #togglePw {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-mid);
  font-size: 1rem;
}
.back-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  color: var(--text-mid);
  font-size: .88rem;
  transition: var(--transition);
}
.back-link:hover { color: var(--navy); }
.error-msg { color: var(--red); font-size: .85rem; margin-bottom: 10px; padding: 8px 12px; background: #fdf0f0; border-radius: 6px; }

/* ======= Layout ======= */
.admin-panel {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 240px;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}
.sidebar.collapsed { transform: translateX(240px); }
.sidebar-logo {
  padding: 28px 20px 24px;
  border-bottom: 1px solid rgba(168,184,208,.1);
}
.sidebar-logo span { display: block; font-size: 1rem; font-weight: 700; color: var(--white); }
.sidebar-logo small { font-size: .72rem; color: var(--gold); letter-spacing: 1px; }
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.sn-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 8px;
  color: var(--silver);
  font-size: .9rem;
  font-weight: 500;
  transition: var(--transition);
  text-align: right;
  width: 100%;
  position: relative;
}
.sn-item:hover { background: rgba(168,184,208,.08); color: var(--white); }
.sn-item.active { background: rgba(201,168,76,.15); color: var(--gold); }
.sn-item i { width: 18px; text-align: center; }
.badge {
  margin-right: auto;
  background: var(--red);
  color: white;
  font-size: .7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(168,184,208,.1);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sn-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--silver);
  font-size: .88rem;
  transition: var(--transition);
}
.sn-link:hover { color: var(--white); background: rgba(168,184,208,.08); }
.sn-link.danger:hover { color: #e74c3c; }
.sn-link i { width: 18px; text-align: center; }

.admin-main {
  flex: 1;
  margin-right: 240px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin var(--transition);
}
.admin-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.hamburger-admin {
  display: none;
  color: var(--text);
  font-size: 1.2rem;
}
.page-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  flex: 1;
}
.topbar-actions { display: flex; gap: 10px; }

.page-section { display: none; padding: 28px; flex: 1; }
.page-section.active { display: block; }

/* ======= Buttons ======= */
.a-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}
.a-btn-primary { background: var(--navy); color: var(--white); }
.a-btn-primary:hover { background: var(--navy-mid); }
.a-btn-outline { border: 1.5px solid var(--border); color: var(--text); }
.a-btn-outline:hover { border-color: var(--navy); color: var(--navy); }
.a-btn-danger { background: var(--red); color: var(--white); }
.a-btn-danger:hover { background: #c0392b; }
.a-btn-gold { background: var(--gold); color: var(--navy); font-weight: 700; }
.a-btn-sm { padding: 7px 14px; font-size: .8rem; }
.btn-full { width: 100%; justify-content: center; }

/* ======= Forms ======= */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .84rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .92rem;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: var(--transition);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(8,18,42,.08);
}
.field small { display: block; font-size: .78rem; color: var(--text-mid); margin-top: 4px; }
.field textarea { resize: vertical; }
.toggle-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.toggle-label input { width: auto; }
.save-msg { margin-top: 12px; padding: 10px 14px; background: #edfaf4; color: var(--green); border-radius: 6px; font-weight: 600; font-size: .88rem; }
.save-msg.error-bg { background: #fdf0f0; color: var(--red); }
.help-text { color: var(--text-mid); font-size: .88rem; margin-bottom: 14px; line-height: 1.6; }
.divider { border: none; border-top: 1px solid var(--border); margin: 28px 0; }

/* ======= Dashboard ======= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  border-right: 4px solid transparent;
}
.stat-card.blue { border-color: #3498db; }
.stat-card.gold { border-color: var(--gold); }
.stat-card.green { border-color: var(--green); }
.stat-card.purple { border-color: #9b59b6; }
.sc-icon { font-size: 1.6rem; color: var(--text-mid); }
.stat-card.blue .sc-icon  { color: #3498db; }
.stat-card.gold .sc-icon  { color: var(--gold); }
.stat-card.green .sc-icon { color: var(--green); }
.stat-card.purple .sc-icon { color: #9b59b6; }
.sc-num { display: block; font-size: 1.8rem; font-weight: 800; color: var(--navy); }
.sc-lbl { font-size: .78rem; color: var(--text-mid); }
.recent-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.recent-box h3 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; color: var(--navy); }
.recent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.recent-row:last-child { border-bottom: none; }
.recent-name { font-weight: 600; color: var(--navy); flex: 1; }
.recent-date { color: var(--text-mid); font-size: .78rem; }
.recent-artist { font-size: .8rem; color: var(--gold); font-weight: 600; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: #3498db; flex-shrink: 0; }

/* ======= Items List ======= */
.page-actions { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.items-list { display: flex; flex-direction: column; gap: 12px; }
.list-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.list-item:hover { box-shadow: 0 4px 20px rgba(8,18,42,.12); }
.li-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}
.li-info { flex: 1; }
.li-name { font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.li-sub  { font-size: .82rem; color: var(--text-mid); }
.li-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  color: var(--text-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  transition: var(--transition);
}
.icon-btn:hover { border-color: var(--navy); color: var(--navy); }
.icon-btn.delete:hover { border-color: var(--red); color: var(--red); }
.status-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .74rem;
  font-weight: 700;
}
.status-active   { background: #edfaf4; color: var(--green); }
.status-inactive { background: #f5f5f5; color: #999; }

/* ======= Gallery Admin ======= */
.gallery-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.gallery-admin-item {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.gallery-thumb {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.6);
  font-size: 1.8rem;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-admin-info { padding: 10px 12px; }
.gallery-admin-info p { font-size: .82rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-admin-actions { display: flex; gap: 6px; }

/* ======= Submissions Table ======= */
.table-wrap { overflow-x: auto; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th {
  background: var(--navy);
  color: var(--gold);
  padding: 12px 16px;
  text-align: right;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .5px;
}
td { padding: 12px 16px; font-size: .88rem; border-bottom: 1px solid var(--border); color: var(--text); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8faff; }
tr.unread-row td:first-child { border-right: 3px solid #3498db; }
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-mid); }
.empty-state i { font-size: 2.5rem; margin-bottom: 12px; display: block; opacity: .4; }

/* ======= Content Form ======= */
.content-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  max-width: 680px;
}
.content-form h3 { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 20px; }

/* ======= Modals ======= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
}
.modal-box {
  position: relative;
  background: var(--white);
  border-radius: 14px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: modalIn .25s ease;
}
.modal-wide { max-width: 680px; }
.modal-sm   { max-width: 380px; }
@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(-10px); }
  to   { opacity: 1; transform: none; }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1rem; font-weight: 700; color: var(--navy); }
.modal-close { color: var(--text-mid); font-size: 1.1rem; transition: var(--transition); }
.modal-close:hover { color: var(--red); }
form { padding: 24px; }
.modal-footer {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  padding-top: 8px;
  flex-direction: row-reverse;
}

/* ======= Image Preview ======= */
.img-preview {
  margin-top: 8px;
  max-width: 120px;
  max-height: 120px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
}
.img-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ======= 2-col form grid ======= */
.form-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
@media (max-width: 600px) { .form-2col { grid-template-columns: 1fr; } }

/* ======= Event list status colors ======= */
.status-confirmed { background: #edfaf4; color: #27ae60; }
.status-pending   { background: #ebf5fb; color: #3498db; }
.status-done      { background: #f5f5f5; color: #888; }
.status-cancelled { background: #fdf0f0; color: #e74c3c; }

/* ======= Contract button ======= */
.contract-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 700;
  background: linear-gradient(135deg, #c9a84c, #e0c870);
  color: #08122a;
  border: none;
  cursor: pointer;
  transition: .2s;
}
.contract-btn:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(201,168,76,.3); }

/* ======= Form helpers ======= */
.form-section-title {
  color: #0a1628;
  font-size: .88rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.form-divider {
  border: none;
  border-top: 1px solid #e0e8f0;
  margin: 16px 0;
}

/* ======= Sidebar dividers ======= */
.sn-divider {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #8899bb;
  text-transform: uppercase;
  padding: 14px 20px 4px;
}

/* ======= Status extra colors ======= */
.status-active   { background: #eafaf1; color: #27ae60; }
.status-inactive { background: #f5f5f5; color: #888; }

/* ======= Admin Calendar ======= */
.calendar-wrap {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.cal-arrow {
  width: 34px; height: 34px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  color: var(--text-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  transition: var(--transition);
}
.cal-arrow:hover { border-color: var(--navy); color: var(--navy); }
.cal-month-label { font-weight: 700; font-size: 1rem; color: var(--navy); }
.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal-head {
  text-align: center;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-mid);
  padding: 6px 2px 8px;
  border-bottom: 1px solid var(--border);
}
.cal-day {
  position: relative;
  min-height: 54px;
  border-radius: 6px;
  padding: 5px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background var(--transition);
  cursor: default;
}
.cal-day:hover { background: #f0f4fc; }
.cal-day.today { background: rgba(201,168,76,.12); border: 1.5px solid var(--gold); }
.cal-day.has-event { background: #eef5ff; }
.cal-day.other-month { opacity: .25; pointer-events: none; }
.cal-greg { font-size: .85rem; font-weight: 600; color: var(--text); }
.cal-heb  { display: block; font-size: .6rem; color: var(--gold); line-height: 1.1; }
.cal-dots { display: flex; gap: 2px; justify-content: center; margin-top: 3px; }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.cal-dot.booked  { background: #27ae60; }
.cal-dot.pending { background: #3498db; }
.cal-dot.done    { background: #aaa; }
.cal-event-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 4px);
  right: 50%;
  transform: translateX(50%);
  background: var(--navy);
  color: var(--white);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: .72rem;
  white-space: nowrap;
  z-index: 20;
  pointer-events: none;
  box-shadow: 0 3px 12px rgba(0,0,0,.3);
}
.cal-day:hover .cal-event-tooltip { display: block; }
.cal-legend {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.cal-leg-item { display: flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--text-mid); }
.leg-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.leg-dot.booked  { background: #27ae60; }
.leg-dot.pending { background: #3498db; }
.leg-dot.done    { background: #aaa; }

/* ======= Submission status badges ======= */
.sub-status-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}
.sub-new         { background: #ebf5fb; color: #2980b9; }
.sub-in-progress { background: #fef9e7; color: #d68910; }
.sub-done        { background: #edfaf4; color: #27ae60; }

/* ======= Performer rows ======= */
.performer-row select,
.performer-row input[type="text"],
.performer-row input[type="number"] {
  padding: 6px 8px;
  border: 1px solid #cdd5e0;
  border-radius: 6px;
  font-size: .82rem;
  width: 100%;
  font-family: inherit;
}

/* ======= Toast notifications ======= */
#toastContainer {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--white);
  font-size: .88rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  animation: toastIn .25s ease, toastOut .3s ease 2.7s forwards;
  pointer-events: none;
  min-width: 220px;
}
.toast.success { background: #1e6b3a; border-right: 4px solid #27ae60; }
.toast.error   { background: #7d1a1a; border-right: 4px solid #e74c3c; }
.toast.info    { background: var(--navy-mid); border-right: 4px solid var(--gold); }
@keyframes toastIn  { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
@keyframes toastOut { to   { opacity:0; transform:translateY(10px); } }

/* ======= Submission filter tabs ======= */
.sub-filter-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.sub-filter {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-mid);
  transition: var(--transition);
  background: var(--white);
}
.sub-filter:hover { border-color: var(--navy); color: var(--navy); }
.sub-filter.active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.filter-count {
  display: inline-block;
  background: rgba(255,255,255,.25);
  border-radius: 10px;
  padding: 0 6px;
  font-size: .72rem;
  margin-right: 4px;
}
.sub-filter:not(.active) .filter-count { background: var(--bg); color: var(--text-mid); }

/* ======= Upcoming events (dashboard) ======= */
.upcoming-event-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
}
.upcoming-event-row:last-child { border-bottom: none; }
.ue-date {
  background: var(--navy);
  color: var(--gold);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: .75rem;
  font-weight: 700;
  text-align: center;
  min-width: 64px;
  line-height: 1.4;
  flex-shrink: 0;
}
.ue-info { flex: 1; }
.ue-name { font-weight: 700; color: var(--navy); }
.ue-sub  { font-size: .78rem; color: var(--text-mid); }

/* ======= Responsive ======= */
@media (max-width: 900px) {
  .sidebar { transform: translateX(240px); }
  .sidebar.open { transform: none; }
  .admin-main { margin-right: 0; }
  .hamburger-admin { display: block; }
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-topbar { padding: 14px 16px; }
  .page-section { padding: 16px; }
  .content-form { padding: 20px 16px; }
  form { padding: 16px; }
}

/* ===== Under Construction Toggle ===== */
.uc-toggle-wrap {
  position: relative; display: inline-block;
  width: 52px; height: 28px; cursor: pointer;
}
.uc-toggle-wrap input { opacity: 0; width: 0; height: 0; }
.uc-toggle-slider {
  position: absolute; inset: 0;
  background: #d1d9e6; border-radius: 28px;
  transition: .3s;
}
.uc-toggle-slider::before {
  content: ''; position: absolute;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; right: 3px; top: 3px;
  transition: .3s; box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.uc-toggle-wrap input:checked + .uc-toggle-slider { background: #e74c3c; }
.uc-toggle-wrap input:checked + .uc-toggle-slider::before { transform: translateX(-24px); }
