/**
 * Custom Styles - Pengelolaan Nilai Siswa
 * Extends Bootstrap with custom styling
 */

/* ================================
   CSS Variables / Design Tokens
   ================================ */
:root {
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;

  /* Primary Colors */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;

  /* Neutral Colors */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;

  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --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);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

/* ================================
   Base Styles
   ================================ */
body {
  font-family: var(--font-family);
  background-color: var(--gray-50);
  color: var(--gray-700);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  color: var(--gray-900);
}

/* ================================
   Navbar Customization
   ================================ */
.navbar {
  backdrop-filter: blur(10px);
}

.navbar-brand {
  font-size: 1.25rem;
}

/* ================================
   Cards
   ================================ */
.card {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--gray-200);
  font-weight: 600;
}

/* Dashboard Cards */
.dashboard-card {
  border-left: 4px solid var(--primary-500);
}

.dashboard-card.success {
  border-left-color: var(--success);
}

.dashboard-card.warning {
  border-left-color: var(--warning);
}

.dashboard-card.danger {
  border-left-color: var(--danger);
}

.dashboard-card.info {
  border-left-color: var(--info);
}

.dashboard-card .card-body {
  padding: 1.5rem;
}

.dashboard-card .stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
}

.dashboard-card .stat-label {
  font-size: 0.875rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ================================
   Tables
   ================================ */
.table {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table thead th {
  background: var(--gray-50);
  border-bottom: 2px solid var(--gray-200);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  padding: 1rem;
}

.table tbody td {
  padding: 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--gray-100);
}

.table tbody tr:hover {
  background: var(--gray-50);
}

/* ================================
   Status Badges
   ================================ */
.badge-status {
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-draft {
  background: var(--gray-100);
  color: var(--gray-700);
}

.badge-submitted {
  background: var(--primary-100);
  color: var(--primary-700);
}

.badge-revision {
  background: #fef3c7;
  color: #92400e;
}

.badge-approved {
  background: #d1fae5;
  color: #065f46;
}

/* ================================
   Buttons
   ================================ */
.btn {
  border-radius: var(--radius);
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
}

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

.btn-primary:hover {
  background: var(--primary-700);
  border-color: var(--primary-700);
  transform: translateY(-1px);
}

.btn-icon {
  padding: 0.375rem 0.5rem;
}

/* ================================
   Forms
   ================================ */
.form-control,
.form-select {
  border-radius: var(--radius);
  border-color: var(--gray-300);
  padding: 0.625rem 0.875rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100);
}

.form-label {
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

/* ================================
   Page Header
   ================================ */
.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.page-header .breadcrumb {
  margin-bottom: 0;
  font-size: 0.875rem;
}

/* ================================
   Empty State
   ================================ */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--gray-500);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* ================================
   Loading Spinner
   ================================ */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* ================================
   Animations
   ================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

/* ================================
   Responsive Adjustments
   ================================ */
@media (max-width: 768px) {
  .dashboard-card .stat-number {
    font-size: 1.5rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .table-responsive {
    border-radius: var(--radius-lg);
  }
}
