/* Admin Portal CSS System - Keerthi Industrial */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,600&display=swap');

:root {
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Poppins', sans-serif;

  --sidebar-bg: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-active: #2563eb;
  --sidebar-text: #94a3b8;
  --sidebar-text-white: #ffffff;

  --bg-workspace: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;

  --text-main: #0f172a;
  --text-muted: #64748b;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary: #0284c7;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;

  --radius: 10px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

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

button, input, select, textarea {
  font-family: var(--font-body);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-workspace);
  color: var(--text-main);
  height: 100vh;
  display: flex;
  overflow: hidden;
}

/* ================= AUTH / LOGIN OVERLAY ================= */
.auth-wrapper {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.5rem;
}

.auth-card {
  background-color: var(--bg-card);
  width: 100%;
  max-width: 440px;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.auth-header h2 {
  font-size: 1.6rem;
  color: var(--text-main);
}

.auth-header p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ================= LAYOUT CONTAINER ================= */
.admin-layout {
  display: flex;
  width: 100vw;
  height: 100vh;
}

/* Sidebar Styling */
.admin-sidebar {
  width: 260px;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text-white);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid #1e293b;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.sidebar-header i {
  color: #60a5fa;
  font-size: 1.4rem;
}

.sidebar-menu {
  list-style: none;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-grow: 1;
  overflow-y: auto;
}

.menu-category-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 0.75rem 0.75rem 0.25rem 0.75rem;
}

.menu-item-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  color: var(--sidebar-text);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.925rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.menu-item-link:hover {
  background-color: var(--sidebar-hover);
  color: var(--sidebar-text-white);
}

.menu-item-link.active {
  background-color: var(--sidebar-active);
  color: var(--sidebar-text-white);
  font-weight: 600;
}

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

.sidebar-footer {
  padding: 1.25rem;
  border-top: 1px solid #1e293b;
  font-size: 0.8rem;
  color: #64748b;
}

/* Main Workspace */
.admin-workspace {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.top-navbar {
  height: 64px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.page-title-display {
  font-size: 1.25rem;
  font-weight: 700;
}

.top-navbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-workspace);
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
}

.workspace-content {
  padding: 2rem;
  overflow-y: auto;
  flex-grow: 1;
}

/* Panel visibility */
.panel-pane {
  display: none;
}

.panel-pane.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.stat-card-info h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.stat-card-info h2 {
  font-size: 2rem;
  color: var(--text-main);
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background-color: #eff6ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

/* ================= FORMS & CARDS ================= */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.card-header-title {
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
  white-space: pre-wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.925rem;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

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

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

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-danger {
  background-color: #fef2f2;
  color: var(--danger);
  border-color: #fca5a5;
}

.btn-danger:hover {
  background-color: var(--danger);
  color: white;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.825rem;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

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

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.data-table tr:hover {
  background-color: #f8fafc;
}
