/* ==========================================================================
   Umbrella Events - Admin Dashboard Stylesheet (Pure PHP)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --admin-navy-900: #04162e;
  --admin-navy-800: #06264f;
  --admin-navy-700: #0d3566;
  --admin-navy-600: #144482;
  --admin-navy-50: #f0f5fc;
  --admin-orange: #fe7a0e;
  --admin-lime: #c4f33b;
  --admin-bg: #f4f7fc;
  --admin-card-bg: #ffffff;
  --admin-text-main: #0b1e36;
  --admin-text-muted: #5d6f85;
  --admin-border: #e2e8f2;
  --admin-danger: #ef4444;
  --admin-success: #10b981;
  --admin-radius: 12px;
  --admin-shadow: 0 4px 20px rgba(6, 38, 79, 0.07);
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--admin-bg);
  color: var(--admin-text-main);
  line-height: 1.5;
  min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--admin-navy-900);
}

/* -------------------------------------------------------------
   Login Page Styling
   ------------------------------------------------------------- */
.admin-login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 80% 20%, rgba(13, 53, 102, 0.35) 0%, transparent 60%),
    linear-gradient(135deg, #04162e 0%, #06264f 50%, #09346b 100%);
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.login-logo {
  max-width: 220px;
  height: auto;
  margin-bottom: 24px;
}

.login-title {
  font-size: 1.7rem;
  margin-bottom: 8px;
  color: var(--admin-navy-900);
}

.login-subtitle {
  font-size: 0.92rem;
  color: var(--admin-text-muted);
  margin-bottom: 28px;
}

.form-group {
  text-align: left;
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--admin-navy-800);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  outline: none;
  transition: all 0.2s ease;
  background: #ffffff;
  color: var(--admin-text-main);
}

.form-control:focus {
  border-color: var(--admin-navy-600);
  box-shadow: 0 0 0 3px rgba(6, 38, 79, 0.12);
}

.btn-primary {
  width: 100%;
  padding: 13px 20px;
  background: var(--admin-navy-800);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--admin-navy-600);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(6, 38, 79, 0.25);
}

.btn-secondary {
  padding: 10px 18px;
  background: #f1f4f9;
  color: var(--admin-navy-800);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-danger {
  background: var(--admin-danger);
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-danger:hover {
  opacity: 0.9;
}

/* -------------------------------------------------------------
   Admin Layout (Left Sidebar + Modern Main Content)
   ------------------------------------------------------------- */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background-color: var(--admin-bg);
  position: relative;
  width: 100%;
}

/* Sidebar Backdrop (Mobile Drawer) */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 22, 46, 0.65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Left Sidebar Navigation */
.admin-sidebar {
  width: 270px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #04162e 0%, #06264f 60%, #082d5e 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 1000;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 4px 0 24px rgba(4, 22, 46, 0.15);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  padding: 20px 20px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  /*background: rgba(0, 0, 0, 0.12);*/
  background: #fff;
  border: 5px solid #072a57;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.sidebar-logo {
  height: 34px;
  width: auto;
  filter: brightness(1.1);
}

.sidebar-badge {
  background: rgba(254, 122, 14, 0.18);
  color: #fe7a0e;
  border: 1px solid rgba(254, 122, 14, 0.35);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sidebar-close-btn {
  display: none;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.sidebar-close-btn:hover {
  color: #ffffff;
}

/* Sidebar Nav Scroll Area */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.sidebar-section-title {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, 0.42);
  text-transform: uppercase;
  padding: 16px 14px 6px;
  margin-top: 4px;
}

.sidebar-section-title:first-child {
  margin-top: 0;
  padding-top: 6px;
}

/* Navigation Tab Buttons (Vertical Sidebar Menu) */
.admin-sidebar .tab-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.72);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  white-space: nowrap;
}

.admin-sidebar .tab-btn svg {
  flex-shrink: 0;
  stroke: currentColor;
  opacity: 0.85;
  transition: transform 0.18s ease, stroke 0.18s ease;
}

.admin-sidebar .tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(3px);
}

.admin-sidebar .tab-btn:hover svg {
  opacity: 1;
}

.admin-sidebar .tab-btn.active {
  background: linear-gradient(90deg, rgba(254, 122, 14, 0.22) 0%, rgba(254, 122, 14, 0.08) 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(254, 122, 14, 0.35);
}

.admin-sidebar .tab-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3.5px;
  background: #fe7a0e;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 8px rgba(254, 122, 14, 0.6);
}

.admin-sidebar .tab-btn.active svg {
  stroke: #fe7a0e;
  opacity: 1;
}

.admin-sidebar .tab-badge {
  margin-left: auto;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-weight: 700;
  line-height: 1.2;
}

