/* ============================================================
   DISTINCT SOCIAL - Executive Admin Dashboard Stylesheet
   ============================================================ */

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

:root {
  --admin-navy: #02114C;
  --admin-navy-dark: #010A2E;
  --admin-sidebar-bg: #010A2E;
  --admin-accent: #295BD6;
  --admin-accent-hover: #1D4ED8;
  --admin-cyan: #79BDFC;
  --admin-bg: #F1F5F9;
  --admin-card-bg: #FFFFFF;
  --admin-text: #0F172A;
  --admin-text-secondary: #334155;
  --admin-muted: #64748B;
  --admin-border: #CBD5E1;
  --admin-border-light: #E2E8F0;
  
  --sidebar-width: 260px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.1);
  --focus-ring: 0 0 0 4px rgba(41, 91, 214, 0.18);
}

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

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

/* ============================================================
   SIDEBAR NAVIGATION
   ============================================================ */
/* Mobile Top Bar (Hidden by default on Desktop) */
.admin-mobile-topbar {
  display: none;
}

.admin-sidebar {
  width: var(--sidebar-width);
  background-color: var(--admin-sidebar-bg);
  color: #FFFFFF;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  height: 100vh;
  z-index: 1000;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.sidebar-close-btn {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #FFFFFF;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.sidebar-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.brand-dot {
  width: 10px;
  height: 10px;
  background-color: var(--admin-cyan);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px var(--admin-cyan);
}

.sidebar-menu-wrapper {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 12px;
  -webkit-overflow-scrolling: touch;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-icon {
  font-size: 16px;
  width: 22px;
  display: inline-block;
  text-align: center;
}

.sidebar-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.sidebar-menu a.active {
  background: var(--admin-accent);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(41, 91, 214, 0.4);
}

.sidebar-footer {
  flex-shrink: 0;
  padding: 18px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(1, 10, 46, 0.95);
}

.logout-link {
  color: #EF4444 !important;
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  transition: background 0.2s ease;
}

.logout-link:hover {
  background: rgba(239, 68, 68, 0.12);
}

/* ============================================================
   MAIN CONTENT AREA & HEADER
   ============================================================ */
.admin-main {
  margin-left: var(--sidebar-width);
  flex-grow: 1;
  padding: 36px 40px;
  min-width: 0;
}

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

.admin-title h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--admin-navy);
  letter-spacing: -0.02em;
}

.admin-title p {
  color: var(--admin-muted);
  font-size: 14px;
  font-weight: 500;
  margin-top: 4px;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #FFFFFF;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--admin-border-light);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-user:hover {
  border-color: var(--admin-accent);
  box-shadow: var(--shadow-md);
}

.user-name {
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-tag {
  font-size: 11px;
  background: rgba(41,91,214,0.12);
  color: var(--admin-accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 800;
}

.user-email {
  font-size: 12px;
  color: var(--admin-muted);
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--admin-accent);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(41, 91, 214, 0.3);
}

/* ============================================================
   FORM CONTROLS, INPUTS, SELECTS & TEXTAREAS
   ============================================================ */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--admin-text);
  margin-bottom: 8px;
}

label .required {
  color: #EF4444;
}

.form-control, 
.form-select, 
input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="number"], 
input[type="date"], 
input[type="time"], 
input[type="tel"], 
input[type="search"], 
select, 
textarea {
  width: 100%;
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--admin-text);
  background-color: #FFFFFF;
  border: 1.5px solid var(--admin-border);
  border-radius: var(--radius-md);
  padding: 11px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  outline: none;
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
}

.form-control:hover, 
.form-select:hover, 
input:hover, 
select:hover, 
textarea:hover {
  border-color: #94A3B8;
}

.form-control:focus, 
.form-select:focus, 
input:focus, 
select:focus, 
textarea:focus {
  border-color: var(--admin-accent);
  box-shadow: var(--focus-ring);
  background-color: #FFFFFF;
}

.form-control::placeholder, 
textarea::placeholder, 
input::placeholder {
  color: #94A3B8;
  opacity: 1;
}

textarea, textarea.form-control {
  min-height: 100px;
  resize: vertical;
  line-height: 1.6;
}

select.form-select, select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
  padding-right: 42px;
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

/* Checkbox & Radio inputs */
input[type="checkbox"], input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--admin-accent);
  cursor: pointer;
}

