/* ====================================================
   Rashtriya Gaushala - Admin Panel Stylesheet
   ==================================================== */

:root {
  --primary: #d97706; /* Saffron/Amber brand color */
  --primary-dark: #b45309;
  --primary-light: #fef3c7;
  --sidebar-bg: #1e293b;
  --sidebar-hover: #334155;
  --sidebar-active: #0f172a;
  --body-bg: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --purple: #8b5cf6;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  background-color: var(--body-bg);
  color: var(--text-main);
  min-height: 100vh;
}

/* ====================================================
   Login Page Styles
   ==================================================== */
.login-body {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  background: #ffffff;
  width: 100%;
  max-width: 420px;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.login-header {
  background: #fff;
  padding: 30px 30px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.login-header .logo-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 12px;
}

.login-header h2 {
  font-size: 20px;
  color: #0f172a;
  margin-bottom: 4px;
}

.login-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.login-body-content {
  padding: 30px;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #334155;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  background: #fff;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.input-with-icon {
  position: relative;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.input-with-icon .form-control {
  padding-left: 40px;
}

.btn-primary {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.login-hint {
  margin-top: 20px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  font-size: 12px;
  color: #475569;
  text-align: center;
}

.alert-danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 18px;
  display: none;
}

.back-to-site {
  display: block;
  text-align: center;
  margin-top: 15px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}
.back-to-site:hover {
  color: var(--primary);
}

/* ====================================================
   Admin Layout: 25% Sidebar / 75% Content
   ==================================================== */
.admin-navbar {
  height: 60px;
  background: #0f172a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  border-bottom: 1px solid #334155;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-navbar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.admin-navbar .brand i {
  color: var(--primary);
  font-size: 20px;
}

.admin-navbar .nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-right .view-site-link {
  color: #cbd5e1;
  font-size: 13px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #334155;
  border-radius: 6px;
  transition: all 0.2s;
}

.nav-right .view-site-link:hover {
  color: #fff;
  background: #475569;
}

.admin-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.admin-user-pill .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* Main Two-Column Layout (25% / 75%) */
.admin-wrapper {
  display: flex;
  width: 100%;
  min-height: calc(100vh - 60px);
}

/* Left Sidebar - STRICT 25% */
.admin-sidebar {
  width: 25%;
  flex: 0 0 25%;
  max-width: 25%;
  background: var(--sidebar-bg);
  color: #cbd5e1;
  padding: 24px 0;
  border-right: 1px solid #334155;
  display: flex;
  flex-direction: column;
}

.sidebar-profile {
  padding: 0 24px 20px 24px;
  border-bottom: 1px solid #334155;
  margin-bottom: 15px;
}

.sidebar-profile .role-badge {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 2px;
}

.sidebar-profile .admin-name {
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
}

.sidebar-nav li {
  margin-bottom: 4px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 24px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 4px solid transparent;
}

.sidebar-nav a .item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-nav a i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.sidebar-nav a:hover {
  background: var(--sidebar-hover);
  color: #ffffff;
}

.sidebar-nav a.active {
  background: var(--sidebar-active);
  color: #ffffff;
  border-left-color: var(--primary);
  font-weight: 600;
}

.sidebar-nav a.active i {
  color: var(--primary);
}

.sidebar-nav .badge {
  background: var(--primary);
  color: #ffffff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.sidebar-nav a.logout-btn {
  color: #f87171;
}
.sidebar-nav a.logout-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Right Content Area - STRICT 75% */
.admin-content {
  width: 75%;
  flex: 0 0 75%;
  max-width: 75%;
  background: var(--body-bg);
  padding: 28px 32px;
  overflow-y: auto;
}

/* Content Views */
.content-view {
  display: none;
}
.content-view.active {
  display: block;
  animation: fadeIn 0.25s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.view-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.view-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ====================================================
   Statistics Cards (Dashboard View)
   ==================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.stat-info .stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.stat-info .stat-value {
  font-size: 30px;
  font-weight: 700;
  color: #0f172a;
}

.stat-info .stat-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-card.total .stat-icon { background: #eff6ff; color: var(--info); }
.stat-card.today .stat-icon { background: #ecfdf5; color: var(--success); }
.stat-card.pending .stat-icon { background: #fffbeb; color: var(--warning); }
.stat-card.resolved .stat-icon { background: #f5f3ff; color: var(--purple); }

/* Dashboard Detail Boxes */
.dashboard-sections {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.card-box {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  padding: 22px;
  margin-bottom: 24px;
}

.card-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.card-box-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.counting-list {
  list-style: none;
}

.counting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}
.counting-item:last-child {
  border-bottom: none;
}

.counting-item .item-title {
  font-size: 14px;
  color: #334155;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.counting-item .item-count {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

/* ====================================================
   All Enquiries List Table
   ==================================================== */
.table-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  max-width: 320px;
}

.search-input-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-input-wrap input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
}
.search-input-wrap input:focus {
  border-color: var(--primary);
}

.filter-controls {
  display: flex;
  gap: 10px;
}

.filter-select {
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  outline: none;
}

.btn-secondary {
  padding: 9px 16px;
  background: #0f172a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}
.btn-secondary:hover {
  background: #334155;
}

.table-responsive {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

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

.admin-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

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

.badge-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
.badge-new { background: #eff6ff; color: #1d4ed8; }
.badge-contacted { background: #fef3c7; color: #b45309; }
.badge-resolved { background: #ecfdf5; color: #047857; }

.action-btns {
  display: flex;
  gap: 6px;
}

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

.btn-icon:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.btn-icon.delete:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

/* ====================================================
   Change Password Form
   ==================================================== */
.password-card {
  max-width: 520px;
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: modalPop 0.2s ease-out;
}

@keyframes modalPop {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h4 {
  font-size: 16px;
  font-weight: 600;
}
.modal-close {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body {
  padding: 22px;
  font-size: 14px;
}

.detail-row {
  margin-bottom: 14px;
}
.detail-row strong {
  display: inline-block;
  width: 110px;
  color: #64748b;
  font-size: 13px;
}

.modal-footer {
  padding: 14px 22px;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Responsive adjustment for small screens */
@media screen and (max-width: 900px) {
  .admin-wrapper {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
    border-right: none;
    border-bottom: 1px solid #334155;
  }
  .admin-content {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
    padding: 20px 16px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-sections {
    grid-template-columns: 1fr;
  }
}

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