/* ==========================================================================
   TOY POODLE PRICE INDIA - ADMIN DASHBOARD STYLES
   ========================================================================== */

:root {
  --admin-bg: #F8F9FA;
  --admin-card: #FFFFFF;
  --admin-border: #E5E7EB;
  --admin-text-main: #111827;
  --admin-text-muted: #6B7280;
  
  --brand-orange: #F97316;
  --brand-orange-hover: #EA580C;
  --brand-orange-soft: #FFF3E3;
  --brand-orange-border: #FED7AA;
  
  --status-published-bg: #E9FBF2;
  --status-published-text: #059669;
  --status-published-border: #A7F3D0;
  
  --status-scheduled-bg: #FFFBEB;
  --status-scheduled-text: #D97706;
  --status-scheduled-border: #FDE68A;
  
  --status-draft-bg: #F3F4F6;
  --status-draft-text: #4B5563;
  --status-draft-border: #E5E7EB;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
  
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', sans-serif;
}

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

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

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

/* ==========================================================================
   ADMIN LAYOUT
   ========================================================================== */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: 260px;
  background: #FFFFFF;
  border-right: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-badge-logo {
  width: 38px;
  height: 38px;
  background: var(--brand-orange);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(249, 115, 22, 0.3);
}

.brand-text-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--admin-text-main);
  line-height: 1.2;
}

.brand-text-title span {
  color: var(--brand-orange);
}

.brand-subtext {
  font-size: 0.72rem;
  color: var(--admin-text-muted);
  font-weight: 600;
}

.sidebar-nav {
  padding: 1.25rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.nav-heading {
  font-size: 0.7rem;
  font-weight: 800;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.5rem 0.75rem 0.25rem 0.75rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  color: #4B5563;
  transition: all 0.2s ease;
}

.sidebar-link:hover {
  background: var(--brand-orange-soft);
  color: var(--brand-orange);
}

.sidebar-link.active {
  background: var(--brand-orange);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}

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

.sidebar-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FCFDFD;
}

.user-info-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.user-avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #E5E7EB;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.user-meta-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--admin-text-main);
  line-height: 1.2;
}

.user-meta-role {
  font-size: 0.72rem;
  color: var(--admin-text-muted);
}

.logout-icon-btn {
  color: #9CA3AF;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.logout-icon-btn:hover {
  color: #EF4444;
  background: #FEE2E2;
}

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

.admin-topbar {
  background: #FFFFFF;
  border-bottom: 1px solid var(--admin-border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-title-box h1 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--admin-text-main);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-body {
  padding: 2rem;
  flex: 1;
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.btn-admin {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-admin-primary {
  background: var(--brand-orange);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}

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

.btn-admin-secondary {
  background: #FFFFFF;
  border-color: var(--admin-border);
  color: #374151;
}

.btn-admin-secondary:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
}

.btn-admin-danger {
  background: #FEE2E2;
  border-color: #FECACA;
  color: #B91C1C;
}

.btn-admin-danger:hover {
  background: #EF4444;
  color: #FFFFFF;
}

.btn-admin-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

/* Status Badges */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-status.published {
  background: var(--status-published-bg);
  color: var(--status-published-text);
  border: 1px solid var(--status-published-border);
}

.badge-status.scheduled {
  background: var(--status-scheduled-bg);
  color: var(--status-scheduled-text);
  border: 1px solid var(--status-scheduled-border);
}

.badge-status.draft {
  background: var(--status-draft-bg);
  color: var(--status-draft-text);
  border: 1px solid var(--status-draft-border);
}

.badge-type {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  background: #F3F4F6;
  color: #4B5563;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* ==========================================================================
   DASHBOARD STAT CARDS
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1.15rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-wrap.orange { background: var(--brand-orange-soft); color: var(--brand-orange); }
.stat-icon-wrap.green  { background: #E9FBF2; color: #10B981; }
.stat-icon-wrap.amber  { background: #FEF3C7; color: #D97706; }
.stat-icon-wrap.blue   { background: #EFF6FF; color: #3B82F6; }

.stat-meta-number {
  font-size: 1.85rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--admin-text-main);
  line-height: 1.1;
}

.stat-meta-label {
  font-size: 0.8rem;
  color: var(--admin-text-muted);
  font-weight: 600;
  margin-top: 0.2rem;
}

/* ==========================================================================
   DATA TABLE CONTAINER & CONTROLS
   ========================================================================== */
.admin-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-toolbar-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #F3F4F6;
  padding: 0.3rem;
  border-radius: var(--radius-md);
}

.tab-pill {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  color: #4B5563;
  transition: all 0.2s ease;
}

.tab-pill.active {
  background: #FFFFFF;
  color: var(--brand-orange);
  box-shadow: var(--shadow-sm);
}

.search-box-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #F9FAFB;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-full);
  padding: 0.45rem 1rem;
  min-width: 260px;
}

.search-box-pill input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.85rem;
  font-family: inherit;
  width: 100%;
}

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

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

.admin-table th {
  background: #F9FAFB;
  border-bottom: 1px solid var(--admin-border);
  padding: 0.95rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: #4B5563;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.admin-table td {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid #F3F4F6;
  vertical-align: middle;
}

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

.post-thumb-cell {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.post-thumb-img {
  width: 65px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--admin-border);
}

.post-title-link {
  font-weight: 700;
  color: var(--admin-text-main);
  font-size: 0.95rem;
  display: block;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.post-title-link:hover {
  color: var(--brand-orange);
}

.post-slug-sub {
  font-size: 0.75rem;
  color: #9CA3AF;
  display: block;
  margin-top: 0.2rem;
}

.views-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #EFF6FF;
  color: #1D4ED8;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid #BFDBFE;
}

.table-actions-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   FORM STYLES (Post Create / Edit)
   ========================================================================== */
.form-card {
  background: #FFFFFF;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  max-width: 900px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  margin-bottom: 1.35rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--admin-text-main);
  margin-bottom: 0.45rem;
}

.form-label .required {
  color: #EF4444;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--admin-text-main);
  background: #FFFFFF;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

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

.form-helper-text {
  font-size: 0.75rem;
  color: var(--admin-text-muted);
  margin-top: 0.35rem;
  display: block;
}

/* Google SERP Preview Card */
.serp-preview-card {
  background: #F9FAFB;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
}

.serp-site-title {
  font-size: 0.8rem;
  color: #202124;
  margin-bottom: 0.2rem;
}

.serp-headline {
  font-size: 1.15rem;
  color: #1a0dab;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.35rem;
}

.serp-description {
  font-size: 0.85rem;
  color: #4d5156;
  line-height: 1.4;
}

/* Alert Notification Banner */
.alert-banner {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.alert-banner.success {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
}

.alert-banner.error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

/* ==========================================================================
   LOGIN SCREEN
   ========================================================================== */
.login-page-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--admin-bg);
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #FFFFFF;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.login-logo-center {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo-circle {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  background: var(--brand-orange);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3);
}

.login-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--admin-text-main);
}

.login-subtitle {
  font-size: 0.85rem;
  color: var(--admin-text-muted);
  margin-top: 0.35rem;
}

/* Responsive */
@media (max-width: 900px) {
  .admin-sidebar {
    display: none;
  }
  .admin-body {
    padding: 1.25rem;
  }
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}
