/* GAGAK KECIL - Crime Reporting Platform */
/* Black & White Theme with Digital Font */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500;600;700&display=swap');

:root {
  --black: #000000;
  --white: #ffffff;
  --gray-dark: #1a1a1a;
  --gray: #333333;
  --gray-light: #666666;
  --gray-lighter: #999999;
  --gradient-primary: linear-gradient(135deg, #000000 0%, #434343 100%);
  --gradient-hover: linear-gradient(135deg, #434343 0%, #000000 100%);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
}

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

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
  background-color: var(--black);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
}

/* Animated Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.02) 2px,
      rgba(255, 255, 255, 0.02) 4px
    );
  pointer-events: none;
  z-index: 0;
  animation: scan 8s linear infinite;
}

@keyframes scan {
  0% { transform: translateY(0); }
  100% { transform: translateY(50px); }
}

/* Code Animation */
@keyframes code-rain {
  0% { transform: translateY(-100%); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(100vh); opacity: 0; }
}

.code-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.code-line {
  position: absolute;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  animation: code-rain 15s linear infinite;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}

/* Header/Navbar */
.navbar {
  background: var(--gradient-primary);
  padding: 1rem 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid var(--white);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 2px;
}

.logo img {
  height: 50px;
  width: 50px;
  filter: brightness(0) invert(1);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  font-size: 0.9rem;
}

.nav-links a:hover {
  border: 1px solid var(--white);
  background: rgba(255, 255, 255, 0.1);
}

/* .btn used inside the nav needs to win over the .nav-links a rule above,
   otherwise it inherits white-on-white text (invisible "Daftar" button) */
.nav-links a.btn {
  color: var(--black);
  background: var(--white);
  border: 2px solid var(--white);
  padding: 0.6rem 1.25rem;
}

.nav-links a.btn:hover {
  color: var(--white);
  background: var(--black);
}

/* Dropdown Menu */
.nav-links li.has-dropdown,
.nav-links li.has-dropdown-sub {
  position: relative;
}

.nav-links .dropdown,
.nav-links .dropdown-sub {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--black);
  border: 1px solid var(--white);
  list-style: none;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

.nav-links .dropdown-sub {
  top: 0;
  left: 100%;
  margin-left: 1px;
}

.nav-links li.has-dropdown:hover > .dropdown,
.nav-links li.has-dropdown-sub:hover > .dropdown-sub,
.nav-links li.has-dropdown.active > .dropdown,
.nav-links li.has-dropdown-sub.active > .dropdown-sub {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-links .dropdown li,
.nav-links .dropdown-sub li {
  width: 100%;
}

.nav-links .dropdown a,
.nav-links .dropdown-sub a {
  display: block;
  padding: 0.75rem 1.25rem;
  border: none;
  color: var(--white);
  font-size: 0.85rem;
  white-space: nowrap;
  border-left: 3px solid transparent;
}

.nav-links .dropdown a:hover,
.nav-links .dropdown-sub a:hover {
  background: var(--gray-dark);
  border-left-color: var(--white);
  border: none;
  border-left: 3px solid var(--white);
}

.dropdown-arrow {
  font-size: 0.7em;
  margin-left: 4px;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--white);
  transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Section */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 10;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  animation: glitch 3s infinite;
}

@keyframes glitch {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(-2px, 2px); }
  94% { transform: translate(2px, -2px); }
  96% { transform: translate(-2px, -2px); }
  98% { transform: translate(2px, 2px); }
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--gray-lighter);
  letter-spacing: 1px;
}

/* Indonesian Flag Animation */
.flag-animation {
  display: inline-block;
  width: 60px;
  height: 40px;
  margin: 1rem 0;
  box-shadow: var(--shadow);
  animation: wave 3s ease-in-out infinite;
  position: relative;
}

.flag-red {
  width: 100%;
  height: 50%;
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
}

.flag-white {
  width: 100%;
  height: 50%;
  background: linear-gradient(135deg, #ffffff 0%, #eeeeee 100%);
}

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--white);
  color: var(--black);
  text-decoration: none;
  font-weight: 600;
  border: 2px solid var(--white);
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Fira Code', monospace;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.9rem;
}

