/* ============================================================================
   Global Styles - Common across all pages
   ============================================================================ */

:root {
  --primary-color: #4f46e5;
  --primary-dark: #4338ca;
  --secondary-color: #6b7280;
  --danger-color: #ef4444;
  --success-color: #ecfccb;
  --success-text: #064e3b;
  --error-color: #fee2e2;
  --error-text: #b91c1c;
  --bg-light: #f3f4f6;
  --bg-white: #fff;
  --border-color: #e5e7eb;
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --shadow-sm: 0 2px 8px rgba(16,24,40,0.06);
  --shadow-md: 0 6px 18px rgba(16,24,40,0.06);
  --shadow-lg: 0 12px 24px rgba(16,24,40,0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

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

html, body {
  height: 100%;
}

body {
  font-family: Inter, system-ui, Arial, sans-serif;
  background: var(--bg-light);
  color: var(--text-primary);
  line-height: 1.6;
}

/* ============================================================================
   Typography
   ============================================================================ */

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

h1 {
  font-size: 28px;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 20px;
}

p {
  color: var(--text-secondary);
  line-height: 1.6;
}

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

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

code {
  background: var(--bg-light);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

/* ============================================================================
   Forms & Inputs
   ============================================================================ */

label {
  display: block;
  font-weight: 600;
  margin-top: 12px;
  color: var(--text-primary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-top: 6px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="file"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

input[disabled],
select[disabled] {
  background: var(--bg-light);
  cursor: not-allowed;
}

/* ============================================================================
   Buttons
   ============================================================================ */

button,
.btn {
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s;
  display: inline-block;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  user-select: none;
}

button:hover,
.btn:hover {
  transform: translateY(-1px);
}

button:active,
.btn:active {
  transform: translateY(0);
}

/* Primary Button */
button,
.btn-primary,
button[type="submit"] {
  background: var(--primary-color);
  color: var(--bg-white);
}

button:hover,
.btn-primary:hover,
button[type="submit"]:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Secondary/Back Button */
.secondary-btn,
.back-btn,
.btn-secondary {
  background: var(--secondary-color);
  color: var(--bg-white);
}

.secondary-btn:hover,
.back-btn:hover,
.btn-secondary:hover {
  background: #4b5563;
}

/* Danger Button */
.btn-danger {
  background: var(--danger-color);
  color: var(--bg-white);
}

.btn-danger:hover {
  background: #dc2626;
}

/* Small Button */
.small-btn {
  width: auto;
  padding: 6px 12px;
  background: #eef2ff;
  color: var(--primary-color);
  border: 1px solid var(--border-color);
  font-size: 12px;
}

.small-btn:hover {
  background: var(--primary-color);
  color: var(--bg-white);
}

/* Disabled Button */
button[disabled],
.btn-disabled,
button[disabled]:hover {
  background: #9ca3af !important;
  cursor: not-allowed !important;
  color: var(--bg-white) !important;
  box-shadow: none !important;
  transform: none !important;
}

/* ============================================================================
   Cards & Containers
   ============================================================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.card {
  background: var(--bg-white);
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

/* ============================================================================
   Messages & Alerts
   ============================================================================ */

.result {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.success {
  background: var(--success-color);
  color: var(--success-text);
  border-left: 4px solid #16a34a;
}

.error {
  background: var(--error-color);
  color: var(--error-text);
  border-left: 4px solid var(--danger-color);
}

.info {
  background: #dbeafe;
  color: #0c4a6e;
  border-left: 4px solid #0284c7;
}

.token-msg {
  font-size: 0.9rem;
  color: var(--success-text);
  background: var(--success-color);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin: 12px 0;
}

/* ============================================================================
   Utility Classes
   ============================================================================ */

.inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline input {
  flex: 1;
}

.center {
  text-align: center;
  margin-top: 20px;
}

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

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

.margin-top {
  margin-top: 12px;
}

.margin-bottom {
  margin-bottom: 12px;
}

.display-inline {
  display: inline-block;
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 768px) {
  body {
    padding: 16px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  button,
  .btn {
    width: 100%;
  }

  .inline {
    flex-direction: column;
  }

  .inline input {
    width: 100%;
  }
}

/* ============================================================================
   Footer KvK text (used in multiple pages)
   ============================================================================ */

.footer-kvk-text {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
}
