/* =============================================
   Dr. Alfred Smith — Admin Portal Styles
   ============================================= */

:root {
  --admin-sidebar-w: 220px;
  --admin-bg: #f4f2f8;
  --admin-card: #ffffff;
  --admin-border: #e2ddf0;
  --purple: #6a4fa0;
  --purple-dark: #4e3a78;
  --navy: #1c1c2e;
  --gold: #c9851a;
  --gold-light: #e0a030;
  --success: #2e7d52;
  --success-bg: #eaf7f0;
  --text-dark: #1a1a1a;
  --text-mid: #555;
  --text-light: #888;
}

.admin-body {
  background: var(--admin-bg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
}

/* =============================================
   LOGIN
   ============================================= */

.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  padding: 2rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--purple-dark) 100%);
}

.login-card {
  background: var(--admin-card);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  text-align: center;
}

.login-logo {
  margin-bottom: 1rem;
}

.login-title {
  font-family: 'Georgia', serif;
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.login-sub {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.login-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-form .field-group {
  position: relative;
}

.toggle-pw {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%) translateY(11px);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-light);
  padding: 0;
}

.login-error {
  background: #fdecea;
  color: #b71c1c;
  font-size: 0.85rem;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  border-left: 3px solid #b71c1c;
}

.btn-login {
  width: 100%;
  padding: 0.75rem;
  background: var(--gold);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 0.5rem;
}
.btn-login:hover { background: var(--gold-light); }

.login-back {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
}
.login-back a {
  color: var(--purple);
  text-decoration: none;
}
.login-back a:hover { text-decoration: underline; }

/* =============================================
   SHARED FORM FIELDS
   ============================================= */

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-mid);
}

.field-group input,
.field-group select,
.field-group textarea {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-dark);
  background: #fff;
  transition: border-color 0.2s;
  width: 100%;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(106,79,160,0.12);
}

/* =============================================
   SIDEBAR
   ============================================= */

.sidebar {
  width: var(--admin-sidebar-w);
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  transition: transform 0.25s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-family: 'Georgia', serif;
  font-size: 1rem;
  color: #fff;
  font-weight: bold;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.1rem;
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.15s;
  cursor: pointer;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}

.nav-item.active {
  color: var(--gold-light);
  border-left-color: var(--gold);
  background: rgba(201,133,26,0.1);
}

.nav-icon { font-size: 0.95rem; width: 18px; text-align: center; }

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-link {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  text-align: center;
}
.sidebar-link:hover { color: rgba(255,255,255,0.8); }

.btn-logout {
  padding: 0.5rem;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-logout:hover {
  background: rgba(255,255,255,0.13);
  color: #fff;
}

/* =============================================
   MAIN CONTENT
   ============================================= */

.dash-main {
  margin-left: var(--admin-sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dash-header {
  background: var(--admin-card);
  border-bottom: 1px solid var(--admin-border);
  padding: 1rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--navy);
}

.dash-greeting h2 {
  font-size: 1.05rem;
  font-family: 'Georgia', serif;
  color: var(--navy);
}

.dash-date {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* =============================================
   SECTIONS
   ============================================= */

.dash-section {
  display: none;
  padding: 2rem 1.75rem;
  flex: 1;
}
.dash-section.active { display: block; }

.section-title {
  font-family: 'Georgia', serif;
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.section-desc {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* =============================================
   STAT CARDS
   ============================================= */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 1.25rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.stat-icon {
  font-size: 1.5rem;
  padding-top: 0.1rem;
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  font-weight: 600;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.stat-note {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* =============================================
   OVERVIEW COLS
   ============================================= */

.overview-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.overview-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.overview-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--admin-border);
  padding-bottom: 0.6rem;
}

.empty-state {
  font-size: 0.88rem;
  color: var(--text-light);
  text-align: center;
  padding: 1rem 0;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.activity-item {
  font-size: 0.85rem;
  padding: 0.5rem 0.7rem;
  background: var(--admin-bg);
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.activity-item .tag {
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag-urgent  { background: #fdecea; color: #b71c1c; }
.tag-normal  { background: #e8f4fd; color: #1565c0; }
.tag-low     { background: #f3f4f6; color: #555; }

.quick-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.quick-links li a {
  display: block;
  font-size: 0.9rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  color: var(--purple);
  text-decoration: none;
  transition: background 0.15s;
}
.quick-links li a:hover {
  background: var(--admin-bg);
}

/* =============================================
   ADMIN FORM
   ============================================= */

.admin-form {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 1.75rem;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.btn-primary {
  padding: 0.7rem 1.5rem;
  background: var(--gold);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  align-self: flex-start;
}
.btn-primary:hover { background: var(--gold-light); }
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; }

.coming-soon-tag {
  font-size: 0.7rem;
  background: rgba(255,255,255,0.25);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  margin-left: 0.3rem;
  vertical-align: middle;
}

.success-banner {
  margin-top: 1rem;
  max-width: 700px;
  padding: 0.85rem 1.1rem;
  background: var(--success-bg);
  color: var(--success);
  border-left: 4px solid var(--success);
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.92rem;
}

/* =============================================
   REQUEST LIST
   ============================================= */

.submitted-requests {
  margin-top: 2rem;
  max-width: 700px;
}

.submitted-requests h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.request-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.request-item {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.88rem;
}

.request-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.request-item-title {
  font-weight: 700;
  color: var(--navy);
}

.request-item-meta {
  font-size: 0.78rem;
  color: var(--text-light);
}

.request-item-desc {
  color: var(--text-mid);
  line-height: 1.5;
}

/* =============================================
   PLACEHOLDER PANELS
   ============================================= */

.placeholder-panel {
  background: var(--admin-card);
  border: 2px dashed var(--admin-border);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  max-width: 600px;
}

.placeholder-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.placeholder-panel h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.6rem;
}

.placeholder-panel p {
  color: var(--text-mid);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
  display: inline-flex;
}

.feature-list li {
  font-size: 0.88rem;
  color: var(--success);
  font-weight: 500;
}

.events-toolbar {
  margin-bottom: 1.25rem;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .dash-main {
    margin-left: 0;
  }
  .sidebar-toggle {
    display: block;
  }
  .overview-cols {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .dash-section {
    padding: 1.25rem 1rem;
  }
}