.btn:hover {
  background: var(--black);
  color: var(--white);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
}

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

/* Section */
.section {
  padding: 5rem 0;
  position: relative;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 100px;
  height: 3px;
  background: var(--white);
  margin: 1rem auto;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.admin-dashboard-grid {
  grid-template-columns: 2fr 1fr;
}

.admin-dashboard-grid .span-2 {
  grid-column: span 1;
}

@media (max-width: 1024px) {
  .admin-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--gray-dark);
  border: 1px solid var(--gray);
  padding: 2rem;
  transition: all 0.3s;
  box-shadow: var(--shadow);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--white);
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

.card p {
  color: var(--gray-lighter);
  line-height: 1.8;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--white);
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  background: var(--gray-dark);
  border: 1px solid var(--gray);
  color: var(--white);
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--white);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

select.form-control {
  cursor: pointer;
}

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

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--gray-dark);
  margin: 2rem 0;
}

.table th,
.table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray);
}

.table th {
  background: var(--black);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
}

.table tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.detail-row {
  display: none;
}

.detail-row.show {
  display: table-row;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.badge-success {
  color: #00ff00;
  border-color: #00ff00;
  background: rgba(0, 255, 0, 0.1);
}

.badge-warning {
  color: #ffff00;
  border-color: #ffff00;
  background: rgba(255, 255, 0, 0.1);
}

.badge-danger {
  color: #ff0000;
  border-color: #ff0000;
  background: rgba(255, 0, 0, 0.1);
}

.badge-info {
  color: #00ffff;
  border-color: #00ffff;
  background: rgba(0, 255, 255, 0.1);
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-card {
  background: var(--gradient-primary);
  padding: 2rem;
  text-align: center;
  border: 1px solid var(--white);
  transition: all 0.3s;
}

.stat-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--gray-lighter);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Level Progress */
.level-progress {
  margin: 2rem 0;
}

.progress-bar-container {
  width: 100%;
  height: 30px;
  background: var(--gray-dark);
  border: 1px solid var(--white);
  position: relative;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ffffff 0%, #666666 100%);
  transition: width 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--black);
}

/* Alerts */
.alert {
  padding: 1rem;
  margin: 1rem 0;
  border-left: 4px solid;
  background: var(--gray-dark);
}

.alert-success {
  border-color: #00ff00;
  color: #00ff00;
}

.alert-error {
  border-color: #ff0000;
  color: #ff0000;
}

.alert-info {
  border-color: #00ffff;
  color: #00ffff;
}

/* Footer */
.footer {
  background: var(--black);
  border-top: 2px solid var(--white);
  padding: 3rem 0 1rem;
  margin-top: 5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer h4 {
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 0.5rem;
}

.footer a {
  color: var(--gray-lighter);
  text-decoration: none;
  transition: color 0.3s;
}

.footer a:hover {
  color: var(--white);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--gray);
  color: var(--gray-lighter);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    background: var(--black);
    width: 100%;
    height: calc(100vh - 70px);
    height: calc(100dvh - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 0 2rem;
    margin: 0;
    transition: left 0.3s;
    border-top: 2px solid var(--white);
    z-index: 999;
  }

  .nav-links.active {
    left: 0;
  }

  /* Dim/lock the page behind the open menu */
  body.nav-open {
    overflow: hidden;
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid var(--gray-dark);
  }

  .nav-links > li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    width: 100%;
    padding: 0.9rem 1.5rem;
  }

  .nav-links a.btn {
    width: calc(100% - 3rem);
    margin: 0.75rem 1.5rem;
    text-align: center;
  }

  .nav-links .dropdown,
  .nav-links .dropdown-sub {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    width: 100%;
    background: var(--gray-dark);
    border: none;
    box-shadow: none;
    margin-left: 0;
    padding: 0;
  }

  .nav-links li.has-dropdown.active > .dropdown,
  .nav-links li.has-dropdown-sub.active > .dropdown-sub {
    display: block;
  }

  .nav-links .dropdown a,
  .nav-links .dropdown-sub a {
    padding-left: 2.5rem;
  }

  .nav-links .dropdown-sub a {
    padding-left: 3.5rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .table {
    font-size: 0.85rem;
  }
  
  .table th,
  .table td {
    padding: 0.5rem;
  }

  /* Stacked/responsive tables: no horizontal scrolling on mobile.
     Each row becomes a card and each cell becomes a labeled line. */
  .table-stack {
    border: none;
  }

  .table-stack thead {
    display: none;
  }

  .table-stack,
  .table-stack tbody,
  .table-stack tr {
    display: block;
    width: 100%;
  }

  .table-stack tr {
    margin-bottom: 1rem;
    background: var(--gray-dark);
    border: 1px solid var(--gray);
  }

  .table-stack td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    text-align: right;
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid var(--gray);
    word-break: break-word;
  }

  .table-stack td:last-child {
    border-bottom: none;
  }

  .table-stack td::before {
    content: attr(data-label);
    flex-shrink: 0;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: var(--gray-lighter);
  }

  .table-stack td[data-label=""]::before,
  .table-stack td:not([data-label])::before {
    display: none;
  }

  .table-stack td.detail-cell {
    display: block;
    text-align: left;
  }

  .table-stack .detail-row {
    background: transparent;
    border: none;
    margin-bottom: 1rem;
  }

  .table-stack .detail-row:not(.show) {
    display: none;
  }
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }
.flex { display: flex; }
.flex-between { justify-content: space-between; }
.flex-center { justify-content: center; align-items: center; }
.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }

