/* ===================================================
   Web Antrean Sewa GoPay - Modern Aesthetic Design
   =================================================== */

:root {
  --bg-main: #0b0f19;
  --bg-card: rgba(17, 24, 39, 0.85);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --border-color: rgba(255, 255, 255, 0.09);
  --border-focus: rgba(0, 170, 19, 0.6);
  
  --primary: #00aa13;          /* Gojek/GoPay Emerald Green */
  --primary-glow: rgba(0, 170, 19, 0.4);
  --secondary: #00aed6;        /* GoPay Cyan Accent */
  --secondary-glow: rgba(0, 174, 214, 0.35);
  --accent: #6366f1;           /* Indigo Accent */
  --danger: #ef4444;           /* Red Expired/Cancel */
  --warning: #f59e0b;          /* Amber Warning/Calling */
  --success: #10b981;          /* Green Success */

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(0, 170, 19, 0.25);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 170, 19, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(0, 174, 214, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Container */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px;
}

.container-wide {
  max-width: 1300px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  gap: 10px;
}

.nav-btn {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.nav-btn:hover {
  color: var(--text-main);
  background: var(--bg-glass);
  border-color: var(--border-color);
}

.nav-btn.active {
  color: #fff;
  background: rgba(0, 170, 19, 0.2);
  border-color: var(--primary);
}

/* Glass Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
  transition: border-color 0.2s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.card-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 4px;
}

/* Trust Banner */
.trust-banner {
  background: linear-gradient(135deg, rgba(0, 170, 19, 0.15), rgba(0, 174, 214, 0.1));
  border: 1px solid rgba(0, 170, 19, 0.35);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.trust-icon {
  font-size: 26px;
  color: var(--primary);
  flex-shrink: 0;
}

.trust-content h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #34d399;
  margin-bottom: 4px;
}

.trust-content p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

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

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-label span.req {
  color: var(--danger);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(15, 23, 42, 0.95);
}

.form-control::placeholder {
  color: var(--text-dim);
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 5px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #008810);
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-full {
  width: 100%;
}

/* Ticket Hero Card */
.ticket-card {
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(0, 170, 19, 0.4);
  box-shadow: var(--shadow-glow);
}

.ticket-number-badge {
  display: inline-block;
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  background: linear-gradient(135deg, #00e01c, #00aed6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 10px 0;
  text-shadow: 0 0 20px var(--primary-glow);
}

.ticket-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

/* Status Badges */
.badge-waiting {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.badge-linking {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.5);
  animation: pulse-border 1.5s infinite;
}

.badge-verifying {
  background: rgba(0, 174, 214, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(0, 174, 214, 0.5);
  animation: pulse-border 2s infinite;
}

.badge-completed {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.badge-expired, .badge-cancelled {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Countdown Clock */
.timer-container {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.timer-digits {
  font-family: 'Courier New', Courier, monospace;
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fbbf24;
  text-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
}

.timer-digits.warning {
  color: #ef4444;
  text-shadow: 0 0 15px rgba(239, 68, 68, 0.7);
  animation: pulse-digits 0.8s infinite alternate;
}

@keyframes pulse-digits {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0.8; transform: scale(1.03); }
}

.timer-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Instructions Step Box */
.steps-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 20px 0;
  text-align: left;
}

.steps-list {
  list-style: none;
  counter-reset: queue-step;
}

.step-item {
  counter-increment: queue-step;
  position: relative;
  padding-left: 42px;
  margin-bottom: 16px;
}

.step-item:last-child {
  margin-bottom: 0;
}

.step-item::before {
  content: counter(queue-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
}

.step-item strong {
  color: #fff;
  display: block;
  font-size: 0.92rem;
  margin-bottom: 2px;
}

.step-item p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Upload Dropzone */
.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.4);
  transition: all 0.2s ease;
  position: relative;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: rgba(0, 170, 19, 0.08);
}

.dropzone-icon {
  font-size: 38px;
  color: var(--primary);
  margin-bottom: 10px;
}

.dropzone-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.dropzone-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.preview-container {
  margin-top: 16px;
  display: none;
  position: relative;
  text-align: center;
}

.preview-image {
  max-width: 100%;
  max-height: 280px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

/* Admin Dashboard Tables & Elements */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--bg-glass);
}

.stat-info h4 {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-info .stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
}

.table-responsive {
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.7);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
}

.custom-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.88rem;
  vertical-align: middle;
}

.custom-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: #111827;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  transform: translateY(20px) scale(0.97);
  transition: all 0.25s ease;
  overflow: hidden;
}

.modal-overlay.active .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(15, 23, 42, 0.5);
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.tab-btn {
  padding: 8px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px var(--primary-glow);
}

/* TV Display Styles */
.display-wrapper {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  height: calc(100vh - 120px);
}

.display-main {
  background: var(--bg-card);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 0 50px rgba(0, 170, 19, 0.2);
}

.display-number {
  font-size: 6.5rem;
  font-weight: 900;
  letter-spacing: 4px;
  line-height: 1;
  margin: 20px 0;
  background: linear-gradient(135deg, #00ff22, #00d9ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px var(--primary-glow);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .display-wrapper {
    grid-template-columns: 1fr;
    height: auto;
  }
  .display-number {
    font-size: 4.5rem;
  }
  .ticket-number-badge {
    font-size: 2.5rem;
  }
  .timer-digits {
    font-size: 2.2rem;
  }
}
