:root {
  --bg: #0a0a0a;
  --bg2: #111;
  --bg3: #1a1a1a;
  --surface: #1e1e1e;
  --surface2: #252525;
  --gold: #D4AF37;
  --gold-light: #F0D060;
  --gold-dark: #B8941F;
  --gold-glow: rgba(212,175,55,0.12);
  --text: #F5F0E8;
  --text2: #B8B0A0;
  --text3: #807868;
  --border: #2a2520;
  --border-gold: rgba(212,175,55,0.3);
  --success: #4CAF50;
  --warning: #FF9800;
  --danger: #F44336;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

.login-container {
  min-height: 100vh; display: flex; justify-content: center; align-items: center;
  background: radial-gradient(ellipse at center, rgba(212,175,55,0.06) 0%, var(--bg) 70%);
}
.login-box {
  background: var(--surface); padding: 45px; border-radius: 24px;
  width: 100%; max-width: 420px; text-align: center;
  border: 1px solid var(--border-gold); box-shadow: var(--shadow);
}
.login-box h1 {
  font-family: 'Playfair Display', serif; font-size: 1.6rem;
  margin-bottom: 8px; color: var(--gold);
}
.login-box .login-subtitle { color: var(--text3); margin-bottom: 30px; font-size: 0.9rem; }
.login-box input {
  width: 100%; padding: 14px 18px; margin-bottom: 14px;
  border: 2px solid var(--border); border-radius: var(--radius);
  font-size: 1rem; background: var(--bg2); color: var(--text);
}
.login-box input:focus { outline: none; border-color: var(--gold); }
.login-box input::placeholder { color: var(--text3); }
.login-box .btn {
  width: 100%; padding: 15px; font-size: 1rem; font-weight: 600;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--bg); border: none; border-radius: 50px; cursor: pointer;
  transition: all 0.3s; margin-top: 5px;
}
.login-box .btn:hover { box-shadow: 0 8px 30px rgba(212,175,55,0.3); }
.login-error { color: var(--danger); margin-bottom: 12px; display: none; font-size: 0.9rem; }

.admin-header {
  background: var(--bg2); border-bottom: 1px solid var(--border-gold);
  padding: 16px 30px; display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; z-index: 100;
}
.admin-header-left { display: flex; align-items: center; gap: 20px; }
.admin-header-left h1 {
  font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--gold);
  display: flex; align-items: center; gap: 10px;
}
.total-badge {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--bg); padding: 8px 20px; border-radius: 30px;
  font-size: 1.6rem; font-weight: 800;
  font-family: 'Inter', sans-serif;
}
.total-label { font-size: 0.75rem; color: var(--text3); font-weight: 400; }
.admin-header-right { text-align: right; }
.admin-header-right .salon-name { font-weight: 600; color: var(--gold); font-size: 0.95rem; }
.admin-header-right .salon-address { font-size: 0.8rem; color: var(--text3); }
.admin-header-right .manager-name { font-size: 0.8rem; color: var(--text2); margin-top: 4px; }

.admin-body {
  display: grid; grid-template-columns: 1.2fr 0.8fr;
  gap: 25px; padding: 25px 30px; min-height: calc(100vh - 70px);
}