.admin-sidebar .tab-btn.active .tab-badge {
  background: #fe7a0e;
  color: #ffffff;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-footer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.18s ease;
}

.sidebar-footer-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sidebar-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 0;
}

.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 9px;
}

.sidebar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fe7a0e, #ff9534);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 800;
}

.sidebar-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
}

.sidebar-logout-icon {
  background: transparent;
  border: none;
  color: #f87171;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s;
}

.sidebar-logout-icon:hover {
  background: rgba(239, 68, 68, 0.18);
}

/* -------------------------------------------------------------
   Main Area & Modern Topbar
   ------------------------------------------------------------- */
.admin-main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-topbar {
  height: 64px;
  background: #ffffff;
  border-bottom: 1px solid var(--admin-border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 95;
  box-shadow: 0 2px 8px rgba(6, 38, 79, 0.025);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-sidebar-toggle {
  display: none;
  background: #f1f5f9;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 8px;
  color: var(--admin-navy-800);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.topbar-crumb-parent {
  color: var(--admin-text-muted);
  font-weight: 500;
}

.topbar-crumb-sep {
  color: #cbd5e1;
  font-weight: 400;
}

.topbar-crumb-current {
  color: var(--admin-navy-900);
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Main Content Area */
.admin-content-area {
  flex: 1;
  padding: 32px 32px 64px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* Fallback shell for backwards compatibility */
.admin-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
}

/* Metric Cards */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.metric-box {
  background: var(--admin-card-bg);
  padding: 24px;
  border-radius: var(--admin-radius);
  border: 1px solid var(--admin-border);
  box-shadow: var(--admin-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-num {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
  color: var(--admin-navy-900);
}

.metric-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--admin-text-muted);
}

.metric-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #f0f5fc;
  color: var(--admin-navy-800);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Content Panel Container */
.content-panel {
  background: var(--admin-card-bg);
  border-radius: var(--admin-radius);
  border: 1px solid var(--admin-border);
  box-shadow: var(--admin-shadow);
  padding: 28px;
  margin-bottom: 32px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.panel-title {
  font-size: 1.4rem;
}

.panel-subtitle {
  font-size: 0.9rem;
  color: var(--admin-text-muted);
  margin-top: 2px;
}

/* Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  background: #f8fafc;
  padding: 12px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--admin-text-muted);
  border-bottom: 1px solid var(--admin-border);
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 16px;
  border-bottom: 1px solid var(--admin-border);
  vertical-align: middle;
  font-size: 0.92rem;
}

.admin-table tr:hover td {
  background-color: #fafcff;
}

.table-thumb {
  width: 68px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  background: #000;
  border: 1px solid var(--admin-border);
}

.table-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-active {
  background: #dcfce7;
  color: #15803d;
}

.badge-inactive {
  background: #f1f5f9;
  color: #64748b;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--admin-border);
  background: #ffffff;
  color: var(--admin-text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: #f1f5fc;
  border-color: var(--admin-navy-600);
  color: var(--admin-navy-800);
}

.btn-icon.delete:hover {
  background: #fee2e2;
  border-color: var(--admin-danger);
  color: var(--admin-danger);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 22, 46, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal-overlay.open .modal-card {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--admin-border);
  padding-bottom: 16px;
}

.modal-title {
  font-size: 1.3rem;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--admin-text-muted);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
  border-top: 1px solid var(--admin-border);
  padding-top: 18px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 20px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--admin-text-main);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  border-left: 5px solid var(--admin-navy-800);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  animation: slideIn 0.3s ease;
}

.toast.success {
  border-left-color: var(--admin-success);
}

.toast.error {
  border-left-color: var(--admin-danger);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Image preview box in modal */
.img-preview-box {
  width: 100%;
  height: 160px;
  border: 2px dashed var(--admin-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fafcff;
  margin-top: 8px;
  position: relative;
}

.img-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* -------------------------------------------------------------
   Responsive Media Queries (Left Sidebar Drawer & Breakpoints)
   ------------------------------------------------------------- */
@media (max-width: 992px) {
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 1000;
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close-btn {
    display: block;
  }

  .mobile-sidebar-toggle {
    display: inline-flex;
  }

  .admin-topbar {
    padding: 0 18px;
  }

  .admin-content-area {
    padding: 24px 18px 48px;
  }
}

@media (max-width: 640px) {

  .topbar-crumb-parent,
  .topbar-crumb-sep {
    display: none;
  }

  .topbar-right span {
    display: none;
  }

  .topbar-right .btn-secondary {
    padding: 8px 10px;
  }

  .content-panel {
    padding: 20px 16px;
  }

  .metrics-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}