/* Image Modal (Pop-up) */
.img-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  animation: fadeIn 0.3s ease;
}

.img-modal.active {
  display: flex;
}

.img-modal img {
  max-width: 100%;
  max-height: 90vh;
  border: 2px solid var(--white);
  box-shadow: 0 0 60px rgba(255, 255, 255, 0.3);
}

.img-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: var(--white);
  font-size: 3rem;
  cursor: pointer;
  background: transparent;
  border: none;
  font-family: monospace;
  transition: transform 0.3s;
}

.img-modal-close:hover {
  transform: rotate(90deg);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.clickable-img {
  cursor: pointer;
  transition: transform 0.3s;
}

.clickable-img:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

/* Rekening Judol Table */
.rekening-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--gray-dark);
  font-family: 'Fira Code', monospace;
}

.rekening-table th,
.rekening-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray);
  vertical-align: middle;
}

.rekening-table th {
  background: var(--black);
  color: var(--white);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
  border-bottom: 2px solid var(--white);
}

.rekening-table tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.rekening-table .rek-nomor {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  letter-spacing: 1px;
  color: #00ff00;
}

.rekening-table .bank-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--black);
  border: 1px solid var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.rekening-table .rek-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 1px solid var(--white);
  cursor: pointer;
}

.rekening-table .no-image {
  color: var(--gray-lighter);
  font-style: italic;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .rekening-table {
    font-size: 0.8rem;
  }
  .rekening-table th,
  .rekening-table td {
    padding: 0.5rem;
  }
  .rekening-table .rek-thumb {
    width: 40px;
    height: 40px;
  }
}

/* Laporan Terbaru - 1:1 Carousel Slider */
.report-slider-wrap {
  position: relative;
  margin-top: 2rem;
}

.report-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 1.5rem;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.report-slider::-webkit-scrollbar {
  display: none;
}

.report-slide {
  flex: 0 0 100%;
  max-width: 420px;
  margin: 0 auto;
  scroll-snap-align: center;
  background: var(--gray-dark);
  border: 1px solid var(--gray);
  box-shadow: var(--shadow);
}

.report-slide-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--white);
}

.report-slide-body {
  padding: 1.5rem;
}

.slider-arrow {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  border: 1px solid var(--white);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.slider-arrow:hover {
  background: var(--white);
  color: var(--black);
}

.slider-prev {
  left: -5px;
}

.slider-next {
  right: -5px;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.slider-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gray);
  border: 1px solid var(--gray-lighter);
  cursor: pointer;
  padding: 0;
}

.slider-dot.active {
  background: var(--white);
  border-color: var(--white);
}

@media (max-width: 600px) {
  .slider-arrow {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
  .slider-prev {
    left: 0;
  }
  .slider-next {
    right: 0;
  }
}