.panel {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
}
.panel-header {
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.panel-header h2 { font-size: 1rem; color: var(--gold); display: flex; align-items: center; gap: 8px; }
.panel-body { padding: 0; max-height: calc(100vh - 200px); overflow-y: auto; }

.hour-group { border-bottom: 1px solid var(--border); }
.hour-label {
  padding: 10px 22px; background: var(--bg2);
  font-weight: 600; font-size: 0.85rem; color: var(--gold);
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; z-index: 5;
}
.hour-count {
  font-size: 0.75rem; padding: 3px 10px; border-radius: 12px;
  background: var(--border-gold); color: var(--gold);
}
.booking-item {
  padding: 14px 22px; border-bottom: 1px solid rgba(42,37,32,0.5);
  display: flex; align-items: center; gap: 14px; transition: all 0.2s;
}
.booking-item:hover { background: var(--gold-glow); }
.booking-item:last-child { border-bottom: none; }

.booking-time { font-size: 1.1rem; font-weight: 700; color: var(--gold); min-width: 55px; }
.booking-info { flex: 1; }
.booking-info .name { font-weight: 600; font-size: 0.95rem; }
.booking-info .service { font-size: 0.82rem; color: var(--text3); }
.booking-info .phone { font-size: 0.8rem; color: var(--text3); }

.status-badge {
  padding: 5px 12px; border-radius: 20px; font-size: 0.72rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.status-pending { background: rgba(255,152,0,0.15); color: var(--warning); }
.status-confirmed { background: rgba(76,175,80,0.15); color: var(--success); }
.status-cancelled { background: rgba(244,67,54,0.15); color: var(--danger); }
.status-completed { background: rgba(33,150,243,0.15); color: #42A5F5; }

.queue-panel .panel-body { padding: 20px; }
.queue-current {
  text-align: center; padding: 30px 20px; margin-bottom: 20px;
  background: var(--bg2); border-radius: var(--radius); border: 1px solid var(--border-gold);
}
.queue-current .label { font-size: 0.8rem; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.queue-current .number {
  font-size: 4rem; font-weight: 800; color: var(--gold);
  line-height: 1; margin-bottom: 8px;
}
.queue-current .customer-name { font-size: 1.1rem; color: var(--text); font-weight: 600; }
.queue-current .customer-service { font-size: 0.85rem; color: var(--text3); margin-top: 4px; }

.queue-next {
  background: var(--bg2); border-radius: var(--radius); padding: 15px;
  margin-bottom: 20px;
}
.queue-next .label { font-size: 0.75rem; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.queue-next-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem;
}
.queue-next-item:last-child { border-bottom: none; }
.queue-next-num { color: var(--gold); font-weight: 700; min-width: 30px; }

.btn-next-customer {
  width: 100%; padding: 16px; font-size: 1.1rem; font-weight: 700;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--bg); border: none; border-radius: var(--radius);
  cursor: pointer; transition: all 0.3s; display: flex; align-items: center;
  justify-content: center; gap: 10px;
}
.btn-next-customer:hover { box-shadow: 0 8px 30px rgba(212,175,55,0.3); transform: translateY(-2px); }
.btn-next-customer:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.notification-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92); backdrop-filter: blur(12px);
  display: none; justify-content: center; align-items: center; z-index: 9999;
  animation: overlayPulse 2s ease-in-out infinite;
}
@keyframes overlayPulse {
  0%, 100% { background: rgba(0,0,0,0.92); }
  50% { background: rgba(212,175,55,0.08); }
}
.notification-overlay.show { display: flex; }
.notification-popup {
  background: var(--surface); border-radius: 24px; padding: 40px;
  max-width: 520px; width: 92%; text-align: center;
  animation: popIn 0.4s ease-out; border: 3px solid var(--gold);
  box-shadow: 0 0 60px rgba(212,175,55,0.3), 0 0 120px rgba(212,175,55,0.1);
}
@keyframes popIn { 0% { transform: scale(0.7) translateY(30px); opacity: 0; } 100% { transform: scale(1) translateY(0); opacity: 1; } }

.notification-popup .bell-icon {
  font-size: 6rem; margin-bottom: 10px;
  animation: bellSwing 0.6s ease-in-out infinite alternate;
  display: inline-block;
}
@keyframes bellSwing {
  0% { transform: rotate(-25deg) scale(1); }
  25% { transform: rotate(25deg) scale(1.1); }
  50% { transform: rotate(-20deg) scale(1); }
  75% { transform: rotate(20deg) scale(1.05); }
  100% { transform: rotate(-25deg) scale(1); }
}

.notification-popup h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem; margin-bottom: 5px; color: var(--gold);
  animation: textPulse 1.5s ease-in-out infinite;
}
@keyframes textPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; text-shadow: 0 0 20px rgba(212,175,55,0.5); }
}
.notification-popup .popup-subtitle { font-size: 0.85rem; color: var(--text3); margin-bottom: 20px; }

.notification-popup .popup-counter {
  font-size: 0.8rem; color: var(--warning); margin-bottom: 8px; font-weight: 600;
}

.popup-booking-info {
  background: var(--bg2); padding: 20px; border-radius: var(--radius);
  margin: 15px 0 25px; text-align: left;
}
.popup-booking-info .info-row {
  display: flex; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem;
}
.popup-booking-info .info-row:last-child { border-bottom: none; }
.popup-booking-info .info-label { color: var(--text3); }
.popup-booking-info .info-value { font-weight: 600; color: var(--text); }

.popup-actions { display: flex; gap: 15px; margin-top: 10px; }
.popup-actions .btn { flex: 1; padding: 15px; font-size: 1rem; border: none; border-radius: var(--radius); cursor: pointer; font-weight: 700; transition: all 0.2s; }
.popup-actions .btn-reject { background: rgba(244,67,54,0.15); color: var(--danger); border: 2px solid var(--danger); }
.popup-actions .btn-reject:hover { background: var(--danger); color: white; }
.popup-actions .btn-accept { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--bg); }
.popup-actions .btn-accept:hover { box-shadow: 0 5px 20px rgba(212,175,55,0.3); }

.empty-state { text-align: center; padding: 50px 20px; color: var(--text3); }
.empty-state .icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 0.9rem; }

