@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --secondary: #ec4899;
  --bg-gradient-1: #eef2ff;
  --bg-gradient-2: #fbcfe8;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', system-ui, sans-serif;
}

body {
  background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 100%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-attachment: fixed;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
}

/* Glassmorphism Panel */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 24px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  transition: transform 0.3s ease;
}

.glass-panel:hover {
  box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.1);
}

h1, h2, h3 {
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* Navigation */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem 2rem;
  background: var(--glass-bg);
  border-radius: 9999px;
  box-shadow: var(--glass-shadow);
}

.nav-brand {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 1rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  transition: all 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media(max-width: 768px) {
  .form-grid { grid-template-columns: 1fr; }
}

.form-group {
  margin-bottom: 1.5rem;
}
.form-group.full-width {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.95rem;
}

input, select, textarea {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: 2px solid transparent;
  background: rgba(241, 245, 249, 0.8);
  border-radius: 12px;
  font-size: 1rem;
  color: var(--text-main);
  transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

button {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  width: 100%;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

button:active {
  transform: translateY(1px);
}

button.secondary {
  background: var(--glass-bg);
  color: var(--text-main);
  border: 2px solid var(--text-muted);
  box-shadow: none;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid rgba(0,0,0,0.05);
  padding-bottom: 1rem;
}

.tab-btn {
  background: transparent;
  color: var(--text-muted);
  box-shadow: none;
  border: none;
  width: auto;
  padding: 0.5rem 1rem;
  font-size: 1.1rem;
  border-radius: 8px;
}

.tab-btn.active {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tracer Result Box */
.tracer-result {
  margin-top: 2rem;
  padding: 2rem;
  background: linear-gradient(to right, rgba(99, 102, 241, 0.05), rgba(236, 72, 153, 0.05));
  border-radius: 16px;
  border: 1px dashed var(--primary);
  display: none;
}

.tracer-result.show {
  display: block;
  animation: fadeIn 0.5s ease;
}

.status-timeline {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
}

.status-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
}

/* Tables for Admin */
.table-container {
  overflow-x: auto;
  border-radius: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}
th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
th {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  font-weight: 700;
}
tbody tr:hover {
  background: rgba(255,255,255,0.5);
}

.badge {
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
}
.badge.Menunggu { background: #fef3c7; color: #b45309; }
.badge.Diproses { background: #dbeafe; color: #1d4ed8; }
.badge.Selesai { background: #d1fae5; color: #047857; }

/* Modal / Popup Alerts */
.custom-alert {
  position: fixed;
  top: 2rem;
  right: 2rem;
  padding: 1rem 2rem;
  border-radius: 12px;
  background: white;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transform: translateX(150%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 600;
}
.custom-alert.show {
  transform: translateX(0);
}
.custom-alert.success { border-left: 5px solid var(--success); }
.custom-alert.error { border-left: 5px solid var(--danger); }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.02); }
::-webkit-scrollbar-thumb { background: rgba(99, 102, 241, 0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
