/* ncore.css — global layout styles */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:            #190127;
  --sidebar-bg:    #1F1632;
  --accent:        #9D3EF7;
  --icon-color:    #A1A1A1;
  --sidebar-w:     68px;
  --sidebar-exp-w: 272px;
  --header-h:      64px;
}

html, body {
  height: 100%;
  background: var(--bg);
  font-family: 'Rajdhani', sans-serif;
  color: #fff;
  overflow-x: hidden;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.layout {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  left: 10px;
  top: 10px;
  bottom: 10px;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-radius: 20px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px 8px;
  gap: 4px;
  overflow: visible;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.sidebar.expanded { width: var(--sidebar-exp-w); }

/* ── Sidebar item ────────────────────────────────────────────────────────── */
.sidebar-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  padding: 8px 0 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: color 0.2s ease;
  color: var(--icon-color);
  user-select: none;
  flex-shrink: 0;
}

.sidebar-item:hover,
.sidebar-item.active { color: var(--accent); }

.item-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  transition: color 0.2s ease;
}

.item-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  opacity: 0;
  width: 0;
  transition: opacity 0.2s ease, width 0.2s ease;
}

.sidebar.expanded .item-label { opacity: 1; width: auto; }

/* ── Tooltip ─────────────────────────────────────────────────────────────── */
.sidebar-item .tooltip {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 8, 30, 0.95);
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 99999;
  border: 1px solid rgba(157, 62, 247, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.sidebar-item:hover .tooltip { opacity: 1; }
.sidebar.expanded .sidebar-item .tooltip { display: none; }

/* ── Toggle button ───────────────────────────────────────────────────────── */
.toggle-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  padding: 8px 0 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--icon-color);
  transition: background 0.2s, color 0.2s;
  user-select: none;
  margin-bottom: 4px;
  flex-shrink: 0;
}

.toggle-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.toggle-label {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  color: inherit;
  opacity: 0;
  width: 0;
  overflow: hidden;
  transition: opacity 0.2s ease, width 0.2s ease;
}

.sidebar.expanded .toggle-label { opacity: 1; width: auto; }

/* ── Divider ─────────────────────────────────────────────────────────────── */
.divider {
  width: calc(100% - 16px);
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  margin: 4px 8px;
  flex-shrink: 0;
}

/* ── Stats block ─────────────────────────────────────────────────────────── */
.stats-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  padding: 6px 0 6px 12px;
  flex-shrink: 0;
}

.stat-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  position: relative;
}

.stat-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 30px;
  flex-shrink: 0;
}

.stat-num {
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #e0e0e0;
  line-height: 1;
  min-width: 14px;
  text-align: center;
}

.stat-lbl {
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--icon-color);
  white-space: nowrap;
  opacity: 0;
  width: 0;
  overflow: hidden;
  transition: opacity 0.2s ease, width 0.2s ease;
}

.sidebar.expanded .stat-lbl { opacity: 1; width: auto; }

/* ── Pulse animation ─────────────────────────────────────────────────────── */
.pulse-wrapper {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pulse-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.9);
  z-index: 2;
}

.pulse-ring {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.3);
  animation: pulse 1.8s ease-out infinite;
  z-index: 1;
}

.pulse-outer {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.12);
  animation: pulseOuter 2.4s ease-out infinite 0.4s;
  z-index: 0;
}

@keyframes pulse {
  0%   { transform: scale(0.6); opacity: 0.9; }
  70%  { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(1.3); opacity: 0; }
}

@keyframes pulseOuter {
  0%   { transform: scale(0.5); opacity: 0.7; }
  70%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}

