/* Modern Senior-Architect Admin Panel Styling for Kunal Tilak CMS */
@import url('https://fonts.googleapis.com/css2?family=Alegreya:wght@700&family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --admin-primary: #F4821E;
  --admin-primary-dark: #d96f12;
  --admin-dark: #151522;
  --admin-sidebar-bg: #151522;
  --admin-card-bg: #ffffff;
  --admin-body-bg: #f4f5f8;
  --admin-text-main: #1e293b;
  --admin-border-color: #e2e8f0;
}

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

body {
  font-family: 'IBM Plex Sans', sans-serif;
  background-color: var(--admin-body-bg);
  color: var(--admin-text-main);
  min-height: 100vh;
  display: flex;
}

/* LOGIN SCREEN */
.loginContainer {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--admin-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.loginCard {
  background: #ffffff;
  width: 100%;
  max-width: 420px;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.loginHeader h2 {
  font-family: 'Alegreya', serif;
  font-size: 28px;
  color: var(--admin-primary);
  margin-bottom: 8px;
  text-align: center;
}

.loginHeader p {
  font-size: 14px;
  color: #64748b;
  text-align: center;
  margin-bottom: 25px;
}

.btnLogin {
  width: 100%;
  background: var(--admin-primary);
  color: #ffffff;
  border: none;
  padding: 14px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 15px;
  transition: background 0.2s ease;
}

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

/* APP CONTAINER */
.appContainer {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  width: 270px;
  background: var(--admin-sidebar-bg);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar .brand {
  padding: 25px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar .brand h2 {
  font-family: 'Alegreya', serif;
  font-size: 24px;
  color: var(--admin-primary);
  text-transform: uppercase;
}

.sidebar .brand span {
  font-size: 12px;
  color: #94a3b8;
  display: block;
  margin-top: 2px;
}

.navTabs {
  list-style: none;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.navTabs li a.navTab {
  padding: 12px 24px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: block;
  border-left: 4px solid transparent;
  transition: all 0.2s ease;
}

.navTabs li a.navTab:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.05);
}

.navTabs li a.navTab.active {
  color: #ffffff;
  background: rgba(244,130,30,0.15);
  border-left-color: var(--admin-primary);
  font-weight: 600;
}

/* MAIN CONTENT */
.mainContent {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--admin-body-bg);
  min-width: 0;
}

.topBar {
  background: #ffffff;
  padding: 20px 35px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--admin-border-color);
}

.topBar h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--admin-text-main);
}

.userBadge {
  display: flex;
  align-items: center;
  gap: 15px;
}

.userBadge span {
  font-size: 14px;
  font-weight: 600;
  color: #475569;
}

.btnLogout {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btnLogout:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* CONTENT BODY */
.contentBody {
  padding: 35px;
  overflow-y: auto;
  flex: 1;
}

.tabSection {
  display: none;
}

.tabSection.active {
  display: block;
}

/* DASHBOARD STATS GRID */
.statsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.statCard {
  background: #ffffff;
  padding: 24px;
  border-radius: 10px;
  border: 1px solid var(--admin-border-color);
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.statCard h4 {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.statNumber {
  font-size: 32px;
  font-weight: 700;
  color: var(--admin-primary);
}

/* CARDS & FORMS */
.cardBox {
  background: #ffffff;
  padding: 30px;
  border-radius: 12px;
  border: 1px solid var(--admin-border-color);
  margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.cardBox h3 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 20px;
}

.formGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

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

.formGroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.formGroup.fullWidth {
  grid-column: 1 / -1;
}

.formGroup label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.formGroup input[type="text"],
.formGroup input[type="email"],
.formGroup input[type="url"],
.formGroup input[type="password"],
.formGroup select,
.formGroup textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
  font-family: 'IBM Plex Sans', sans-serif;
  color: #1e293b;
  transition: border-color 0.2s ease;
}

.formGroup input:focus,
.formGroup select:focus,
.formGroup textarea:focus {
  outline: none;
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(244,130,30,0.15);
}

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

.imagePreview {
  max-width: 160px;
  max-height: 120px;
  object-fit: cover;
  border-radius: 6px;
  margin-top: 8px;
  border: 1px solid #cbd5e1;
  display: block;
}

.btnSubmit {
  background: var(--admin-primary);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

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

.btnRemoveImg {
  background: #ef4444;
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 8px;
  display: inline-block;
  transition: background 0.2s ease;
}

.btnRemoveImg:hover {
  background: #dc2626;
}

/* TABLES */
.adminTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.adminTable th,
.adminTable td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--admin-border-color);
  font-size: 14px;
}

.adminTable th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.adminTable tr:hover {
  background: #f8fafc;
}

.actionBtn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.btnEdit {
  background: #3b82f6;
  color: #ffffff;
}

.btnEdit:hover {
  background: #2563eb;
}

.btnDelete {
  background: #ef4444;
  color: #ffffff;
}

.btnDelete:hover {
  background: #dc2626;
}

/* Toggle Switch Styling */
.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 28px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #10b981;
}

input:focus + .slider {
  box-shadow: 0 0 1px #10b981;
}

input:checked + .slider:before {
  transform: translateX(24px);
}

.visibilityGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.visibilityCard {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.visibilityCard h4 {
  font-size: 15px;
  color: #1e293b;
  margin-bottom: 4px;
}

.visibilityCard p {
  font-size: 12px;
  color: #64748b;
}

