/* Modern Admin CSS - Jari Aljabar */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap");

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --secondary: #0ea5e9;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #0f172a;
  --light: #f8fafc;
  --text-main: #334155;
  --text-muted: #64748b;
  --sidebar-bg: #1e293b;
  --sidebar-hover: #334155;
  --card-bg: #ffffff;
  --border-radius: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg:
    0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background-color: #f1f5f9;
  color: var(--text-main);
  line-height: 1.5;
}

/* Auth Pages (Login) */
.login-page {
  background: linear-gradient(135deg, #4f46e5 0%, #0ea5e9 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: white;
  padding: 3rem;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  width: 100%;
  max-width: 420px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.login-header h2 {
  font-weight: 700;
  color: var(--dark);
  font-size: 1.5rem;
  margin-top: 1rem;
}

/* Controls */
.form-control {
  border-radius: 12px;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.btn-primary {
  background-color: var(--primary);
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 10px -1px rgba(79, 70, 229, 0.3);
}

/* Sidebar & Layout */
.admin-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  background-color: var(--sidebar-bg);
  color: #fff;
  flex-shrink: 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  transition: all 0.3s;
  z-index: 1000;
}

.sidebar-header {
  padding: 2rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-menu {
  padding: 1rem;
}

.nav-link {
  color: #94a3b8;
  padding: 0.875rem 1rem;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s;
}

.nav-link i {
  font-size: 1.1rem;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  background: linear-gradient(
    90deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 2rem;
  width: calc(100% - 280px);
}

/* Dashboard Cards */
.stat-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  height: 100%;
}

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

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-label {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
}

.stat-icon {
  position: absolute;
  right: 1.5rem;
  top: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  opacity: 0.2;
}

.bg-soft-primary {
  background-color: #e0e7ff;
  color: var(--primary);
}
.bg-soft-warning {
  background-color: #fef3c7;
  color: var(--warning);
}
.bg-soft-success {
  background-color: #d1fae5;
  color: var(--success);
}
.bg-soft-danger {
  background-color: #fee2e2;
  color: var(--danger);
}

/* Tables */
.card {
  background: white;
  border-radius: var(--border-radius);
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.card-header {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  padding: 1.5rem;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.table {
  margin-bottom: 0;
}

.table th {
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 1rem 1.5rem;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.table td {
  padding: 1rem 1.5rem;
  vertical-align: middle;
  color: var(--text-main);
  border-bottom: 1px solid #e2e8f0;
}

.badge {
  padding: 0.5em 0.8em;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 1rem;
  }
}