.stat-icon-visits {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

/* ── Spacer ──────────────────────────────────────────────────────────────── */
.spacer { flex: 1 1 auto; min-height: 0; }

/* ── Main area ───────────────────────────────────────────────────────────── */
.main-area {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  margin-left: calc(var(--sidebar-w) + 20px);
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-area.sidebar-expanded {
  margin-left: calc(var(--sidebar-exp-w) + 20px);
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 20px;
  height: var(--header-h);
  background: var(--bg);
  z-index: 100;
  flex-shrink: 0;
}

/* ── Logo ────────────────────────────────────────────────────────────────── */
.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
}

.logo-wrapper:hover { transform: scale(1.02); }

.logo-img {
  width: 28px;
  height: auto;
  filter: drop-shadow(0 0 8px rgba(0, 210, 255, 0.4));
}

.logo-text-wrapper {
  height: 35px;
  display: flex;
  align-items: center;
}

.logo-text-wrapper svg {
  height: 100%;
  width: auto;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

.beta-badge {
  background: rgba(255, 140, 0, 0.1);
  border: 1px solid rgba(255, 140, 0, 0.5);
  color: #ff8c00;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 1.5px;
  margin-top: 5px;
  text-transform: uppercase;
  box-shadow: 0 0 10px rgba(255, 140, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  transform: skewX(-15deg);
  transition: all 0.3s ease;
}

.beta-badge span { transform: skewX(15deg); }

.beta-badge:hover {
  background: rgba(255, 140, 0, 0.2);
  box-shadow: 0 0 15px rgba(255, 140, 0, 0.4);
}

/* ── Header right ────────────────────────────────────────────────────────── */
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-login {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: linear-gradient(135deg, rgba(157, 62, 247, 0.15), rgba(157, 62, 247, 0.05));
  border: 1px solid rgba(157, 62, 247, 0.4);
  border-radius: 10px;
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
  text-decoration: none;
}

.btn-login:hover {
  background: linear-gradient(135deg, rgba(157, 62, 247, 0.3), rgba(157, 62, 247, 0.15));
  border-color: rgba(157, 62, 247, 0.7);
  box-shadow: 0 0 16px rgba(157, 62, 247, 0.3);
  transform: translateY(-1px);
}

/* ── Page body ───────────────────────────────────────────────────────────── */
.wrapper-body {
  color: white;
  /* padding: 15px 20px; */
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  width: 100%;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .wrapper-body { padding: 15px 12px; }
  .sidebar { display: none; }
  .main-area,
  .main-area.sidebar-expanded { margin-left: 0; }
  .logo-text-wrapper { display: none; }
  .beta-badge { display: none; }
}

@media (max-width: 480px) {
  .beta-badge { display: none; }
}

/* ── Sidebar section label ───────────────────────────────────────────────── */
.sidebar-section-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: rgba(157, 62, 247, 0.6);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 8px 12px 2px;
  white-space: nowrap;
  opacity: 0;
  width: 0;
  overflow: hidden;
  flex-shrink: 0;
  transition: opacity 0.2s ease, width 0.2s ease;
}

.sidebar.expanded .sidebar-section-label { opacity: 1; width: auto; }

/* ── Header user block ───────────────────────────────────────────────────── */
.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 16px 5px 5px;
  background: rgba(157, 62, 247, 0.08);
  border: 1px solid rgba(157, 62, 247, 0.2);
  border-radius: 50px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  cursor: pointer;
}

.header-user:hover {
  background: rgba(157, 62, 247, 0.18);
  border-color: rgba(157, 62, 247, 0.45);
  transform: translateY(-1px);
}

.header-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9D3EF7, #6B1FDB);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.header-user-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #e0e0e0;
  white-space: nowrap;
}

/* ── Service nav (pagination) buttons ───────────────────────────────────── */
.svc-nav-item {
  color: rgba(157, 62, 247, 0.55);
  border: 1px dashed rgba(157, 62, 247, 0.18);
  background: rgba(157, 62, 247, 0.03);
  border-radius: 10px;
}

.svc-nav-item:hover {
  color: var(--accent);
  background: rgba(157, 62, 247, 0.1);
  border-color: rgba(157, 62, 247, 0.35);
}

