/* Penna Polymer Products - Admin Panel Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --admin-primary: #0a369d;
  --admin-primary-dark: #072366;
  --admin-accent: #00a896;
  --sidebar-bg: #091326;
  --sidebar-text: #94a3b8;
  --sidebar-hover: #162444;
  --sidebar-active: #1d3557;
  --admin-bg: #f8fafc;
  --admin-surface: #ffffff;
  --admin-border: #e2e8f0;
  --admin-text: #0f172a;
  --admin-muted: #64748b;
  --admin-success: #10b981;
  --admin-warning: #f59e0b;
  --admin-danger: #ef4444;
  --admin-info: #0284c7;
  --radius: 10px;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--admin-bg);
  color: var(--admin-text);
  line-height: 1.5;
  font-size: 14.5px;
}

a {
  color: var(--admin-primary);
  text-decoration: none;
}

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

/* SIDEBAR */
.admin-sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header {
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
}

.sidebar-header img {
  max-height: 32px;
  max-width: 155px;
  object-fit: contain;
}

.sidebar-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.sidebar-header span {
  font-size: 10px;
  color: var(--admin-accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.sidebar-nav {
  padding: 20px 12px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #475569;
  padding: 12px 14px 6px;
  font-weight: 700;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--sidebar-text);
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.2s;
}

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

.sidebar-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.sidebar-link.active {
  background: var(--admin-primary);
  color: #fff;
  font-weight: 600;
}

.sidebar-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 600;
}

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

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #cbd5e1;
}

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

.user-info .name {
  font-weight: 600;
  font-size: 13.5px;
  color: #fff;
}

.user-info .role {
  font-size: 11px;
  color: #94a3b8;
}

/* MAIN CONTENT */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-topbar {
  background: var(--admin-surface);
  border-bottom: 1px solid var(--admin-border);
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 90;
}

.admin-title-area h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-body {
  padding: 32px;
  flex: 1;
}

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

.stat-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  gap: 18px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.06);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.stat-icon.primary { background: #dbeafe; color: #1d4ed8; }
.stat-icon.success { background: #d1fae5; color: #047857; }
.stat-icon.warning { background: #fef3c7; color: #b45309; }
.stat-icon.info { background: #e0f2fe; color: #0369a1; }

.stat-details .value {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--admin-text);
}

.stat-details .label {
  font-size: 13px;
  color: var(--admin-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* CARDS & PANELS */
.panel {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 24px;
  overflow: hidden;
}

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

.panel-title {
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 700;
}

.panel-body {
  padding: 24px;
}

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

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

.admin-table th {
  background: #f8fafc;
  color: var(--admin-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--admin-border);
}

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

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

/* BADGES */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-pill.new, .status-pill.pending { background: #fef3c7; color: #92400e; }
.status-pill.contacted, .status-pill.quoted { background: #dbeafe; color: #1e40af; }
.status-pill.resolved, .status-pill.completed { background: #dcfce7; color: #166534; }
.status-pill.cancelled { background: #fee2e2; color: #991b1b; }

/* BUTTONS */
.btn-admin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 13.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

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

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

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

.btn-admin-outline:hover {
  background: #f1f5f9;
}

.btn-admin-danger {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

.btn-admin-danger:hover {
  background: #ef4444;
  color: #fff;
}

.btn-admin-sm {
  padding: 4px 10px;
  font-size: 12px;
}

/* FORMS */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.admin-form-group {
  margin-bottom: 18px;
}

.admin-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--admin-text);
}

.admin-form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius);
  font-size: 14px;
  background: #fff;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-form-input:focus {
  outline: none;
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(10, 54, 157, 0.12);
}

.admin-form-input:-webkit-autofill,
.admin-form-input:-webkit-autofill:hover, 
.admin-form-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 50px #ffffff inset !important;
  -webkit-text-fill-color: var(--admin-text) !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* LOGIN SCREEN */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.login-card .logo {
  max-width: 250px;
  height: auto;
  display: block;
  margin: 0 auto 22px;
}

.login-card h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  margin-bottom: 6px;
}

.login-card p {
  color: var(--admin-muted);
  font-size: 14px;
  margin-bottom: 26px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .admin-sidebar {
    display: none;
  }
}

/* ==========================================================================
   CONFIRMATION MODAL
   ========================================================================== */
.confirm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.confirm-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.confirm-modal-box {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  padding: 30px 26px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  text-align: center;
  transform: scale(0.92) translateY(8px);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.confirm-modal-backdrop.active .confirm-modal-box {
  transform: scale(1) translateY(0);
}

.confirm-modal-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 0 0 8px #fef2f2;
}

.confirm-modal-icon svg {
  width: 30px;
  height: 30px;
}

.confirm-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.confirm-modal-desc {
  font-size: 14px;
  color: #64748b;
  line-height: 1.55;
  margin-bottom: 16px;
}

.confirm-modal-item {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 22px;
  word-break: break-word;
}

.confirm-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-modal-actions .btn-admin {
  flex: 1;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
}

.confirm-modal-danger-btn {
  background: #dc2626 !important;
  color: #ffffff !important;
  border: 1px solid #dc2626 !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
  transition: all 0.2s ease;
}

.confirm-modal-danger-btn:hover {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
}

