/* ============================================================
   ZyroWeb — Unified Responsive Admin Stylesheet (assets/css/admin.css)
   Clean, modern, and 100% responsive for Laptop, Tablet & Mobile (HP)
   ============================================================ */

/* Base Admin Reset & Font */
.admin-body {
  background-color: var(--slate-50, #F8FAFC);
  color: var(--gray-800, #1E293B);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-main {
  flex: 1;
  padding: 24px 0 60px;
}

/* ============================================================
   ADMIN TOP NAVIGATION (Desktop, Laptop & Mobile)
   ============================================================ */
.admin-nav-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #0F172A;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-nav {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

/* Brand Link */
.admin-nav-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.admin-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #FFFFFF;
}

.admin-brand-icon {
  font-size: 20px;
  line-height: 1;
}

.admin-brand-name {
  font-family: 'Space Grotesk', var(--font-heading), sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.admin-brand-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #38BDF8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Mobile Topbar Actions */
.admin-nav-mobile-actions {
  display: none;
  align-items: center;
  gap: 8px;
}

/* Hamburger Toggle Button */
.admin-hamburger-btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
  transition: all 0.2s ease;
}

.admin-hamburger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: #F1F5F9;
  border-radius: 2px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-hamburger-btn.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.admin-hamburger-btn.is-active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.admin-hamburger-btn.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Collapsible Menu Container */
.admin-nav-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 16px;
}

.admin-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.admin-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #CBD5E1;
  text-decoration: none;
  transition: all 0.2s ease;
}

.admin-nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #38BDF8;
}

.admin-nav-link.active {
  background: var(--blue-600, #2563EB);
  color: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.admin-link-icon {
  font-size: 14px;
}

/* Nav Extras */
.admin-nav-extras {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.admin-btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1.2;
}

.admin-btn-web {
  background: rgba(255, 255, 255, 0.08);
  color: #E2E8F0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.admin-btn-web:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
}

.admin-btn-logout {
  background: rgba(239, 68, 68, 0.15);
  color: #FCA5A5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.admin-btn-logout:hover {
  background: #EF4444;
  color: #FFFFFF;
  border-color: #EF4444;
}

/* Mobile Drawer Overlay */
.admin-mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 32, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1040;
}

.admin-mobile-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   RESPONSIVE NAVBAR MEDIA QUERIES (Laptop & Mobile)
   ============================================================ */
@media (max-width: 1199px) {
  .admin-nav-link {
    padding: 6px 10px;
    font-size: 13px;
    gap: 4px;
  }
}

@media (max-width: 1023px) {
  .admin-nav-mobile-actions {
    display: inline-flex;
  }

  .admin-lang-desktop,
  .admin-theme-desktop {
    display: none !important;
  }

  .admin-nav-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 290px;
    max-width: 85vw;
    height: 100vh;
    background: #0F172A;
    box-shadow: -8px 0 25px rgba(0, 0, 0, 0.5);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 70px 20px 24px;
    gap: 16px;
    z-index: 1045;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
  }

  .admin-nav-menu.is-open {
    right: 0 !important;
  }

  .admin-nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
  }

  .admin-nav-link {
    padding: 10px 14px;
    font-size: 14.5px;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
  }

  .admin-nav-extras {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
  }

  .admin-btn-action {
    width: 100%;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
  }
}

/* ============================================================
   ADMIN DASHBOARD COMPONENTS & CARDS
   ============================================================ */
.admin-welcome-banner {
  background: linear-gradient(135deg, #1E3A8A 0%, #0F172A 100%);
  border-radius: 16px;
  padding: 24px 28px;
  color: #FFFFFF;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.15);
}

.admin-welcome-title {
  font-family: 'Space Grotesk', var(--font-heading), sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 4px 0 6px;
}

.admin-welcome-desc {
  color: #BFDBFE;
  font-size: 13.5px;
  margin: 0;
  line-height: 1.5;
}

.admin-welcome-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Stats Grid (Responsive Laptop & HP) */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

@media (max-width: 1199px) {
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .admin-stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.stat-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color, #E2E8F0);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
}

.stat-card-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #64748B);
}

