/* ==============================================================================
   GOBLY DL YT - ADMIN PORTAL DESIGN SYSTEM
   Modern Dark Obsidian Glassmorphism with Neon Accents
   ============================================================================== */

:root {
  --bg-main: #07090e;
  --bg-surface: rgba(15, 20, 32, 0.85);
  --bg-surface-hover: rgba(22, 30, 48, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.6);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-cyan: #38bdf8;
  --accent-indigo: #6366f1;
  --accent-purple: #a855f7;
  --accent-pink: #ec4899;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --grad-primary: linear-gradient(135deg, #6366f1 0%, #38bdf8 100%);
  --grad-sunset: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  --grad-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-card: 0 16px 36px -8px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Complete Cross-Browser Scrollbar Hiding (Mobile + Desktop) */
html, body, * {
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE & Edge */
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Background Ambient Orbs */
.admin-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
}
.glow-top-left {
  top: -100px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: var(--accent-indigo);
}
.glow-bottom-right {
  bottom: -100px;
  right: -100px;
  width: 450px;
  height: 450px;
  background: var(--accent-cyan);
}

/* Navbar */
.admin-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 24px;
}
.navbar-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  filter: drop-shadow(0 0 10px rgba(99,102,241,0.5));
}
.brand-name {
  font-weight: 800;
  font-size: 18px;
  color: var(--text-main);
  letter-spacing: -0.4px;
}
.brand-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.18);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
  text-transform: uppercase;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-nav:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-indigo);
  color: var(--accent-cyan);
}
.btn-nav.danger:hover {
  border-color: var(--accent-rose);
  color: var(--accent-rose);
}

/* Layout Container */
.admin-layout {
  position: relative;
  z-index: 1;
  max-width: 1300px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

/* KPI Metrics Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.4);
}
.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kpi-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-cyan);
}
.kpi-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}
.kpi-meta {
  font-size: 12px;
  color: var(--text-dim);
}

/* Main Dashboard Sections */
.sections-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}
@media (max-width: 960px) {
  .sections-grid {
    grid-template-columns: 1fr;
  }
}

.panel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.panel-card.full-width {
  grid-column: 1 / -1;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 14px;
}
.panel-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
}
.panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}
.panel-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.14);
  color: var(--accent-emerald);
}

/* Form Groups */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.form-hint {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 400;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 11px 14px;
  background: rgba(7, 9, 14, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
}
.form-textarea {
  resize: vertical;
  min-height: 70px;
}

/* Input with inline action */
.input-with-action {
  display: flex;
  gap: 8px;
}
.input-with-action .form-input {
  flex: 1;
}

/* Toggle Switch */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.switch-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.switch-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}
.switch-desc {
  font-size: 12px;
  color: var(--text-dim);
}

.switch-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  cursor: pointer;
}
.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: 0.3s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}
input:checked + .slider {
  background: var(--grad-emerald);
}
input:checked + .slider:before {
  transform: translateX(22px);
}

/* Action Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  background: var(--grad-primary);
  border: none;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
  transition: all 0.2s ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(99, 102, 241, 0.6);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Logs Table */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.logs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
.logs-table th {
  background: rgba(12, 16, 26, 0.95);
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.logs-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}
.logs-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
.status-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}
.status-badge.success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}
.status-badge.error {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

/* Toast Notifications */
.admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(15, 20, 32, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(16px);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.admin-toast.visible {
  transform: translateY(0);
  opacity: 1;
}

/* Login Page Specific Styles */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  backdrop-filter: blur(28px);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  z-index: 1;
}
.login-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.login-logo {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  filter: drop-shadow(0 0 16px rgba(99,102,241,0.6));
}
.login-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}
.strike-warning {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fecdd3;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==============================================================================
   ADMIN RESPONSIVE MOBILE BREAKPOINTS (< 768px and < 480px)
   ============================================================================== */
@media (max-width: 768px) {
  .admin-navbar {
    padding: 10px 14px;
  }
  .navbar-inner {
    flex-wrap: wrap;
    gap: 10px;
  }
  .brand-group {
    gap: 8px;
  }
  .brand-name {
    font-size: 1rem;
  }
  .brand-badge {
    font-size: 10px;
    padding: 2px 6px;
  }
  .nav-actions {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
  }
  .sync-pill {
    padding: 4px 10px;
    font-size: 11px;
  }
  .btn-nav {
    padding: 6px 10px;
    font-size: 12px;
  }
  .admin-layout {
    padding: 16px 12px 40px;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .panel-card {
    padding: 18px 14px;
    border-radius: var(--radius-md);
  }
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .switch-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .input-with-action {
    flex-direction: column;
    gap: 8px;
  }
  .input-with-action .btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 10px;
  }
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }
  .logs-table {
    min-width: 500px;
  }
}

@media (max-width: 480px) {
  .login-body {
    padding: 14px;
  }
  .login-card {
    padding: 26px 18px;
    border-radius: var(--radius-md);
  }
  .login-title {
    font-size: 1.2rem;
  }
  .login-subtitle {
    font-size: 12px;
  }
  .form-input {
    font-size: 14px;
    padding: 12px 14px;
  }
  .btn-primary {
    padding: 12px 16px;
    font-size: 14px;
  }
  .admin-toast {
    left: 14px;
    right: 14px;
    bottom: 14px;
    justify-content: center;
    font-size: 12px;
    padding: 10px 14px;
  }
}

