#admin-agenda-premium-portal {
  position: fixed;
  inset: 0 0 0 var(--agenda-premium-left, 320px);
  z-index: 32;
  overflow: auto;
  background:
    radial-gradient(circle at 12% -10%, rgba(212, 175, 55, 0.18), transparent 34%),
    radial-gradient(circle at 100% 8%, rgba(255, 255, 255, 0.045), transparent 28%),
    linear-gradient(180deg, #050505 0%, #080807 46%, #030303 100%);
  color: #f5f5f5;
  font-family: "Inter", "Segoe UI", sans-serif;
}

.ap-shell {
  min-height: 100%;
  padding: 28px 36px 54px;
}

.ap-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: 20px;
  margin-bottom: 20px;
}

.ap-hero-card,
.ap-panel,
.ap-pro-card,
.ap-day-column {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(18, 18, 18, 0.97), rgba(7, 7, 7, 0.98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

.ap-hero-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
}

.ap-hero-card::after {
  content: "";
  position: absolute;
  right: -76px;
  top: -96px;
  width: 286px;
  height: 286px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.13);
}

.ap-kicker {
  color: #d4af37;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.ap-title {
  margin: 8px 0 10px;
  color: #fff;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(40px, 4vw, 68px);
  letter-spacing: 0.045em;
  line-height: 0.94;
}

.ap-subtitle {
  max-width: 760px;
  color: #949ba7;
  font-size: 14px;
  line-height: 1.65;
}

.ap-actions,
.ap-filters,
.ap-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ap-actions {
  margin-top: 22px;
}

.ap-button,
.ap-chip,
.ap-select,
.ap-input {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: #111;
  color: #f5f5f5;
  outline: none;
}

.ap-button,
.ap-chip {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  cursor: pointer;
  font-weight: 900;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.ap-button:hover,
.ap-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(212, 175, 55, 0.5);
}

.ap-button-primary,
.ap-chip-active {
  border-color: rgba(212, 175, 55, 0.86);
  background: linear-gradient(135deg, #e4bd3b, #b89123);
  color: #050505;
}

.ap-button-danger {
  border-color: rgba(239, 68, 68, 0.32);
  background: rgba(127, 29, 29, 0.14);
  color: #fecaca;
}

.ap-button-good {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(20, 83, 45, 0.18);
  color: #bbf7d0;
}

.ap-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ap-stat {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.ap-stat-label {
  color: #7d8490;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ap-stat-value {
  margin-top: 8px;
  color: #d4af37;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 38px;
  line-height: 1;
}

.ap-panel {
  padding: 20px;
  margin-bottom: 18px;
}

.ap-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1.2fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.ap-input,
.ap-select {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.ap-input:focus,
.ap-select:focus {
  border-color: rgba(212, 175, 55, 0.55);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.08);
}

.ap-chips {
  margin-top: 12px;
}

.ap-chip {
  min-height: 46px;
  justify-content: flex-start;
  background: rgba(255, 255, 255, 0.035);
}

.ap-chip-avatar,
.ap-avatar {
  display: grid;
  place-items: center;
  border: 1px solid rgba(212, 175, 55, 0.24);
  background: rgba(212, 175, 55, 0.11);
  color: #d4af37;
  font-weight: 950;
}

.ap-chip-avatar {
  width: 28px;
  height: 28px;
  border-radius: 10px;
}

.ap-avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
}

.ap-chip-avatar,
.ap-avatar {
  overflow: hidden;
}

.ap-chip-avatar img,
.ap-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.ap-pro-card {
  overflow: hidden;
}

.ap-pro-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ap-pro {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ap-pro-name {
  color: #fff;
  font-size: 18px;
  font-weight: 950;
}

.ap-muted {
  color: #8d94a0;
  font-size: 12px;
}

.ap-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #cbd1db;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.ap-pill-pending { color: #fde68a; border-color: rgba(212, 175, 55, 0.3); }
.ap-pill-confirmed { color: #bfdbfe; border-color: rgba(59, 130, 246, 0.32); }
.ap-pill-completed { color: #bbf7d0; border-color: rgba(34, 197, 94, 0.32); }
.ap-pill-cancelled { color: #fecaca; border-color: rgba(239, 68, 68, 0.32); }

.ap-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.ap-appointment {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.032);
}

.ap-appointment::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #d4af37;
}

.ap-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ap-time {
  color: #d4af37;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 28px;
  line-height: 1;
}

.ap-client {
  margin-top: 4px;
  color: #fff;
  font-weight: 950;
}

.ap-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ap-note {
  margin-top: 10px;
  color: #a8afba;
  font-size: 12px;
  line-height: 1.45;
}

.ap-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ap-mini {
  min-height: 34px;
  border-radius: 11px;
  padding: 0 11px;
  font-size: 12px;
}

.ap-empty {
  padding: 28px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  color: #8d94a0;
  text-align: center;
}

.ap-timeline {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
}

.ap-hour-rail {
  display: grid;
  gap: 10px;
}

.ap-hour {
  height: 74px;
  color: #6f7682;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 22px;
  text-align: right;
}

.ap-day-column {
  padding: 16px;
}

.ap-slot {
  min-height: 74px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 0 10px;
}

.ap-slot + .ap-slot {
  padding-top: 10px;
}

.ap-modal-layer {
  position: fixed;
  inset: 0;
  z-index: 72;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.72);
}

.ap-modal {
  width: min(920px, 100%);
  max-height: min(860px, calc(100vh - 44px));
  overflow: auto;
  border: 1px solid rgba(212, 175, 55, 0.24);
  border-radius: 24px;
  background: #0b0b0b;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62);
}

.ap-modal-head,
.ap-modal-actions,
.ap-service-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ap-modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 11, 11, 0.96);
}

.ap-modal h2 {
  margin: 6px 0 0;
  color: #fff;
  font-size: 24px;
  line-height: 1.1;
}

.ap-manual-form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.ap-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ap-manual-form label {
  display: grid;
  gap: 7px;
  color: #cbd1db;
  font-size: 12px;
  font-weight: 850;
}

.ap-textarea {
  min-height: 96px;
  padding-top: 13px;
  resize: vertical;
}

.ap-service-box {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.ap-service-title {
  color: #f5f5f5;
  font-size: 13px;
}

.ap-service-choice {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 11px 12px;
  background: rgba(0, 0, 0, 0.18);
}

.ap-service-choice input {
  width: 18px;
  height: 18px;
  accent-color: #d4af37;
}

.ap-service-choice span {
  display: grid;
  gap: 3px;
}

.ap-service-choice small {
  color: #8d94a0;
  font-size: 11px;
}

.ap-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.ap-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  max-width: 360px;
  border: 1px solid rgba(212, 175, 55, 0.34);
  border-radius: 18px;
  padding: 14px 16px;
  background: #111;
  color: #f5f5f5;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.44);
}

.ap-toast-error {
  border-color: rgba(239, 68, 68, 0.45);
  color: #fecaca;
}

@media (max-width: 1180px) {
  #admin-agenda-premium-portal {
    left: 0;
  }

  .ap-hero,
  .ap-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .ap-shell {
    padding: 20px 16px 42px;
  }

  .ap-stats {
    grid-template-columns: 1fr;
  }

  .ap-form-grid {
    grid-template-columns: 1fr;
  }

  .ap-modal-actions,
  .ap-modal-head,
  .ap-service-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .ap-timeline {
    grid-template-columns: 1fr;
  }

  .ap-hour-rail {
    display: none;
  }
}