/* ============================================================
   BUTTON SYSTEM
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  outline: none;
  line-height: 1.4;
  white-space: nowrap;
}

.btn-primary {
  background: var(--admin-accent);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(41, 91, 214, 0.25);
}

.btn-primary:hover {
  background: var(--admin-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(41, 91, 214, 0.35);
  color: #FFFFFF;
}

.btn-secondary {
  background: #E2E8F0;
  color: var(--admin-text);
  border-color: #CBD5E1;
}

.btn-secondary:hover {
  background: #CBD5E1;
  color: #0F172A;
}

.btn-outline-navy {
  background: transparent;
  color: var(--admin-navy);
  border-color: var(--admin-navy);
}

.btn-outline-navy:hover {
  background: var(--admin-navy);
  color: #FFFFFF;
}

.btn-success {
  background: #10B981;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
  background: #059669;
  transform: translateY(-1px);
  color: #FFFFFF;
}

.btn-danger {
  background: #EF4444;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
  background: #DC2626;
  transform: translateY(-1px);
  color: #FFFFFF;
}

.btn-cyan {
  background: var(--admin-cyan);
  color: var(--admin-navy);
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(121, 189, 252, 0.35);
}

.btn-cyan:hover {
  background: #5aaaf7;
  color: var(--admin-navy);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-xs {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   STATUS BADGES & TAGS
   ============================================================ */
.status-badge, .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.status-pending, .badge-pending {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.status-confirmed, .badge-confirmed {
  background: #D1FAE5;
  color: #047857;
  border: 1px solid #A7F3D0;
}

.status-completed, .badge-completed {
  background: #DBEAFE;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.status-cancelled, .badge-cancelled {
  background: #FEE2E2;
  color: #B91C1C;
  border: 1px solid #FCA5A5;
}

.badge-active, .status-active {
  background: #D1FAE5;
  color: #047857;
  border: 1px solid #A7F3D0;
}

.badge-inactive, .status-inactive {
  background: #F1F5F9;
  color: #64748B;
  border: 1px solid #E2E8F0;
}

/* ============================================================
   CARDS, TABLES & STATS GRID
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--admin-card-bg);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--admin-border-light);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card .title {
  font-size: 12px;
  font-weight: 800;
  color: var(--admin-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.stat-card .value {
  font-size: 34px;
  font-weight: 800;
  color: var(--admin-navy);
  line-height: 1;
}

.content-card {
  background: var(--admin-card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--admin-border-light);
  box-shadow: var(--shadow-md);
  padding: 32px;
  margin-bottom: 32px;
}

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

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.admin-table th {
  padding: 14px 18px;
  background: #F8FAFC;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1.5px solid var(--admin-border-light);
}

.admin-table td {
  padding: 16px 18px;
  border-bottom: 1px solid #F1F5F9;
  font-size: 14px;
  vertical-align: middle;
  color: var(--admin-text-secondary);
}

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

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

/* ============================================================
   MODAL OVERLAYS & DRAWER CARDS
   ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #FFFFFF;
  border-radius: 20px;
  width: 100%;
  max-width: 640px;
  padding: 36px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--admin-border-light);
  max-height: 90vh;
  overflow-y: auto;
}

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

.modal-header h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--admin-navy);
}

.close-modal {
  background: #F1F5F9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--admin-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1;
}

.close-modal:hover {
  background: #E2E8F0;
  color: var(--admin-text);
}

/* ============================================================
   ALERTS & NOTIFICATIONS
   ============================================================ */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-success {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

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

/* Hamburger Button & Mobile Top Bar Styling */
.admin-hamburger-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  width: 40px;
  height: 40px;
  padding: 10px 9px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.admin-hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--admin-cyan);
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #FFFFFF;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(1, 10, 46, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 990;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* ============================================================
   RESPONSIVE DESIGN (TABLETS & MOBILE)
   ============================================================ */
@media (max-width: 992px) {

  /* Display Mobile Top Bar */
  .admin-mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--admin-navy-dark);
    color: #FFFFFF;
    padding: 0 16px;
    z-index: 900;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  }

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

  .mobile-brand-title {
    font-size: 16px;
    font-weight: 800;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
  }

  .mobile-profile-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 12px 4px 4px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-decoration: none;
    transition: background 0.2s ease;
  }

  .mobile-profile-chip:hover {
    background: rgba(255, 255, 255, 0.15);
  }

  .avatar-sm {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--admin-accent);
    color: #FFFFFF;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-username {
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
  }

  /* Admin Sidebar Slide-Over Drawer for Mobile */
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    z-index: 1000;
    transform: translateX(-105%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.4);
  }

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

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

  /* Main Container Offsets */
  .admin-main {
    margin-left: 0;
    margin-top: 64px;
    padding: 24px 16px;
    width: 100%;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 16px;
  }

  .admin-user {
    display: none; /* User avatar is visible in topbar on mobile */
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 576px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .admin-title h1 {
    font-size: 22px;
  }

  .content-card {
    padding: 18px 14px;
    border-radius: var(--radius-md);
  }
}
