/* ==========================================================================
   S.R. INAYA ENTERPRISE - Admin Panel Stylesheet
   ========================================================================== */

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

:root {
  --admin-primary: #ea0105;
  --admin-primary-hover: #c40003;
  --admin-secondary: #002480;
  --admin-dark-bg: #071033;
  --admin-sidebar-bg: #050d2b;
  --admin-sidebar-hover: #0d1a4a;
  
  --admin-bg-light: #f4f6fc;
  --admin-card-bg: #ffffff;
  --admin-text-main: #071033;
  --admin-text-muted: #526085;
  --admin-border: #dbe2ef;
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--admin-bg-light);
  color: var(--admin-text-main);
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styles */
.admin-sidebar {
  width: 260px;
  background-color: var(--admin-sidebar-bg);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1100;
  transition: var(--transition);
}

.sidebar-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.sidebar-header img {
  max-height: 36px;
  width: auto;
  background: #ffffff;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.sidebar-menu {
  flex-grow: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.menu-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #7a88b0;
  padding: 0.75rem 1.5rem 0.35rem;
  font-weight: 700;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1.5rem;
  color: #b0bce0;
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.menu-link:hover, .menu-link.active {
  color: #ffffff;
  background: var(--admin-sidebar-hover);
  border-left-color: var(--admin-primary);
}

.menu-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.menu-badge {
  margin-left: auto;
  background: var(--admin-primary);
  color: #ffffff;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 50px;
  font-weight: 700;
}

/* Main Content Area */
.admin-main {
  margin-left: 260px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Admin Top Bar Header */
.admin-topbar {
  height: 64px;
  background: #ffffff;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(7, 16, 51, 0.04);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.admin-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--admin-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Page Content Body */
.admin-content {
  padding: 2rem;
  flex-grow: 1;
}

.page-title-box {
  margin-bottom: 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title-box h1 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: var(--admin-text-main);
  font-weight: 700;
}

.page-subtitle {
  color: var(--admin-text-muted);
  font-size: 0.9rem;
}

/* Grid & Cards */
.stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.admin-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--admin-border);
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(7, 16, 51, 0.04);
}

.stat-card-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-val {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--admin-text-main);
  line-height: 1;
}

.stat-lbl {
  font-size: 0.85rem;
  color: var(--admin-text-muted);
  margin-top: 0.35rem;
  font-weight: 500;
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(234, 1, 5, 0.08);
  color: var(--admin-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon-wrapper svg {
  width: 24px;
  height: 24px;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
  color: var(--admin-text-main);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--admin-border);
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: var(--transition);
  background: #ffffff;
  color: var(--admin-text-main);
}

.form-control:focus {
  outline: none;
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(234, 1, 5, 0.12);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
}

.btn-primary {
  background: var(--admin-primary);
  color: #ffffff;
}

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

.btn-secondary {
  background: var(--admin-secondary);
  color: #ffffff;
}

.btn-secondary:hover {
  background: #00195e;
}

.btn-outline {
  border-color: var(--admin-border);
  color: var(--admin-text-main);
  background: #ffffff;
}

.btn-outline:hover {
  background: var(--admin-bg-light);
}

.btn-danger {
  background: #dc2626;
  color: #ffffff;
}

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

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

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

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

.admin-table th {
  background: #f8fafc;
  padding: 0.85rem 1rem;
  font-weight: 600;
  color: var(--admin-text-muted);
  border-bottom: 1px solid var(--admin-border);
}

.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--admin-border);
  vertical-align: middle;
}

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

.table-img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--admin-border);
}

/* Alert Boxes */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.alert-success {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
}

.alert-danger {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-info { background: #e0f2fe; color: #0369a1; }