/* ── Login Modal ─────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 4, 20, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  transition: opacity 0.22s ease;
}

/* Login modal uses .open class; panel modals use inline style.display='flex' */
.modal-overlay.open {
  display: flex;
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  position: relative;
  background: #1F1632;
  border: 1px solid rgba(157, 62, 247, 0.3);
  border-radius: 20px;
  padding: 36px 32px 32px;
  width: 100%;
  max-width: 420px;
  margin: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(157, 62, 247, 0.08);
  transform: translateY(14px);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.open .modal-box { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #A1A1A1;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0;
}

.modal-close::before {
  content: '';
  display: block;
  width: 14px;
  height: 14px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / contain no-repeat;
}

.modal-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.modal-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 24px;
  text-align: center;
  letter-spacing: 2px;
}

.modal-error {
  background: rgba(255, 80, 80, 0.1);
  border: 1px solid rgba(255, 80, 80, 0.4);
  color: #ff7070;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  display: none;
}

.modal-error.visible { display: block; }

.modal-group { margin-bottom: 16px; }

.modal-label {
  display: block;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #A1A1A1;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.modal-field {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-field:focus-within {
  border-color: rgba(157, 62, 247, 0.6);
  box-shadow: 0 0 0 3px rgba(157, 62, 247, 0.1);
}

.modal-field-icon {
  padding: 0 12px;
  color: #A1A1A1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.modal-sep {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.modal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 13px 14px;
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  font-weight: 500;
}

.modal-input::placeholder { color: rgba(255, 255, 255, 0.22); }

.modal-eye {
  border: none;
  background: none;
  color: #A1A1A1;
  cursor: pointer;
  padding: 0 12px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
  flex-shrink: 0;
}

.modal-eye:hover { color: #fff; }

.modal-submit {
  width: 100%;
  margin-top: 10px;
  padding: 14px;
  background: linear-gradient(135deg, #9D3EF7, #7B2FD4);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #b04fff, #9D3EF7);
  box-shadow: 0 0 24px rgba(157, 62, 247, 0.5);
  transform: translateY(-1px);
}

.modal-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Panel page ──────────────────────────────────────────────────────────── */
.panel-page { padding: 24px 32px; }

.panel-hero { margin-bottom: 40px; }

.panel-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-subtitle {
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: rgba(157, 62, 247, 0.7);
}

.panel-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 20px;
  border: 1px dashed rgba(157, 62, 247, 0.2);
  border-radius: 16px;
  color: #A1A1A1;
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  font-weight: 500;
}

.panel-placeholder strong { color: var(--accent); }

/* ── Panel action buttons ────────────────────────────────── */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 9px 22px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: .9rem;
  transition: background .2s, transform .1s;
  white-space: nowrap;
}

