/**
 * AiFuture India Foundation — Admin Panel Core Theme
 * Strict 3-Color Dark & Light Mode Theme Engine
 */

:root {
  --admin-bg: #000000;
  --admin-surface: #070a07;
  --admin-card: #0d120d;
  --admin-card-bg: #0d120d;
  --admin-card-hover: #141c14;
  --admin-text: #ffffff;
  --admin-text-muted: #94a394;
  --admin-text2: #e2e8f0;
  --admin-border: rgba(140, 198, 63, 0.22);
  
  --admin-accent: #8cc63f;
  --admin-accent-soft: #9ad44a;
  --admin-accent-dark: #72a532;
  --admin-success: #8cc63f;
  --admin-warning: #8cc63f;
  --admin-danger: #ffffff;
  --admin-info: #8cc63f;
  
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.6);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.7);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.8);
  --shadow-xl: 0 24px 60px rgba(0,0,0,0.9);
  
  --admin-head: #ffffff;
  --admin-bg2: #070a07;
  --admin-muted: #94a394;
}

/* ── Reset & Base Body ── */
* {
  box-sizing: border-box;
}

body.admin-body {
  background: var(--admin-bg);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--admin-text);
  min-height: 100vh;
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  transition: background 0.25s, color 0.25s;
}

.admin-shell {
  min-height: 100vh;
  display: flex;
  background: transparent;
  width: 100%;
}

/* ── Sidebar (Dark Mode Default) ── */
.admin-sidebar {
  width: 270px;
  background: #070a07;
  color: #ffffff;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  border-right: 1px solid rgba(140, 198, 63, 0.22);
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.8);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.admin-sidebar .sidebar-close-btn {
  display: none;
}

.admin-sidebar .brand {
  padding: 22px 16px;
  border-bottom: 1px solid rgba(140, 198, 63, 0.2);
  text-align: center;
  background: rgba(140, 198, 63, 0.06);
  position: relative;
  flex-shrink: 0;
}

.brand-logo-wrap {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #000000;
  border: 2px solid #8cc63f;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  box-shadow: 0 0 20px rgba(140, 198, 63, 0.35);
  padding: 5px;
  overflow: hidden;
  position: relative;
}

.brand-logo-wrap img,
.brand-logo-wrap svg {
  max-width: 100% !important;
  max-height: 100% !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block;
}

.brand-logo-wrap .dark-logo {
  display: block !important;
}

.brand-logo-wrap .light-logo {
  display: none !important;
}

[data-admin-theme="light"] .brand-logo-wrap {
  background: #ffffff !important;
  border-color: #72a532 !important;
  box-shadow: 0 0 12px rgba(114, 165, 50, 0.2) !important;
}

[data-admin-theme="light"] .brand-logo-wrap .dark-logo {
  display: none !important;
}

[data-admin-theme="light"] .brand-logo-wrap .light-logo {
  display: block !important;
}

