:root {
  --color-primary: #00AFDC;
  --color-primary-dark: #0092B8;
  --color-secondary: #101820;
  --color-bg: #F4F9F9;
  --color-surface: #F7F7F7;
  --color-muted: #64748B;
  --color-divider: #E2E8F0;
  --color-error: #FF5252;
  --color-success: #10B981;
  --color-warn: #F59E0B;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--color-bg);
  color: var(--color-secondary);
  -webkit-font-smoothing: antialiased;
}

.gradient-hero {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(0,175,220,0.18), transparent 60%),
    radial-gradient(800px 400px at 100% 0%, rgba(99,102,241,0.12), transparent 60%),
    linear-gradient(180deg, #F4F9F9 0%, #ffffff 100%);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.65rem 1.1rem; border-radius: 0.75rem;
  font-weight: 600; font-size: 0.95rem; transition: all 0.15s ease;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-1px); }
.btn-secondary { background: var(--color-secondary); color: white; }
.btn-secondary:hover { background: #0a0f14; }
.btn-ghost { background: transparent; color: var(--color-secondary); border-color: var(--color-divider); }
.btn-ghost:hover { background: var(--color-surface); }
.btn-danger { background: var(--color-error); color: white; }
.btn-danger:hover { background: #e04343; }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.85rem; border-radius: 0.5rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.card {
  background: #fff; border: 1px solid var(--color-divider);
  border-radius: 1rem; padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(16,24,32,0.04);
}
.card-hover:hover { box-shadow: 0 8px 24px rgba(16,24,32,0.08); transform: translateY(-2px); transition: all 0.2s; }

.input, .select, .textarea {
  width: 100%; padding: 0.65rem 0.9rem; border: 1px solid var(--color-divider);
  border-radius: 0.65rem; background: #fff; font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0,175,220,0.15);
}
.label { display:block; font-size:0.85rem; font-weight:600; color:var(--color-secondary); margin-bottom:0.35rem; }

.badge {
  display:inline-flex; align-items:center; gap:0.25rem;
  padding:0.2rem 0.55rem; border-radius: 999px; font-size:0.72rem; font-weight:600;
}
.badge-green { background:#DCFCE7; color:#166534; }
.badge-amber { background:#FEF3C7; color:#92400E; }
.badge-red   { background:#FEE2E2; color:#991B1B; }
.badge-blue  { background:#DBEAFE; color:#1E40AF; }
.badge-gray  { background:#F1F5F9; color:#475569; }
.badge-indigo { background:#E0E7FF; color:#3730A3; }

.table-wrap { overflow-x:auto; border-radius: 1rem; border:1px solid var(--color-divider); background:#fff; }
.table { width:100%; border-collapse: collapse; font-size:0.92rem; }
.table th { text-align:left; padding:0.8rem 1rem; font-weight:600; color:var(--color-muted); background:var(--color-surface); border-bottom:1px solid var(--color-divider); }
.table td { padding:0.8rem 1rem; border-bottom:1px solid var(--color-divider); vertical-align: middle; }
.table tr:last-child td { border-bottom:0; }
.table tr:hover td { background: #FAFCFC; }

.nav-link { padding:0.55rem 0.85rem; border-radius:0.55rem; color:var(--color-secondary); font-weight:500; }
.nav-link:hover { background: var(--color-surface); }
.nav-link.active { background: rgba(0,175,220,0.12); color: var(--color-primary); font-weight: 600; }

.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 100;
  padding: 0.8rem 1.1rem; border-radius: 0.75rem; color: #fff;
  font-weight: 500; box-shadow: 0 8px 28px rgba(16,24,32,0.18);
  animation: slideUp 0.25s ease;
}
.toast-success { background: var(--color-success); }
.toast-error { background: var(--color-error); }
.toast-info { background: var(--color-secondary); }

@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

.spinner {
  width:18px; height:18px; border-radius:50%;
  border: 2px solid rgba(0,0,0,0.12); border-top-color: var(--color-primary);
  animation: spin 0.7s linear infinite; display:inline-block;
}
.skeleton { background: linear-gradient(90deg, #f1f5f9, #e2e8f0, #f1f5f9); background-size:200% 100%; animation: shimmer 1.3s infinite; border-radius:0.5rem; }
@keyframes shimmer { 0%{background-position:200% 0;} 100%{background-position:-200% 0;} }

.empty-state { text-align:center; padding: 3rem 1rem; color: var(--color-muted); }

/* Modal */
.modal-backdrop {
  position:fixed; inset:0; background: rgba(16,24,32,0.5); backdrop-filter: blur(4px);
  display:flex; align-items:center; justify-content:center; z-index: 50; padding: 1rem;
}
.modal {
  background:#fff; border-radius:1rem; max-width: 32rem; width: 100%;
  padding: 1.5rem; box-shadow: 0 20px 60px rgba(0,0,0,0.25); max-height: 90vh; overflow-y:auto;
}

.tab-btn { padding: 0.55rem 1rem; border-radius: 0.65rem; font-weight: 500; color: var(--color-muted); }
.tab-btn.active { background: #fff; color: var(--color-secondary); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

.chip {
  display:inline-flex; align-items:center; gap:0.3rem;
  padding: 0.25rem 0.6rem; border-radius: 999px; background: var(--color-surface);
  border: 1px solid var(--color-divider); font-size: 0.8rem; color: var(--color-secondary);
}
