/* Base styles, color variables and theme support */

:root {
  --primary: #1565c0;
  --primary-dark: #0d47a1;
  --primary-light: #42a5f5;
  --accent: #2e7d32;
  --accent-soft: #e8f5e9;
  --bg: #ffffff;
  --bg-card: #f7fafc;
  --text: #1a237e;
  --text-muted: #546e7a;
  --border: #e0e7ef;
  --sidebar-bg: #0d47a1;
  --sidebar-text: #e3f2fd;
  --success: #2e7d32;
  --danger: #c62828;
  --shadow: 0 2px 12px rgba(21, 101, 192, 0.12);
  --radius: 10px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --primary: #42a5f5;
  --primary-dark: #1e88e5;
  --primary-light: #90caf9;
  --accent: #66bb6a;
  --accent-soft: #1b3a1f;
  --bg: #0a1628;
  --bg-card: #12233a;
  --text: #e8eef7;
  --text-muted: #90a4ae;
  --border: #1e3a5f;
  --sidebar-bg: #061428;
  --sidebar-text: #bbdefb;
  --success: #66bb6a;
  --danger: #ef5350;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

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

a:hover {
  color: var(--primary-light);
}

img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.35rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-accent {
  background: var(--accent);
  color: #1a2b2b;
}

.btn-accent:hover {
  background: var(--accent-soft);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--primary);
}

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

.btn-block {
  width: 100%;
}

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

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

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

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(46, 125, 50, 0.15);
  color: var(--success);
}

.badge-pending {
  background: rgba(201, 162, 39, 0.2);
  color: var(--accent);
}

.alert {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-info {
  background: rgba(13, 115, 119, 0.1);
  border-left: 4px solid var(--primary);
  color: var(--text);
}

.alert-warning {
  background: rgba(201, 162, 39, 0.15);
  border-left: 4px solid var(--accent);
}

.alert-danger {
  background: rgba(198, 40, 40, 0.1);
  border-left: 4px solid var(--danger);
  color: var(--danger);
}

.disclaimer {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 1.5rem;
}

/* Language select in sidebar */
.lang-select {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.4rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  font-size: 0.85rem;
}

.password-wrap {
  position: relative;
}

.password-wrap .form-control {
  padding-right: 2.5rem;
}

.password-toggle {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
}

