/* ============================================================
   CBT SMP NEGERI 49 JAKARTA - MAIN CSS DESIGN SYSTEM
   Responsive, Fast, Modern, and Lightweight Architecture
   ============================================================ */

/* System UI Font Stack - Ultra fast, native, zero-latency offline loading */
:root {
  --primary: #1e3a8a;       /* Deep Academic Navy Blue */
  --primary-hover: #1d4ed8;
  --secondary: #0284c7;     /* Sky Blue Accent */
  --accent: #f59e0b;        /* Gold Accent */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #0f172a;
  --light: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text-main: #334155;
  --text-muted: #64748b;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.25s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f1f5f9;
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--dark);
  font-weight: 700;
  line-height: 1.3;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary);
}

/* Base Layout Containers */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  padding: 1.5rem;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
}

/* Header & Navbar */
.app-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: white;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-wrapper {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo {
  width: 45px;
  height: 45px;
  background: white;
  color: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.brand-info h1 {
  color: white;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.brand-info p {
  font-size: 0.75rem;
  opacity: 0.85;
}

.user-nav-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-badge {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  padding: 0.4rem 0.85rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Buttons System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  text-decoration: none;
}

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

.btn-secondary {
  background-color: var(--secondary);
  color: white;
}
.btn-secondary:hover {
  background-color: #0369a1;
  color: white;
}

.btn-success {
  background-color: var(--success);
  color: white;
}
.btn-success:hover {
  background-color: #059669;
}

.btn-warning {
  background-color: var(--warning);
  color: white;
}
.btn-warning:hover {
  background-color: #d97706;
}

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

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-main);
}
.btn-outline:hover {
  background: #f8fafc;
  border-color: var(--text-muted);
}

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

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--dark);
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  font-family: inherit;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: white;
  color: var(--text-main);
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--secondary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Cards & Panels */
.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.card-header {
  padding: 1.25rem 1.5rem;
  background: #fafafa;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
}

.card-body {
  padding: 1.5rem;
}

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

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

.table th {
  background-color: #f8fafc;
  color: var(--dark);
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--border);
}

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

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

/* Badges Modern Kontras Tinggi (Kotak Style) */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 800;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
  line-height: 1.2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.badge-primary { background: #e0f2fe !important; color: #0369a1 !important; border: 1px solid #bae6fd !important; }
.badge-success { background: #dcfce7 !important; color: #15803d !important; border: 1px solid #86efac !important; }
.badge-warning { background: #fef3c7 !important; color: #b45309 !important; border: 1px solid #fde68a !important; }
.badge-danger  { background: #fee2e2 !important; color: #b91c1c !important; border: 1px solid #fca5a5 !important; }
.badge-secondary { background: #f1f5f9 !important; color: #475569 !important; border: 1px solid #cbd5e1 !important; }

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.alert-info { background: #e0f2fe; border-color: #bae6fd; color: #0369a1; }
.alert-success { background: #d1fae5; border-color: #a7f3d0; color: #065f46; }
.alert-warning { background: #fef3c7; border-color: #fde68a; color: #92400e; }
.alert-danger  { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }

/* Footer */
.app-footer {
  background: white;
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* Media Queries for Mobile Responsiveness */
@media (max-width: 768px) {
  .main-content {
    padding: 1rem;
  }

  .header-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .user-nav-profile {
    width: 100%;
    justify-content: space-between;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}