.btn-primary:hover  { background: #b55fff; }
.btn-primary:active { transform: scale(.97); }

.btn-secondary {
  background: #241036;
  color: #c084fc;
  border: 1px solid #3a1f5c;
  padding: 9px 22px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: .9rem;
  transition: background .2s;
}

.btn-secondary:hover { background: #3a1f5c; }

/* ── Service CRUD Panel Pages ─────────────────────────────── */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.panel-header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.svc-search-input {
  background: #241036;
  border: 1px solid #3a1f5c;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  outline: none;
  min-width: 220px;
  font-size: .9rem;
}

.svc-search-input::placeholder { color: #7a5c99; }
.svc-search-input:focus { border-color: var(--accent); }

/* Table */
.table-wrap {
  overflow-x: auto;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  overflow: hidden;
}

.svc-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Rajdhani', sans-serif;
}

.svc-table thead tr {
  background: rgba(157,62,247,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.svc-table th {
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 14px 18px;
  text-align: left;
  white-space: nowrap;
  background: none;
  border-bottom: none;
}

.svc-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
  cursor: default;
}
.svc-table tbody tr:last-child { border-bottom: none; }

.svc-table td {
  padding: 13px 18px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  color: #c8c8d0;
  vertical-align: middle;
  border-bottom: none;
}

.svc-table tr:hover td { background: rgba(157, 62, 247, .06); }

.tbl-actions {
  display: flex;
  gap: 6px;
}

/* Badge */
.badge {
  background: #3a1f5c;
  color: #c084fc;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: .78rem;
  white-space: nowrap;
}

/* Status dot */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}

.status-dot.green { background: #22c55e; }
.status-dot.red   { background: #ef4444; }
.status-dot.yellow { background: #eab308; }

/* Icon buttons — emoji hidden via font-size:0; icon rendered by CSS mask */
.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0;
  padding: 4px;
  opacity: .8;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
}

.btn-icon::before {
  content: '';
  display: block;
  width: 15px;
  height: 15px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7m-3.5-8.5a2.1 2.1 0 013 3L12 15l-4 1 1-4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7m-3.5-8.5a2.1 2.1 0 013 3L12 15l-4 1 1-4z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.btn-icon--del::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 6h18M8 6V4h8v2M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 6h18M8 6V4h8v2M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.btn-icon--view::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.btn-icon:hover { opacity: 1; }
.btn-icon--del:hover { color: #ef4444; }

/* Danger button */
.btn-danger {
  background: #ef4444;
  color: #fff;
  border: none;
  padding: 9px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: .9rem;
}

.btn-danger:hover { background: #dc2626; }

/* Pagination */
.svc-pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 18px;
  flex-wrap: wrap;
}

.pg-btn {
  background: #241036;
  color: #c084fc;
  border: 1px solid #3a1f5c;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: .85rem;
}

.pg-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.pg-btn:hover:not(.active) { background: #3a1f5c; }

.pg-info {
  color: #888;
  font-size: .82rem;
  margin-right: 6px;
}

/* Modal size variants */
.modal-box--wide { max-width: 680px; }
.modal-box--sm   { max-width: 400px; }

/* Two-column form row */
.modal-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Checkbox row */
.modal-check-row {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ccc;
  cursor: pointer;
}

/* Feedback message preview */
.feedback-msg-preview {
  color: #e0c3ff;
  background: #1a0b2e;
  border-radius: 8px;
  padding: 12px;
  max-height: 160px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-size: .9rem;
  line-height: 1.5;
}

/* ── Favorites panel specifics ────────────────────────────── */
.modal-box--fav { max-width: 740px; }

.modal-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

@media (max-width: 680px) {
  .modal-row-3 { grid-template-columns: 1fr 1fr; }
}

.modal-section-label {
  color: var(--accent);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 18px 0 10px;
  font-weight: 600;
}

/* Generic form row used in IT/Requests panel modals */
.form-row {
  margin-bottom: 12px;
}
.form-row > label:not(.check-label) {
  display: block;
  font-size: .73rem;
  font-weight: 700;
  color: #9D3EF7;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 5px;
}

/* Photo upload row */
.fav-photo-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
  padding: 14px 16px;
  background: #1a0b2e;
  border-radius: 10px;
  border: 1px solid #3a1f5c;
}

.fav-photo-preview {
  flex-shrink: 0;
}

.fav-photo-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #241036;
  border: 3px dashed #3a1f5c;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fav-photo-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fav-upload-btn {
  background: #3a1f5c;
  color: #c084fc;
  border: 1px solid #5a2f8c;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: .88rem;
  transition: background .2s;
  display: inline-block;
}

.fav-upload-btn:hover { background: #4e2878; }

.fav-photo-hint {
  color: #666;
  font-size: .78rem;
}

/* ═══════════════════════════════════════════════════════════
   Panel Service Modals – shared input & layout styles
   ═══════════════════════════════════════════════════════════ */

/* Inputs */
.svc-input,
.svc-select,
select.svc-input,
.svc-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #f0e6ff;
  padding: 10px 14px;
  font-size: .93rem;
  font-family: 'Rajdhani', sans-serif;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

/* Custom arrow for selects */
select.svc-input,
.svc-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239D3EF7' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.svc-input::placeholder,
.svc-textarea::placeholder { color: rgba(255, 255, 255, 0.28); }

.svc-input:focus,
.svc-select:focus,
select.svc-input:focus,
.svc-textarea:focus {
  border-color: rgba(157, 62, 247, .65);
  box-shadow: 0 0 0 3px rgba(157, 62, 247, .12);
  background-color: rgba(157, 62, 247, 0.07);
}

/* Make option dropdowns dark in every browser */
.svc-select option,
select.svc-input option { background: #1F1632; color: #f0e6ff; }
.svc-textarea { resize: vertical; min-height: 80px; }

.svc-label {
  display: block;
  font-size: .73rem;
  font-weight: 700;
  color: #9D3EF7;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 5px;
}

/* Modal structure */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(157, 62, 247, .2);
}

.modal-header .modal-title {
  margin-bottom: 0;
  text-align: left;
  font-size: 1rem;
  letter-spacing: 1px;
}

/* Close button inside modal-header participates in flex, not float above title */
.modal-header .modal-close {
  position: static;
  flex-shrink: 0;
}

.modal-body {
  overflow-y: auto;
  max-height: calc(90vh - 220px);
  padding-right: 6px;
  padding-top: 4px;
}

.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-thumb { background: #3a1f5c; border-radius: 4px; }

.modal-footer,
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(157, 62, 247, .15);
}

.modal-fg { margin-bottom: 14px; }

/* Tabs */
.modal-tabs {
  display: flex;
  border-bottom: 2px solid rgba(157, 62, 247, .2);
  margin-bottom: 16px;
}

.modal-tab-btn {
  background: none;
  border: none;
  padding: 8px 22px;
  color: rgba(255, 255, 255, .4);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .2s, border-color .2s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

/* SVG icon helpers */
.tab-ico          { width: 14px; height: 14px; flex-shrink: 0; }
.panel-title-ico  { width: 22px; height: 22px; flex-shrink: 0; }

.modal-tab-btn.active   { color: #c084fc; border-bottom-color: var(--accent); }
.modal-tab-btn:hover:not(.active) { color: rgba(255,255,255,.7); }
.modal-tab-btn:disabled { opacity: .28; cursor: not-allowed; }

.tab-pane          { display: none; }
.tab-pane.active   { display: block; }

/* Poster / image upload */
.poster-row {
  display: flex;
  gap: 18px;
  margin-bottom: 18px;
}

.poster-preview-wrap {
  flex-shrink: 0;
  width: 100px;
  height: 140px;
  border-radius: 8px;
  background: #1a0b2e;
  border: 2px dashed #3a1f5c;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
}

.poster-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.upload-btn-label {
  background: #3a1f5c;
  color: #c084fc;
  border: 1px solid #5a2f8c;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  transition: background .2s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.upload-btn-label:hover { background: #4e2878; }

.upload-hint    { color: #555; font-size: .76rem; }
.poster-current { color: #888; font-size: .78rem; font-style: italic; }

/* Episodes management */
.ep-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ep-section-title span {
  color: #9D3EF7;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
}

.ep-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .84rem;
  margin-bottom: 12px;
}

.ep-table th {
  background: #170b28;
  color: #9D3EF7;
  padding: 7px 10px;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid #3a1f5c;
  white-space: nowrap;
}

.ep-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #1e0d35;
  color: #ccc;
  vertical-align: middle;
}

.ep-table tr:hover td { background: rgba(157, 62, 247, .05); }

.ep-empty {
  color: #555;
  text-align: center;
  padding: 20px;
  font-style: italic;
}

.ep-sub-form {
  background: #150824;
  border: 1px solid #3a1f5c;
  border-radius: 10px;
  padding: 16px;
  margin-top: 8px;
  display: none;
}

.ep-sub-form.open { display: block; }

.ep-sub-form .modal-row-2 { gap: 10px; }

/* Table poster thumbnail */
.tbl-poster {
  width: 38px;
  height: 52px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #3a1f5c;
}

.tbl-poster-ph {
  width: 38px;
  height: 52px;
  background: #1a0b2e;
  border: 1px solid #3a1f5c;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  vertical-align: middle;
}

