/**
 * Custom Modern Elegant Theme & Smooth Arial Typography
 * CBT TERPADU SMP NEGERI 1 ADIPALA
 */

/* ==========================================================================
   1. GLOBAL TYPOGRAPHY & SMOOTH ARIAL RENDERING
   ========================================================================== */
:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-gradient: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  --success-gradient: linear-gradient(135deg, #047857 0%, #10b981 100%);
  --warning-gradient: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
  --danger-gradient: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);
  --info-gradient: linear-gradient(135deg, #0e7490 0%, #06b6d4 100%);
  --dark-gradient: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

body, html, .main-header, .main-sidebar, .content-wrapper, .modal, .swal2-popup, input, button, select, textarea {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: optimizeLegibility !important;
  letter-spacing: -0.011em;
}

/* Fallback for religious/multilingual exam texts */
.non-latin-text, .text-arabic, .text-mandarin, .text-jawa {
  font-family: 'Noto Sans Arabic', 'Noto Sans SC', 'Noto Sans Javanese', Arial, sans-serif !important;
}

/* ==========================================================================
   2. MODERN SIDEBAR & NAVIGATION STYLES
   ========================================================================== */
.main-sidebar {
  background: #0f172a !important; /* Deep Navy Slate */
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15) !important;
}

.brand-link {
  background: #090d16 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 14px 16px !important;
}

.brand-link .brand-text {
  font-weight: 700 !important;
  letter-spacing: 0.5px;
}

.sidebar {
  padding-top: 10px;
}

.user-panel {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.nav-sidebar .nav-item .nav-link {
  border-radius: 8px !important;
  margin: 2px 8px !important;
  padding: 8px 14px !important;
  font-weight: 500;
  color: #94a3b8 !important;
  transition: all 0.2s ease-in-out;
}

.nav-sidebar .nav-item .nav-link:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #ffffff !important;
  transform: translateX(3px);
}

.nav-sidebar .nav-item .nav-link.active {
  background: var(--primary-gradient) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35) !important;
  font-weight: 600;
}

.nav-sidebar .nav-header {
  color: #64748b !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.8px;
  padding: 12px 16px 4px !important;
}

/* Navbar top styling */
.main-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   3. MODERN CARDS & CONTAINERS
   ========================================================================== */
.content-wrapper {
  background-color: #f8fafc !important; /* Soft modern slate light */
}

.card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: var(--card-shadow) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

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

.card-header {
  background-color: #ffffff !important;
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 14px 20px !important;
  font-weight: 600;
}

.card-header .card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
}

.card.card-outline.card-primary {
  border-top: 4px solid #2563eb !important;
}

.card.card-outline.card-success {
  border-top: 4px solid #10b981 !important;
}

.card.card-outline.card-warning {
  border-top: 4px solid #f59e0b !important;
}

.card.card-outline.card-danger {
  border-top: 4px solid #ef4444 !important;
}

.card.card-outline.card-info {
  border-top: 4px solid #06b6d4 !important;
}

/* ==========================================================================
   4. STAT BOXES & WIDGETS WITH SLEEK ACCENTS
   ========================================================================== */
.small-box {
  border-radius: 12px !important;
  box-shadow: var(--card-shadow) !important;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: none !important;
}

.small-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -3px rgba(0, 0, 0, 0.12) !important;
}

.small-box .inner {
  padding: 20px !important;
}

.small-box .inner h3 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.small-box .inner p {
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.9;
}

.small-box .icon {
  top: 15px !important;
  right: 15px !important;
  opacity: 0.22;
  transition: transform 0.3s ease;
}

.small-box:hover .icon {
  transform: scale(1.1);
  opacity: 0.35;
}

.small-box.bg-info {
  background: var(--info-gradient) !important;
}

.small-box.bg-success {
  background: var(--success-gradient) !important;
}

.small-box.bg-warning {
  background: var(--warning-gradient) !important;
}

.small-box.bg-danger {
  background: var(--danger-gradient) !important;
}

.small-box.bg-primary {
  background: var(--primary-gradient) !important;
}