.stat-card-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--blue-600, #2563EB);
  margin: 8px 0;
  font-family: 'Space Grotesk', var(--font-heading), sans-serif;
  line-height: 1.1;
}

.stat-card-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-600, #2563EB);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stat-card-link:hover {
  text-decoration: underline;
}

/* ============================================================
   RESPONSIVE DATA TABLES
   ============================================================ */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid var(--border-color, #E2E8F0);
  background: #FFFFFF;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.data-table th {
  background: var(--slate-100, #F1F5F9);
  color: var(--text-primary, #0F172A);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color, #E2E8F0);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color, #E2E8F0);
  font-size: 13.5px;
  color: var(--text-secondary, #334155);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: #F8FAFC;
}

/* Action Buttons */
.action-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.btn-icon-only {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-edit {
  background: #EFF6FF;
  color: #1D4ED8;
}

.btn-edit:hover {
  background: #2563EB;
  color: #FFFFFF;
}

.btn-delete {
  background: #FEE2E2;
  color: #B91C1C;
}

.btn-delete:hover {
  background: #DC2626;
  color: #FFFFFF;
}

.btn-view {
  background: #F1F5F9;
  color: #475569;
}

.btn-view:hover {
  background: #334155;
  color: #FFFFFF;
}

/* ============================================================
   RESPONSIVE ADMIN FORMS & CARDS
   ============================================================ */
.admin-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.admin-page-title {
  font-family: 'Space Grotesk', var(--font-heading), sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary, #0F172A);
  margin: 0 0 6px;
}

.admin-page-subtitle {
  color: var(--text-muted, #64748B);
  font-size: 14px;
  margin: 0;
}

.admin-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color, #E2E8F0);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color, #E2E8F0);
}

.admin-card-title {
  font-family: 'Space Grotesk', var(--font-heading), sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary, #0F172A);
  margin: 0;
}

.admin-card-body {
  position: relative;
}

.admin-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}

.admin-alert-success {
  background: #DCFCE7;
  border: 1px solid #86EFAC;
  color: #166534;
}

.admin-alert-danger {
  background: #FEE2E2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
}

.admin-alert-icon {
  font-size: 16px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .admin-card {
    padding: 16px;
  }
  .admin-welcome-banner {
    padding: 18px 20px;
  }
  .admin-welcome-title {
    font-size: 19px;
  }
  .admin-page-title {
    font-size: 20px;
  }
}

.admin-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .admin-grid-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary, #0F172A);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color, #CBD5E1);
  border-radius: 8px;
  font-size: 14px;
  background: #FFFFFF;
  color: var(--text-primary, #0F172A);
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--blue-600, #2563EB);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Tag Inputs */
.tag-input-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1.5px solid var(--border-color, #CBD5E1);
  border-radius: 8px;
  min-height: 48px;
  cursor: text;
  background: #FFFFFF;
}

.tag-item {
  background: #EFF6FF;
  color: #1D4ED8;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tag-remove {
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  color: #3B82F6;
}

.tag-remove:hover {
  color: #EF4444;
}

.tag-input {
  border: none;
  outline: none;
  font-size: 13.5px;
  flex: 1;
  min-width: 120px;
  background: transparent;
  font-family: inherit;
}

/* Image Drop Zone */
.img-drop-zone {
  border: 2px dashed var(--border-color, #CBD5E1);
  border-radius: 12px;
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #F8FAFC;
}

.img-drop-zone:hover,
.img-drop-zone.drag-over {
  border-color: #2563EB;
  background: #EFF6FF;
}

.img-drop-zone .drop-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.img-drop-zone p {
  font-size: 13px;
  color: #64748B;
  margin: 0;
}

.img-drop-zone input[type="file"] {
  display: none;
}

.current-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: #F8FAFC;
  border-radius: 10px;
  border: 1px solid var(--border-color, #E2E8F0);
  margin-top: 10px;
}

.current-preview img {
  width: 90px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border-color, #E2E8F0);
}

.current-preview .preview-info {
  flex: 1;
}

.current-preview .preview-info p {
  font-size: 12px;
  color: #64748B;
  margin: 2px 0 0;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  display: none;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #CBD5E1;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #FFFFFF;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: #2563EB;
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* ============================================================
   ADMIN FOOTER
   ============================================================ */
.admin-footer {
  background: #0F172A;
  color: #94A3B8;
  padding: 18px 0;
  font-size: 12.5px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-dot {
  width: 8px;
  height: 8px;
  background: #22C55E;
  border-radius: 50%;
  box-shadow: 0 0 8px #22C55E;
}

.admin-footer-meta {
  color: #64748B;
  display: inline-flex;
  gap: 8px;
}

@media (max-width: 768px) {
  .admin-footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================================
   DARK MODE ADMIN (Official ZyroWeb Palette)
   ============================================================ */
[data-theme="dark"] .admin-body {
  background-color: #0B1220 !important;
  color: #F1F5F9 !important;
}

[data-theme="dark"] .admin-nav-header {
  background: #0B1220;
  border-color: #2A3B55;
}

[data-theme="dark"] .admin-nav-menu {
  background: #0B1220;
}

[data-theme="dark"] .stat-card,
[data-theme="dark"] .admin-card,
[data-theme="dark"] .table-responsive {
  background: #17243A !important;
  border-color: #2A3B55 !important;
}

[data-theme="dark"] .stat-card-value {
  color: #4D9FFF;
}

[data-theme="dark"] .stat-card-label {
  color: #B8C5D8;
}

[data-theme="dark"] .data-table th {
  background: #111C2E !important;
  color: #F1F5F9 !important;
  border-color: #2A3B55 !important;
}

[data-theme="dark"] .data-table td {
  border-color: #2A3B55 !important;
  color: #CBD5E1 !important;
}

[data-theme="dark"] .data-table tr:hover td {
  background: #1C2D47 !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .tag-input-wrap,
[data-theme="dark"] .img-drop-zone {
  background: #111C2E !important;
  border-color: #2A3B55 !important;
  color: #F1F5F9 !important;
}

[data-theme="dark"] .form-label {
  color: #F1F5F9 !important;
}

[data-theme="dark"] .btn-edit {
  background: rgba(37, 99, 235, 0.2);
  color: #93C5FD;
}

[data-theme="dark"] .btn-delete {
  background: rgba(239, 68, 68, 0.2);
  color: #FCA5A5;
}

[data-theme="dark"] .btn-view {
  background: rgba(255, 255, 255, 0.08);
  color: #CBD5E1;
}

[data-theme="dark"] .current-preview {
  background: #111C2E;
  border-color: #2A3B55;
}

[data-theme="dark"] .admin-footer {
  background: #070B14;
  border-color: #17243A;
}

[data-theme="dark"] .admin-page-title,
[data-theme="dark"] .admin-card-title {
  color: #F1F5F9 !important;
}

[data-theme="dark"] .admin-page-subtitle {
  color: #94A3B8 !important;
}

[data-theme="dark"] .admin-card-header {
  border-color: #2A3B55 !important;
}

[data-theme="dark"] .admin-alert-success {
  background: rgba(34, 197, 94, 0.15) !important;
  border-color: rgba(34, 197, 94, 0.3) !important;
  color: #86EFAC !important;
}

[data-theme="dark"] .admin-alert-danger {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #FCA5A5 !important;
}

/* Sticky Action Bar */
.admin-sticky-bar {
  position: sticky;
  bottom: 20px;
  z-index: 90;
  background: #FFFFFF;
  border: 1px solid var(--border-color, #E2E8F0);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .admin-sticky-bar {
    flex-direction: column;
    align-items: stretch;
    bottom: 12px;
    padding: 14px;
    text-align: center;
  }
  .admin-sticky-bar button {
    width: 100%;
  }
}

[data-theme="dark"] .admin-sticky-bar {
  background: #17243A !important;
  border-color: #2A3B55 !important;
}


