/* ===================================================
   VIOLET ADMIN - Purple Themed Dashboard Stylesheet
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --admin-primary: #7c3aed;
  --admin-primary-dark: #4c1d95;
  --admin-sidebar-bg: #2e1065;
  --admin-sidebar-hover: #4c1d95;
  --admin-sidebar-active: #6b21a8;
  --admin-sidebar-text: #e9d5ff;
  --admin-accent: #a855f7;
  --admin-bg: #f5f3ff;
  --admin-card: #ffffff;
  --admin-border: #e9e5f5;
  --admin-text-main: #1e1b4b;
  --admin-text-muted: #64748b;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  
  --shadow-admin: 0 4px 18px rgba(76, 29, 149, 0.08);
  --shadow-purple: 0 8px 24px rgba(124, 58, 237, 0.25);
}

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

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

/* ===================================================
   Admin Sidebar
   =================================================== */
.admin-sidebar {
  width: 260px;
  background: linear-gradient(180deg, #2e1065 0%, #3b0764 50%, #4c1d95 100%);
  color: var(--admin-sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo-icon {
  width: 38px;
  height: 38px;
  background: #a855f7;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
}

.sidebar-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.sidebar-title span {
  font-size: 0.75rem;
  display: block;
  color: #d8b4fe;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-menu {
  list-style: none;
  padding: 20px 14px;
  flex: 1;
  overflow-y: auto;
}

.sidebar-heading {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #c4b5fd;
  padding: 10px 12px 6px;
  font-weight: 600;
}

.sidebar-item {
  margin-bottom: 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  color: #e9d5ff;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.sidebar-link i {
  width: 20px;
  text-align: center;
  font-size: 1.05rem;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transform: translateX(4px);
}

.sidebar-link.active {
  background: #7c3aed;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.15);
}

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

.user-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.user-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.2;
}

.user-role {
  font-size: 0.72rem;
  color: #c4b5fd;
}

/* ===================================================
   Admin Main Content Layout
   =================================================== */
.admin-main {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--admin-border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 2px 8px rgba(76, 29, 149, 0.03);
}

.admin-page-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--admin-text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

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

/* ===================================================
   Dashboard Stats Cards (Purple Gradient)
   =================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--admin-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--admin-border);
  box-shadow: var(--shadow-admin);
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
}

.stat-card.purple-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #581c87 100%);
  color: #ffffff;
  border: none;
  box-shadow: var(--shadow-purple);
}

.stat-card.purple-primary .stat-title {
  color: #e9d5ff;
}

.stat-card.purple-primary .stat-value {
  color: #ffffff;
}

.stat-card.purple-primary .stat-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: #f3e8ff;
  color: var(--admin-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
}

.stat-info {
  flex: 1;
}

.stat-title {
  font-size: 0.85rem;
  color: var(--admin-text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--admin-text-main);
  line-height: 1.2;
}

/* ===================================================
   Admin Card & Data Tables
   =================================================== */
.admin-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--admin-border);
  box-shadow: var(--shadow-admin);
  margin-bottom: 28px;
  overflow: hidden;
}

.admin-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #faf8ff;
}

.admin-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--admin-text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  background: #f3e8ff;
  color: #4c1d95;
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
  border-bottom: 2px solid #d8b4fe;
}

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

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

/* Buttons in Admin */
.btn-primary-purple {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #ffffff;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

.btn-primary-purple:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #581c87 100%);
  color: white;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.btn-outline-danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

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

.btn-outline-primary {
  background: #f3e8ff;
  color: #7c3aed;
  border: 1px solid #d8b4fe;
}

.btn-outline-primary:hover {
  background: #7c3aed;
  color: #ffffff;
}

/* Image Upload Preview Box */
.image-preview-wrapper {
  border: 2px dashed #c4b5fd;
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  background: #faf5ff;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.image-preview-wrapper:hover {
  border-color: #7c3aed;
  background: #f3e8ff;
}

.image-preview-img {
  max-height: 200px;
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  box-shadow: var(--shadow-admin);
  object-fit: contain;
}

/* ===================================================
   Admin Login Screen (Purple Glassmorphism)
   =================================================== */
.admin-login-body {
  background: linear-gradient(135deg, #1e1b4b 0%, #3b0764 45%, #581c87 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-login-header {
  text-align: center;
  margin-bottom: 28px;
}

.admin-login-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%);
  color: white;
  border-radius: 16px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: var(--shadow-purple);
}

.admin-login-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--admin-text-main);
  margin-bottom: 6px;
}

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

/* Responsive Admin */
@media (max-width: 992px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  .admin-sidebar.show {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0;
  }
}