.filter-row { display: flex; gap: 8px; }
.filter-btn {
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 20px;
  background: transparent; color: var(--text3); cursor: pointer;
  font-size: 0.78rem; font-weight: 500; transition: all 0.2s;
}
.filter-btn.active { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.filter-select {
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 20px;
  background: var(--bg2); color: var(--text2); font-size: 0.78rem; cursor: pointer;
}

.admin-date-picker {
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 20px;
  background: var(--bg2); color: var(--text2); font-size: 0.78rem; cursor: pointer;
}

.admin-tabs {
  display: flex; gap: 5px;
}
.tab-btn {
  padding: 8px 20px; border: 1px solid var(--border); border-radius: 25px;
  background: transparent; color: var(--text3); cursor: pointer;
  font-size: 0.85rem; font-weight: 500; transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.tab-btn.active { background: var(--gold); color: var(--bg); border-color: var(--gold); font-weight: 600; }
.tab-btn:hover:not(.active) { border-color: var(--gold); color: var(--gold); }

.users-table {
  width: 100%; border-collapse: collapse;
}
.users-table th {
  padding: 12px 18px; text-align: left; font-size: 0.78rem;
  color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px;
  background: var(--bg2); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 5;
}
.users-table td {
  padding: 14px 18px; border-bottom: 1px solid rgba(42,37,32,0.5);
  font-size: 0.9rem; vertical-align: middle;
}
.users-table tr:hover td { background: var(--gold-glow); }
.users-table code {
  background: var(--bg2); padding: 3px 8px; border-radius: 6px;
  font-size: 0.82rem; color: var(--text2);
}
.role-badge {
  padding: 4px 12px; border-radius: 15px; font-size: 0.75rem; font-weight: 600;
}
.role-admin { background: rgba(212,175,55,0.15); color: var(--gold); }
.role-manager { background: rgba(76,175,80,0.15); color: var(--success); }

.action-btn {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 10px; cursor: pointer; font-size: 0.9rem;
  transition: all 0.2s; margin: 0 2px;
}
.edit-btn:hover { border-color: var(--gold); background: var(--gold-glow); }
.delete-btn:hover { border-color: var(--danger); background: rgba(244,67,54,0.1); }

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);
  display: none; justify-content: center; align-items: center; z-index: 9998;
}
.modal-content {
  background: var(--surface); border-radius: 20px; padding: 35px;
  max-width: 480px; width: 92%;
  border: 1px solid var(--border-gold); box-shadow: var(--shadow);
  animation: popIn 0.3s ease-out;
}
.modal-content h2 {
  font-family: 'Playfair Display', serif; color: var(--gold);
  font-size: 1.3rem; margin-bottom: 20px;
}
.modal-form label {
  display: block; font-size: 0.82rem; color: var(--text3);
  margin-bottom: 5px; margin-top: 14px;
}
.modal-form label:first-child { margin-top: 0; }
.modal-form input, .modal-form select {
  width: 100%; padding: 12px 16px;
  border: 2px solid var(--border); border-radius: var(--radius);
  font-size: 0.95rem; background: var(--bg2); color: var(--text);
  font-family: 'Inter', sans-serif;
}
.modal-form input:focus, .modal-form select:focus { outline: none; border-color: var(--gold); }
.modal-form input::placeholder { color: var(--text3); }
.form-error { color: var(--danger); font-size: 0.85rem; margin-top: 12px; }

.modal-actions {
  display: flex; gap: 12px; margin-top: 24px;
}
.modal-actions .btn {
  flex: 1; padding: 13px; font-size: 0.95rem; border: none;
  border-radius: var(--radius); cursor: pointer; font-weight: 600;
  transition: all 0.2s; font-family: 'Inter', sans-serif;
}
.btn-cancel { background: var(--bg2); color: var(--text2); border: 1px solid var(--border) !important; }
.btn-cancel:hover { border-color: var(--text3) !important; }
.btn-save {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--bg);
}
.btn-save:hover { box-shadow: 0 5px 20px rgba(212,175,55,0.3); }

.admin-header-center { display: flex; align-items: center; }

@media (max-width: 1024px) {
  .admin-body { grid-template-columns: 1fr; }
  .admin-header { flex-direction: column; gap: 12px; text-align: center; }
  .admin-header-right { text-align: center; }
  .users-table { font-size: 0.82rem; }
  .users-table th, .users-table td { padding: 10px 12px; }
}
@media (max-width: 600px) {
  .admin-body { padding: 15px; }
  .popup-actions { flex-direction: column; }
  .modal-content { padding: 25px; }
  .modal-actions { flex-direction: column; }
  .admin-tabs { gap: 3px; }
  .tab-btn { padding: 6px 14px; font-size: 0.78rem; }
  .filter-row { flex-wrap: wrap; }
}
