/* Mother's List (माँ की पर्ची) - Premium Admin Panel Stylesheet */

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

:root {
  --primary: #f26d5b; /* Warm Indian terracotta/orange */
  --primary-hover: #d95341;
  --secondary: #2d6a4f; /* Warm teal/green */
  --accent: #ffb703; /* Marigold Gold */
  --dark-bg: #0f172a; /* Slate 900 */
  --dark-card: #1e293b; /* Slate 800 */
  --text-main: #f8fafc; /* Slate 50 */
  --text-muted: #94a3b8; /* Slate 400 */
  --border: #334155; /* Slate 700 */
  --success: #10b981;
  --info: #0ea5e9;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 16px;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --font: 'Outfit', sans-serif;
}

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

body {
  font-family: var(--font);
  background-color: var(--dark-bg);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
}

/* Auth Pages */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background: radial-gradient(circle at 10% 20%, rgba(242, 109, 91, 0.15) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(45, 106, 79, 0.15) 0%, transparent 40%);
}

.auth-card {
  background: var(--dark-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 420px;
  padding: 40px;
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(10px);
}

.auth-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  object-fit: cover;
}

.auth-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.auth-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 30px;
}

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

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--dark-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: all 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(242, 109, 91, 0.2);
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  gap: 8px;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-block {
  width: 100%;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 6px;
}

/* Alert Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  text-align: left;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
}

/* Admin Dashboard Layout */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  width: 260px;
  background: var(--dark-card);
  border-right: 1px solid var(--border);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 100;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  text-decoration: none;
}

.sidebar-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  object-fit: cover;
}

.sidebar-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

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

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s;
  gap: 12px;
}

.sidebar-link:hover, .sidebar-link.active {
  background: rgba(242, 109, 91, 0.1);
  color: var(--primary);
}

.sidebar-footer {
  margin-top: auto;
}

/* Main Dashboard Area */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 40px;
  min-height: 100vh;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.content-title {
  font-size: 1.8rem;
  font-weight: 700;
}

.content-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

/* Grid & Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.metric-card {
  background: var(--dark-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s;
}

.metric-card:hover {
  transform: translateY(-3px);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
}

.metric-card.green::before { background: var(--secondary); }
.metric-card.gold::before { background: var(--accent); }
.metric-card.blue::before { background: var(--info); }

.metric-info h3 {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
}

.metric-icon {
  font-size: 2.2rem;
  opacity: 0.2;
}

/* Dashboard Section Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

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

.card {
  background: var(--dark-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

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

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
}

/* Data Tables */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

th {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

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

tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

/* Badge styles */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-primary { background: rgba(242, 109, 91, 0.15); color: var(--primary); }
.badge-secondary { background: rgba(45, 106, 79, 0.15); color: var(--secondary); }
.badge-info { background: rgba(14, 165, 233, 0.15); color: var(--info); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

/* Analytics List Item */
.analytic-list {
  list-style: none;
}

.analytic-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.analytic-item:last-child {
  border-bottom: none;
}

.analytic-label {
  font-weight: 500;
}

.analytic-value {
  font-weight: 700;
  color: var(--accent);
}

/* Banner preview */
.banner-preview-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--dark-bg);
  border: 1px solid var(--border);
}

.ad-actions {
  display: flex;
  gap: 8px;
}

/* Upload Image Preview Box */
.image-preview-container {
  margin-top: 10px;
  position: relative;
  width: 100%;
  max-height: 200px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: none;
}

.image-preview-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Responsive side nav hiding if needed, keeping simple for this panel */
@media (max-width: 768px) {
  .sidebar {
    width: 70px;
    padding: 30px 10px;
  }
  .sidebar-title, .sidebar-link span {
    display: none;
  }
  .main-content {
    margin-left: 70px;
    padding: 20px;
  }
}
