/* ====================================================================
   PPID SMP NEGERI 115 JAKARTA - DESIGN SYSTEM & MAIN STYLESHEET
   Refined Modern Aesthetic: Deep Royal Navy, Warm Gold, Soft Slate
   ==================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Merriweather:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --primary-navy: #0f2942;
  --primary-navy-dark: #0a1b2d;
  --primary-navy-light: #183e63;
  --accent-gold: #d97706;
  --accent-gold-hover: #b45309;
  --accent-teal: #0d9488;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(15, 41, 66, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 41, 66, 0.1);
  --shadow-lg: 0 10px 25px rgba(15, 41, 66, 0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Merriweather', Georgia, serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-light);
  color: var(--text-main);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--primary-navy-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-gold);
}

/* Header & Top Branding Bar */
.header-top {
  background: var(--primary-navy-dark);
  color: #e2e8f0;
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 2px solid var(--accent-gold);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.top-bar-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-info span {
  margin-right: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.contact-info i {
  color: var(--accent-gold);
}

.header-main {
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.school-logo-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.school-logo-img {
  height: 58px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(15, 41, 66, 0.15));
}

.logo-badge {
  width: 52px;
  height: 52px;
  background: var(--primary-navy);
  color: var(--accent-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(15, 41, 66, 0.2);
}

.school-titles h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-navy);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.school-titles p {
  font-size: 0.85rem;
  color: var(--accent-gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Navigation Menu */
.nav-menu-bar {
  background: var(--primary-navy);
  box-shadow: var(--shadow-md);
}

.nav-links {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
}

.nav-links > li {
  position: relative;
}

.nav-links a {
  display: block;
  padding: 14px 18px;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links li.active > a {
  background: var(--primary-navy-light);
  color: var(--accent-gold);
}

/* Dropdown */
.nav-links li.dropdown:hover .dropdown-menu {
  display: block;
  opacity: 1;
  visibility: visible;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  min-width: 250px;
  box-shadow: var(--shadow-lg);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  overflow: hidden;
  z-index: 110;
  border-top: 3px solid var(--accent-gold);
}

.dropdown-menu a {
  color: var(--text-main);
  padding: 12px 18px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border-color);
}

.dropdown-menu a:hover {
  background: #f1f5f9;
  color: var(--primary-navy);
}

/* Hero Section */
.hero-banner {
  background: linear-gradient(135deg, rgba(15, 41, 66, 0.82), rgba(10, 27, 45, 0.88)), url('../images/hero.jpg') center/cover no-repeat;
  color: #ffffff;
  padding: 65px 0;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  color: #ffffff;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: #cbd5e1;
  margin-bottom: 28px;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(217, 119, 6, 0.2);
  color: #fbbf24;
  border: 1px solid var(--accent-gold);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.25 ease;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: var(--accent-gold);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-gold-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}

.btn-outline:hover {
  background: #ffffff;
  color: var(--primary-navy);
}

.btn-secondary {
  background: var(--primary-navy-light);
  color: #ffffff;
}

.btn-secondary:hover {
  background: var(--primary-navy);
  color: #ffffff;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}

/* Quick Tracking Box in Hero */
.tracking-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  padding: 28px;
  border-radius: var(--radius-lg);
  color: var(--text-main);
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--accent-gold);
}

.tracking-card h3 {
  font-size: 1.25rem;
  color: var(--primary-navy);
  margin-bottom: 8px;
  font-weight: 700;
}

.tracking-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--primary-navy);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.95rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #ffffff;
  font-family: var(--font-sans);
  transition: border-color 0.2s ease;
}

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

textarea.form-control {
  min-height: 110px;
  resize: vertical;
}

/* Page Content Area */
.main-content {
  flex: 1;
  padding: 40px 0 60px;
}

.section-header {
  margin-bottom: 32px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 16px;
  position: relative;
}

.section-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--accent-gold);
}