.small-box-footer {
  background: rgba(0, 0, 0, 0.15) !important;
  padding: 8px 12px !important;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.2s ease;
}

.small-box-footer:hover {
  background: rgba(0, 0, 0, 0.25) !important;
}

/* Info Box */
.info-box {
  border-radius: 12px !important;
  box-shadow: var(--card-shadow) !important;
  border: 1px solid #e2e8f0;
  padding: 14px;
  min-height: 85px;
}

.info-box-icon {
  border-radius: 10px !important;
  font-size: 1.5rem;
}

/* ==========================================================================
   5. BUTTONS, BADGES, & FORM CONTROLS
   ========================================================================== */
.btn {
  border-radius: 8px !important;
  font-weight: 600;
  padding: 7px 16px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background: #2563eb !important;
  border-color: #2563eb !important;
}

.btn-primary:hover {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
}

.btn-success {
  background: #10b981 !important;
  border-color: #10b981 !important;
}

.btn-success:hover {
  background: #059669 !important;
  border-color: #059669 !important;
}

.btn-danger {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
}

.btn-danger:hover {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
}

.btn-warning {
  background: #f59e0b !important;
  border-color: #f59e0b !important;
  color: #fff !important;
}

.badge {
  border-radius: 6px !important;
  padding: 6px 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.form-control, .custom-select {
  border-radius: 8px !important;
  border: 1px solid #cbd5e1;
  padding: 8px 12px;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .custom-select:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

/* ==========================================================================
   6. TABLE STYLING
   ========================================================================== */
.table {
  color: #334155;
}

.table thead th {
  background-color: #f1f5f9;
  color: #1e293b;
  font-weight: 700;
  border-bottom: 2px solid #cbd5e1;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px;
}

.table tbody td {
  padding: 12px;
  vertical-align: middle;
  border-color: #e2e8f0;
}

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

/* ==========================================================================
   7. PULSE & ANIMATION UTILITIES
   ========================================================================== */
@keyframes pulse-red {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.03); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.pulse-violation {
  animation: pulse-red 1.5s infinite;
}

/* ==========================================================================
   8. PORTAL WEBSITE LOGIN LANDING EXPERIENCE
   ========================================================================== */
.portal-body {
  background: radial-gradient(circle at 15% 20%, #1e3a8a 0%, #0f172a 45%, #020617 100%) !important;
  color: #f8fafc;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Website Navigation Bar */
.portal-navbar {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 1050;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.portal-brand {
  display: flex;
  align-items: center;
  text-decoration: none !important;
  color: #ffffff;
}

.portal-brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-right: 12px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.portal-brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.2;
  color: #ffffff;
}

.portal-brand-sub {
  font-size: 0.75rem;
  font-weight: 600;
  color: #93c5fd;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.portal-nav-links {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.portal-nav-links .nav-link,
.portal-nav-item {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  white-space: nowrap !important;
  color: #cbd5e1 !important;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 6px 14px !important;
  border-radius: 8px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-nav-links .nav-link:hover,
.portal-nav-item:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-1px);
}

.portal-status-pill {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  border-radius: 30px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}

.portal-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  margin-right: 8px;
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

/* Hero Section */
.portal-hero {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 40px 0;
}

.portal-badge-hero {
  display: inline-flex;
  align-items: center;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.35);
  color: #93c5fd;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 16px;
}

.portal-hero-title {
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.portal-hero-desc {
  font-size: 1.02rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 24px;
}

/* Feature Cards Grid */
.portal-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.portal-feat-card {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.portal-feat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(96, 165, 250, 0.4);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.portal-feat-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.portal-feat-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.portal-feat-text {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.45;
  margin-bottom: 0;
}

/* Website Footer */
.portal-footer {
  background: rgba(2, 6, 23, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 0 20px;
  font-size: 0.85rem;
  color: #94a3b8;
}

.portal-footer-title {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.portal-footer-link {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.15s;
}

.portal-footer-link:hover {
  color: #60a5fa;
  text-decoration: none;
}

