@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=Orbitron:wght@400;600;700&family=Outfit:wght@300;400;500;600&family=Rajdhani:wght@400;500;600;700&family=Exo+2:wght@300;400;500;600&family=Syne:wght@400;600;700&family=DM+Sans:wght@300;400;500;600&family=Roboto:wght@300;400;500;700&family=Poppins:wght@300;400;500;600;700&family=Nunito:wght@300;400;500;600;700&family=Raleway:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #0a0f1e;
  --bg-2: #0d1b2e;
  --surface: #0f2035;
  --surface-2: #162840;
  --border: rgba(6, 182, 212, 0.1);
  --border-focus: rgba(6, 182, 212, 0.45);
  --cyan: #06b6d4;
  --cyan-mid: #0891b2;
  --cyan-dark: #0e7490;
  --blue: #1d4ed8;
  --blue-dark: #1e3a8a;
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --text-muted: #475569;
  --danger: #dc2626;
  --success: #16a34a;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(160deg, #0a0f1e 0%, #0d1e35 55%, #0a1e32 100%);
  min-height: 100vh;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #67e8f9;
}

h1, h2, h3, h4, h5 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

p {
  color: var(--text-dim);
}

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

.card {
  background: rgba(13, 27, 46, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  font-family: inherit;
  white-space: nowrap;
  text-decoration: none;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  font-family: inherit;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-ghost:disabled,
.btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan-dark), var(--cyan));
  color: #fff;
  box-shadow: 0 2px 12px rgba(6, 182, 212, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
  transform: translateY(-1px);
  color: #fff;
}

.btn-secondary {
  background: rgba(6, 182, 212, 0.08);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.btn-secondary:hover {
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan);
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-color: rgba(6, 182, 212, 0.2);
}

.btn-danger {
  background: linear-gradient(135deg, #7f1d1d, var(--danger));
  color: #fff;
}

.btn-danger:hover {
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.35);
  transform: translateY(-1px);
  color: #fff;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 40px #0d1b2e inset !important;
  -webkit-text-fill-color: #e2e8f0 !important;
  caret-color: #e2e8f0;
  border-color: var(--border) !important;
  transition: background-color 9999s ease-in-out 0s;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.8rem 2rem;
  font-size: 1rem;
}

.input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: rgba(6, 182, 212, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.08);
}

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

textarea.input {
  resize: vertical;
  min-height: 80px;
}

input[type="color"].input {
  padding: 3px;
  height: 42px;
  cursor: pointer;
  background: rgba(6, 182, 212, 0.04);
  border-radius: var(--radius);
  overflow: hidden;
}

input[type="color"].input::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: calc(var(--radius) - 3px);
}

input[type="color"].input::-webkit-color-swatch {
  border: none;
  border-radius: calc(var(--radius) - 3px);
}

input[type="color"].input::-moz-color-swatch {
  border: none;
  border-radius: calc(var(--radius) - 3px);
}

select.input {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  border-radius: var(--radius);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
}

select.input:focus {
  border: none;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12);
}

select.input option {
  background-color: #0d1b2e;
  color: #e2e8f0;
}

select.input option:checked {
  background-color: rgba(6, 182, 212, 0.18);
  color: #06b6d4;
}

/* Custom dropdown (replaces native select popup) */
.custom-select-wrap {
  position: relative;
}

.custom-select-wrap select.input {
  display: none;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.9rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
  user-select: none;
  transition: background 0.15s;
}

.custom-select-trigger:hover {
  background: var(--surface-2, #1e2d3d);
}

.custom-select-trigger svg {
  flex-shrink: 0;
  transition: transform 0.15s;
}

.custom-select-wrap.open .custom-select-trigger svg {
  transform: rotate(180deg);
}

.custom-select-trigger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18);
}

.custom-select-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.custom-select-wrap.open .custom-select-dropdown {
  display: block;
}

.custom-select-option {
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text);
  transition: background 0.1s, color 0.1s;
}

.custom-select-option:hover {
  background: rgba(6, 182, 212, 0.1);
  color: var(--cyan);
}

.custom-select-option.selected {
  background: rgba(6, 182, 212, 0.14);
  color: var(--cyan);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.text-muted {
  color: var(--text-dim);
}

.text-center {
  text-align: center;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.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; }

#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 320px;
  pointer-events: auto;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--danger); }
.toast-info { border-left: 3px solid var(--cyan); }

.page-wrapper {
  padding-top: 90px;
  padding-bottom: 4rem;
  min-height: 100vh;
}

.w-full { width: 100%; }

.page-main {
  padding-top: 90px;
  padding-bottom: 5rem;
  min-height: 100vh;
}

.page-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-head { margin-bottom: 2rem; }

.page-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.page-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 768px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  .container { padding: 0 1rem; }
  .form-row { grid-template-columns: 1fr; }
}