.section-header h2 {
  font-size: 1.8rem;
  color: var(--primary-navy);
  font-weight: 800;
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

/* Feature Cards Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 28px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-navy-light);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: rgba(15, 41, 66, 0.08);
  color: var(--primary-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.card h3 {
  font-size: 1.2rem;
  color: var(--primary-navy);
  margin-bottom: 10px;
  font-weight: 700;
}

.card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 18px;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  margin-bottom: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  background: #ffffff;
}

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

.table th {
  background: var(--primary-navy);
  color: #ffffff;
  font-weight: 700;
  padding: 14px 18px;
  white-space: nowrap;
}

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

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

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger  { background: #fee2e2; color: #b91c1c; }
.badge-info    { background: #e0f2fe; color: #0369a1; }
.badge-secondary{ background: #f1f5f9; color: #475569; }

/* Timeline / Procedure Step */
.step-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.step-card {
  background: #ffffff;
  padding: 24px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent-gold);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.step-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

/* Official Forms & Printable Styling (Model A, B, C, D, E) */
.official-form-paper {
  background: #ffffff;
  padding: 40px 50px;
  max-width: 900px;
  margin: 0 auto 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-family: var(--font-sans);
}

.form-header-official {
  text-align: center;
  border-bottom: 3px double #000;
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.form-header-official h3 {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-header-official h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 4px;
}

.form-header-official p {
  font-size: 0.85rem;
  color: #475569;
  margin-top: 2px;
}

.form-title-official {
  text-align: center;
  margin: 20px 0;
}

.form-title-official h2 {
  font-size: 1.3rem;
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: underline;
}

.form-title-official p {
  font-size: 0.85rem;
  font-style: italic;
}

.table-form-grid {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.table-form-grid td {
  padding: 8px 12px;
  border: 1px solid #000000;
  vertical-align: top;
  font-size: 0.9rem;
}

.table-form-grid td.bg-head {
  background: #f1f5f9;
  font-weight: 700;
  width: 30%;
}

.signature-block {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 20px;
  text-align: center;
}

.sig-box {
  width: 40%;
}

.sig-space {
  height: 70px;
}

.sig-name {
  font-weight: 700;
  text-decoration: underline;
}

/* Footer */
.footer-main {
  background: var(--primary-navy-dark);
  color: #cbd5e1;
  padding: 50px 0 20px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 8px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 2px;
  background: var(--accent-gold);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent-gold);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
}

/* Alerts */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger  { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }

/* Mobile Navigation Button & Menu Toggle */
.mobile-toggle-btn {
  display: none;
  background: var(--accent-gold);
  color: #ffffff;
  border: none;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin: 8px 0;
  align-items: center;
  gap: 8px;
}

/* Touch-friendly inputs & buttons */
input, select, textarea, button, .btn {
  touch-action: manipulation;
}

/* Admin Submenu Bar Touch Scroll */
.admin-subnav-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 992px) {
  .admin-subnav-container {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }
  .admin-subnav-container .btn {
    flex-shrink: 0;
  }
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .mobile-toggle-btn {
    display: inline-flex;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--primary-navy);
    padding: 8px 0;
    border-radius: var(--radius-sm);
    margin-top: 6px;
  }
  .nav-links.mobile-open {
    display: flex !important;
  }
  .nav-links > li {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .nav-links > li > a {
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    background: var(--primary-navy-dark);
    display: none;
    border-radius: 0;
    padding: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .dropdown:hover .dropdown-menu,
  .dropdown:focus-within .dropdown-menu,
  .dropdown.active .dropdown-menu {
    display: block;
  }
  .dropdown-menu a {
    padding: 10px 24px;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }
  .hero-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .official-form-paper { padding: 20px; }
}

@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
  .top-bar-flex { flex-direction: column; text-align: center; }
  .signature-block { flex-direction: column; gap: 30px; }
  .sig-box { width: 100%; }
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr !important; }
  .hero-title { font-size: 1.55rem !important; }
  .hero-subtitle { font-size: 0.92rem !important; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; text-align: center; justify-content: center; }
  .form-control, .btn, input, select, textarea { font-size: 16px !important; }
}

@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .card { padding: 14px; }
  .badge-tag { font-size: 0.78rem; }
  .btn { padding: 10px 16px; }
}

/* PRINT STYLESHEET FOR OFFICIAL KIP FORMS */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
  }

  .header-top, .header-main, .nav-menu-bar, .footer-main, .no-print, .btn, .hero-banner {
    display: none !important;
  }

  .main-content {
    padding: 0 !important;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .official-form-paper {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
  }

  .table-form-grid td {
    border: 1pt solid #000000 !important;
  }
}
