/* ===================================================================
   PACCO — Modern Stylesheet
   Brand: Smart Packing Solution
   Palette: Dark Slate Blue (#2D3D4A) + Warm Amber (#F59E0B) accent
   =================================================================== */

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

:root {
  /* === Brand Colors === */
  --primary: #2D3D4A;
  --primary-dark: #1E2A35;
  --primary-light: #3F5566;
  --primary-50: #F4F6F8;
  --primary-100: #E8ECEF;
  --primary-200: #C5CFD7;

  /* === Accent: Warm Amber === */
  --accent: #F59E0B;
  --accent-dark: #D97706;
  --accent-light: #FCD34D;
  --accent-50: #FFFBEB;

  /* === Neutrals === */
  --bg: #FAFBFC;
  --bg-elevated: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F4F6F8;

  /* === Text === */
  --text: #0F172A;
  --text-2: #334155;
  --text-muted: #64748B;
  --text-light: #94A3B8;

  /* === Borders === */
  --border: #E2E8F0;
  --border-strong: #CBD5E1;

  /* === Status === */
  --success: #059669;
  --success-bg: #ECFDF5;
  --success-border: #A7F3D0;
  --error: #DC2626;
  --error-bg: #FEF2F2;
  --error-border: #FECACA;
  --warning: #B45309;
  --warning-bg: #FFFBEB;
  --warning-border: #FCD34D;
  --info: #1E40AF;
  --info-bg: #EFF6FF;
  --info-border: #BFDBFE;

  /* === Shadows === */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
  --shadow-primary: 0 8px 24px rgba(45, 61, 74, 0.18);

  /* === Radius === */
  --r-sm: 6px;
  --r: 10px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* === Transitions === */
  --t-fast: 0.12s ease;
  --t: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

a { color: var(--primary); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent-dark); }

::selection { background: var(--accent-light); color: var(--text); }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  background: linear-gradient(180deg, #1E2A35 0%, #2D3D4A 100%);
  color: white;
  padding: 1rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: white;
  transition: opacity var(--t-fast);
}
.navbar-brand:hover { opacity: 0.85; color: white; }

.navbar-logo {
  height: 36px;
  width: auto;
  display: block;
}

.navbar-tagline {
  font-size: 0.7rem;
  opacity: 0.6;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 0.15rem;
}

.navbar h1 {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
}

.navbar-actions {
  margin-left: auto;
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.navbar-actions a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
}
.navbar-actions a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}
.navbar-actions a.btn-cta {
  background: var(--accent);
  color: white;
  font-weight: 600;
}
.navbar-actions a.btn-cta:hover {
  background: var(--accent-dark);
}

/* ============================================================
   CONTAINERS
   ============================================================ */
.container { max-width: 1140px; margin: 0 auto; padding: 2rem 1.5rem; }
.container-narrow { max-width: 460px; margin: 0 auto; padding: 2.5rem 1.5rem; }
.container-medium { max-width: 760px; margin: 0 auto; padding: 2rem 1.5rem; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: -0.01em;
}

.card-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.55;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 0.5rem;
  letter-spacing: -0.005em;
}

.form-input,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"] {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: all var(--t-fast);
  background: var(--surface);
  color: var(--text);
}

.form-input:focus,
.form-select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(45, 61, 74, 0.08);
}

.form-input::placeholder { color: var(--text-light); }

.form-help {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.45;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-bottom: 1rem;
}
.checkbox-row input[type="checkbox"] {
  margin-top: 0.2rem;
  cursor: pointer;
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}
.checkbox-row label {
  font-size: 0.875rem;
  color: var(--text-2);
  cursor: pointer;
  line-height: 1.5;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  padding: 0.75rem 1.5rem;
  border: 1.5px solid transparent;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--t-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: -0.005em;
  line-height: 1.2;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  text-decoration: none;
  color: white;
}
.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-accent {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}
.btn-accent:hover:not(:disabled) {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35);
  transform: translateY(-1px);
  text-decoration: none;
  color: white;
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--border-strong);
  text-decoration: none;
  color: var(--text);
}

.btn-danger {
  background: var(--error);
  color: white;
  border-color: var(--error);
}
.btn-danger:hover:not(:disabled) {
  background: #B91C1C;
  text-decoration: none;
  color: white;
}

.btn-block { width: 100%; }
.btn-lg { padding: 0.95rem 1.75rem; font-size: 0.95rem; }
.btn-sm { padding: 0.45rem 0.875rem; font-size: 0.78rem; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 0.875rem 1.125rem;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  line-height: 1.5;
}
.alert-error { background: var(--error-bg); color: #991B1B; border: 1px solid var(--error-border); }
.alert-success { background: var(--success-bg); color: #065F46; border: 1px solid var(--success-border); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.alert-info { background: var(--info-bg); color: var(--info); border: 1px solid var(--info-border); }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge-active { background: var(--success-bg); color: var(--success); }
.badge-pending { background: var(--warning-bg); color: var(--warning); }
.badge-expired { background: var(--error-bg); color: #991B1B; }

/* ============================================================
   LOADING
   ============================================================ */
.loading {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  flex-direction: column;
  gap: 1rem;
}
.page-loading .spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.78rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  text-align: center;
  padding: 3rem 1rem 2rem;
  color: var(--text-muted);
  font-size: 0.825rem;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  background: var(--surface);
}
.footer a {
  color: var(--text-2);
  margin: 0 0.5rem;
  font-weight: 500;
}
.footer a:hover { color: var(--primary); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .navbar { padding: 0.875rem 1rem; }
  .navbar h1 { font-size: 1rem; }
  .navbar-logo { height: 30px; }
  .container { padding: 1.5rem 1rem; }
  .card { padding: 1.25rem; }
  .navbar-actions a { padding: 0.4rem 0.7rem; font-size: 0.78rem; }
  .container-narrow { padding: 1.5rem 1rem; }
}