.admin-sidebar .brand .title {
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.admin-sidebar .brand .subtitle {
  font-size: 11px;
  color: #8cc63f;
  margin-top: 3px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.admin-nav {
  padding: 14px 10px;
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-nav .nav-section {
  margin: 14px 10px 4px;
  padding: 0 4px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #8cc63f;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #94a394;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.admin-nav a i {
  font-size: 15px;
  width: 20px;
  text-align: center;
  color: #94a394;
  transition: color 0.2s;
}

.admin-nav a:hover {
  background: rgba(140, 198, 63, 0.12);
  color: #ffffff;
}

.admin-nav a:hover i {
  color: #8cc63f;
}

.admin-nav a.active {
  background: #8cc63f;
  color: #000000 !important;
  font-weight: 900;
  box-shadow: 0 4px 16px rgba(140, 198, 63, 0.35);
}

.admin-nav a.active i {
  color: #000000 !important;
}

.admin-nav .divider {
  height: 1px;
  background: rgba(140, 198, 63, 0.2);
  margin: 12px 10px;
}

/* ── Main Workspace ── */
.admin-main {
  margin-left: 270px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--admin-bg);
  min-height: 100vh;
  transition: margin-left 0.3s;
}

/* ── Topbar (Dark Mode Default) ── */
.admin-topbar {
  height: 70px;
  background: rgba(0, 0, 0, 0.9);
  border-bottom: 1px solid rgba(140, 198, 63, 0.22);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 900;
  backdrop-filter: blur(20px);
}

.page-title {
  font-size: 19px;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.3px;
}

.admin-sidebar-toggle {
  display: none;
  background: rgba(140, 198, 63, 0.12);
  border: 1px solid rgba(140, 198, 63, 0.3);
  color: #8cc63f;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
}

.admin-content {
  padding: 28px 32px 50px;
  flex: 1;
}

/* ── Cards & Surfaces in Dark Mode ── */
.admin-card, 
.card,
.admin-content > div {
  background: #0d120d;
  border: 1px solid rgba(140, 198, 63, 0.22);
  border-radius: 16px;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  margin-bottom: 24px;
}

.admin-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(140, 198, 63, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #152215 0%, #0d120d 100%) !important;
  color: #ffffff !important;
  border-radius: 15px 15px 0 0;
}

.admin-card-title {
  font-size: 18px;
  font-weight: 900;
  color: #ffffff !important;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-card-title i {
  color: #8cc63f;
}

.admin-card-subtitle {
  font-size: 12.5px;
  color: #94a394 !important;
  margin-top: 2px;
}

.admin-card-body {
  padding: 24px;
  color: #ffffff;
}

/* ── Form Inputs & Textareas in Dark Mode ── */
input.form-control,
textarea.form-control,
select.form-select,
.form-control,
.form-select {
  background: #000000 !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  outline: none !important;
}

input.form-control:focus,
textarea.form-control:focus,
select.form-select:focus,
.form-control:focus,
.form-select:focus {
  border-color: #8cc63f !important;
  box-shadow: 0 0 0 3px rgba(140, 198, 63, 0.25) !important;
  background: #050805 !important;
}

label, .form-label {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  margin-bottom: 6px !important;
}

/* Override inline white background containers in dark mode */
.admin-card-body div[style*="background"],
.admin-content div[style*="background: #fff"],
.admin-content div[style*="background:#fff"],
.admin-content div[style*="background: #f8fafc"],
.admin-content div[style*="background:#f8fafc"] {
  background: #070a07 !important;
  border-color: rgba(140, 198, 63, 0.22) !important;
  color: #ffffff !important;
}

/* Info Alerts */
.alert, .alert-info {
  background: rgba(140, 198, 63, 0.1) !important;
  border: 1px solid rgba(140, 198, 63, 0.3) !important;
  border-left: 4px solid #8cc63f !important;
  color: #ffffff !important;
  border-radius: 12px !important;
}

/* Buttons */
.btn-primary, .btn-success {
  background: #8cc63f !important;
  border-color: #8cc63f !important;
  color: #000000 !important;
  font-weight: 800 !important;
  border-radius: 10px !important;
}

.btn-primary:hover, .btn-success:hover {
  background: #9ad44a !important;
  color: #000000 !important;
  box-shadow: 0 4px 16px rgba(140, 198, 63, 0.35) !important;
}

/* Tables */
.table {
  color: #ffffff !important;
  border-color: rgba(140, 198, 63, 0.15) !important;
}

.table th {
  background: #070a07 !important;
  color: #8cc63f !important;
  border-bottom: 1px solid rgba(140, 198, 63, 0.25) !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
}

.table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: transparent !important;
  color: #ffffff !important;
}

.table tr:hover td {
  background: rgba(140, 198, 63, 0.08) !important;
}

/* ── Sidebar Overlay for Mobile ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

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

/* ── Responsive Mobile & Tablet Rules ── */
@media (max-width: 992px) {
  .admin-sidebar {
    transform: translateX(-100%) !important;
    z-index: 1050 !important;
    box-shadow: 10px 0 50px rgba(0, 0, 0, 0.95);
  }
  
  .admin-shell.is-collapsed .admin-sidebar,
  .admin-sidebar.open,
  .admin-sidebar.active {
    transform: translateX(0) !important;
  }
  
  .admin-main {
    margin-left: 0 !important;
    width: 100% !important;
  }
  
  .admin-sidebar-toggle {
    display: flex !important;
  }
  
  .admin-topbar {
    padding: 0 16px !important;
    height: 60px !important;
  }
  
  .admin-content {
    padding: 16px 12px 60px !important;
  }

  .page-title {
    font-size: 16px !important;
  }

  #currentDateTime {
    display: none !important;
  }

  .admin-card-body {
    padding: 16px !important;
  }

  .table-responsive {
    border-radius: 10px;
    border: 1px solid rgba(140, 198, 63, 0.15);
  }
}

