/* ========================================
   MONOLITH PRECISION DESIGN SYSTEM
   ======================================== */

/* CSS VARIABLES */
:root {
  /* Colors - Surfaces */
  --surface: #f9f9f9;
  --surface-dim: #dadada;
  --surface-bright: #f9f9f9;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #f3f3f4;
  --surface-container: #eeeeee;
  --surface-container-high: #e8e8e8;
  --surface-container-highest: #e2e2e2;
  --surface-subtle: #f5f5f5;

  /* Colors - Text */
  --on-surface: #1a1c1c;
  --on-surface-variant: #4c4546;
  --text-muted: #737373;

  /* Colors - Primary */
  --primary: #000000;
  --on-primary: #ffffff;
  --primary-container: #1b1b1b;
  --on-primary-container: #848484;

  /* Colors - Secondary */
  --secondary: #5e5e5e;
  --on-secondary: #ffffff;
  --secondary-container: #e1dfdf;
  --on-secondary-container: #626262;

  /* Colors - Tertiary */
  --tertiary: #000000;
  --on-tertiary: #ffffff;
  --tertiary-container: #1a1c1c;

  /* Colors - Error */
  --error: #ba1a1a;
  --on-error: #ffffff;
  --error-container: #ffdad6;

  /* Colors - Borders */
  --border-low: #e5e5e5;
  --border-high: #222222;
  --outline: #7e7576;

  /* Colors - Inverse */
  --inverse-surface: #2f3131;
  --inverse-on-surface: #f0f1f1;

  /* Typography */
  --font-display: 'Hanken Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --spacing-unit: 4px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 40px;
  --spacing-3xl: 80px;

  /* Gutters & Margins */
  --gutter-mobile: 16px;
  --gutter-desktop: 24px;
  --margin-mobile: 16px;
  --margin-desktop: 40px;
  --container-max: 1440px;

  /* Border Radius */
  --radius-sm: 0px;
  --radius-md: 4px;
  --radius-lg: 8px;

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 200ms ease-in-out;
  --transition-slow: 300ms ease-in-out;
}

/* ========================================
   RESET & BASE
   ======================================== */

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

html {
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--on-surface);
  background-color: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   MAIN CONTENT SPACING
   ======================================== */

main {
  position: relative;
  z-index: 1;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

/* Display - Large */
.display-lg {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

/* Headline - Large */
.headline-lg {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

/* Headline - Large Mobile */
.headline-lg-mobile {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.33;
  letter-spacing: -0.01em;
}

/* Headline - Medium */
.headline-md {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.33;
}

/* Body - Large */
.body-lg {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.56;
}

/* Body - Medium */
.body-md {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

/* Body - Small */
.body-sm {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.43;
}

/* Label - Medium */
.label-md {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.23;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Label - Small */
.label-sm {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.27;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ========================================
   MULTISELECT
   ======================================== */

.multiselect-wrapper {
  position: relative;
  width: 100%;
}

.multiselect-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-low);
  border-radius: 0;
  background: var(--surface-container-lowest);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  transition: all var(--transition-base);
}

.multiselect-input:hover {
  border-color: var(--on-surface);
}

.multiselect-input.input-sm {
  padding: 8px 12px;
  font-size: 14px;
}

.multiselect-chevron {
  width: 16px;
  height: 16px;
  margin-left: 8px;
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.multiselect-wrapper.open .multiselect-chevron {
  transform: rotate(180deg);
}

.multiselect-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface-container-lowest);
  border: 1px solid var(--border-low);
  border-top: none;
  display: none;
  z-index: 50;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.multiselect-wrapper.open .multiselect-dropdown {
  display: flex;
  flex-direction: column;
}

.multiselect-search {
  padding: 8px;
  border-bottom: 1px solid var(--border-low);
}

.multiselect-search input {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border-low);
  border-radius: 0;
  font-size: 14px;
}

.multiselect-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.multiselect-info {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.multiselect-item {
  padding: 8px 12px;
  display: flex;
  align-items: center;
}

.multiselect-item:hover {
  background: var(--surface-subtle);
}

.multiselect-item-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  width: 100%;
  font-size: 14px;
}

.multiselect-item-label:has(input[type="checkbox"]:disabled) {
  cursor: not-allowed;
  opacity: 0.5;
  color: var(--text-muted);
}

.multiselect-item input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
}

.multiselect-empty {
  padding: 16px 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ========================================
   ICONS
   ======================================== */

.icon-xs { width: 12px; height: 12px; }
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.23;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 24px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

/* Primary Button */
.btn-primary {
  background-color: var(--primary);
  color: var(--on-primary);
  border: none;
}

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

.btn-primary:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Header Specific Styles */
header .btn-auto {
  padding: 12px 24px;
  font-size: 12px;
  font-weight: 600;
  margin-left: auto;
  flex-shrink: 0;
  background-color: #000000;
  color: #ffffff;
  border-radius: 4px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  transition: background-color var(--transition-base);
}

header .btn-auto:hover {
  background-color: #1a1a1a;
}

header .btn-auto:focus {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* Secondary Button */
.btn-secondary {
  background-color: var(--surface-container-lowest);
  color: var(--on-surface);
  border: 1px solid var(--border-low);
}

.btn-secondary:hover {
  background-color: var(--surface-container-low);
  border-color: var(--on-surface);
}

.btn-secondary:focus {
  outline: 2px solid var(--on-surface);
  outline-offset: 2px;
}

/* Tertiary Button */
.btn-tertiary {
  background-color: transparent;
  color: var(--on-surface);
  border: none;
}

.btn-tertiary:hover {
  background-color: var(--surface-subtle);
}

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

/* ========================================
   ALERTS & NOTIFICATIONS
   ======================================== */

.alert {
  padding: var(--spacing-lg);
  border-left: 4px solid var(--border-low);
  background-color: var(--surface-subtle);
  display: flex;
  gap: var(--spacing-md);
  align-items: flex-start;
}

.alert-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--on-surface);
  margin-bottom: 4px;
}

.alert-message {
  font-size: 14px;
  color: var(--on-surface-variant);
}

/* Alert Variants */
.alert-success {
  border-left-color: #22c55e;
  background-color: rgba(34, 197, 94, 0.1);
}

.alert-error {
  border-left-color: var(--error);
  background-color: rgba(186, 26, 26, 0.1);
}

.alert-warning {
  border-left-color: #f59e0b;
  background-color: rgba(245, 158, 11, 0.1);
}

.alert-info {
  border-left-color: #3b82f6;
  background-color: rgba(59, 130, 246, 0.1);
}

/* ========================================
   STATUS INDICATORS
   ======================================== */

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-active .status-dot {
  background-color: #22c55e;
}

.status-inactive .status-dot {
  background-color: #6b7280;
}

.status-pending .status-dot {
  background-color: #f59e0b;
}

.status-error .status-dot {
  background-color: var(--error);
}

/* ========================================
   LOADING STATES
   ======================================== */

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-low);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.skeleton {
  background: linear-gradient(90deg, var(--surface-subtle) 25%, var(--surface-container-low) 50%, var(--surface-subtle) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 16px;
  border-radius: 0;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 24px;
  border-radius: 0;
  margin-bottom: 12px;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 0;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-3xl);
  text-align: center;
}

.empty-state-icon {
  font-size: 64px;
  opacity: 0.5;
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--on-surface);
}

.empty-state-description {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 400px;
}

.empty-state-action {
  margin-top: var(--spacing-md);
}

/* ========================================
   FORM HELP TEXT & VALIDATION
   ======================================== */

.form-help {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-error {
  font-size: 12px;
  color: var(--error);
  margin-top: 4px;
}

.form-group.has-error .input,
.form-group.has-error input,
.form-group.has-error textarea,
.form-group.has-error select {
  border-color: var(--error);
  background-color: rgba(186, 26, 26, 0.02);
}

.form-group.has-error .input:focus,
.form-group.has-error input:focus {
  outline-color: var(--error);
}

/* ========================================
   CHECKBOXES & RADIOS
   ======================================== */

input[type="checkbox"],
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border-low);
  border-radius: 0;
  background-color: var(--surface-container-lowest);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  flex-shrink: 0;
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
  border-color: var(--on-surface);
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--on-primary);
  font-size: 11px;
  font-weight: bold;
  line-height: 1;
}

input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background-color: var(--on-primary);
  border-radius: 50%;
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  border-color: var(--border-high);
  background-color: var(--surface-container);
}

input[type="checkbox"]:disabled:hover,
input[type="radio"]:disabled:hover {
  border-color: var(--border-high);
}

/* Size: Small */
.btn-sm {
  padding: 8px 16px;
  font-size: 11px;
}

/* Size: Large */
.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

/* Full Width */
.btn-full {
  width: 100%;
}

/* ========================================
   INPUTS & FORMS
   ======================================== */

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.form-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.23;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-surface);
}

.form-label.required::after {
  content: ' *';
  color: var(--error);
}

/* Input Field */
.input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea,
select {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  padding: 12px 16px;
  border: 1px solid var(--border-low);
  border-radius: 0;
  background-color: var(--surface-container-lowest);
  color: var(--on-surface);
  transition: all var(--transition-base);
}

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

.input:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--primary);
  outline-offset: 0px;
}

/* Input Small */
.input-sm,
input[type="text"].input-sm,
input[type="email"].input-sm,
input[type="password"].input-sm,
input[type="search"].input-sm,
input[type="number"].input-sm,
textarea.input-sm,
select.input-sm {
  padding: 8px 12px;
  font-size: 14px;
}

/* Textarea */
textarea {
  resize: vertical;
  min-height: 100px;
}

/* Select */
select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1c1c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 40px;
}

/* ========================================
   CARDS
   ======================================== */

.card {
  background-color: var(--surface-container-lowest);
  border: 1px solid var(--border-low);
  border-radius: 0;
  overflow: hidden;
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--on-surface);
}

/* Card variant: plain (no background, no border) */
.card-plain {
  background-color: transparent;
  border: none;
}

.card-plain:hover {
  border-color: transparent;
}

.card-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border-low);
}

.card-header h3,
.card-header h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
}

.card-content {
  padding: var(--spacing-lg);
}

.card-footer {
  padding: var(--spacing-lg);
  border-top: none;
  background-color: var(--surface-subtle);
  display: flex;
  gap: var(--spacing-md);
  justify-content: flex-end;
}

/* ========================================
   TABLES
   ======================================== */

.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead {
  background-color: var(--surface-subtle);
  border-bottom: 1px solid var(--border-low);
}

th {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  text-align: left;
  color: var(--on-surface);
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-low);
}

tbody tr:hover {
  background-color: var(--surface-subtle);
}

/* ========================================
   BADGES & TAGS
   ======================================== */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 4px 12px;
  border-radius: 0;
  border: 1px solid var(--border-low);
  background-color: var(--surface-container-high);
  color: var(--on-surface);
}

.badge-primary {
  background-color: var(--primary);
  color: var(--on-primary);
}

.badge-secondary {
  background-color: var(--secondary-container);
  color: var(--on-secondary-container);
}

.badge-error {
  background-color: var(--error-container);
  color: var(--on-error);
}

/* ========================================
   BREADCRUMB
   ======================================== */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--on-surface-variant);
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.breadcrumb-item a {
  color: var(--on-surface-variant);
  text-decoration: none;
  transition: color var(--transition-base);
}

.breadcrumb-item a:hover {
  color: var(--on-surface);
}

.breadcrumb-separator {
  color: var(--border-high);
}

/* ========================================
   CONTAINER WRAPPERS
   ======================================== */

.container-limited {
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
  padding: 0 var(--margin-mobile);
}

@media (min-width: 768px) {
  .container-limited {
    padding: 0 var(--margin-desktop);
  }
}

/* ========================================
   NAVIGATION
   ======================================== */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: var(--surface-container-lowest);
  border-bottom: 1px solid var(--border-low);
  z-index: 40;
  display: flex;
  align-items: center;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--spacing-lg);
  flex-wrap: nowrap;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--margin-mobile);
}

@media (min-width: 768px) {
  .header-content {
    padding: 0 var(--margin-desktop);
  }
}

.logo {
  text-decoration: none;
  color: var(--on-surface);
  transition: opacity var(--transition-base);
  flex-shrink: 0;
}

.logo:hover {
  opacity: 0.8;
}

.logo-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: var(--on-primary);
  border-radius: 0;
  flex-shrink: 0;
}

.logo-icon svg {
  width: 16px;
  height: 16px;
}

.logo span {
  white-space: nowrap;
  font-size: 16px;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-shrink: 0;
}

.nav a {
  text-decoration: none;
  color: var(--on-surface-variant);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color var(--transition-base);
  white-space: nowrap;
}

.nav a:hover {
  color: var(--on-surface);
}

/* ======== RESPONSIVE HEADER ======== */

/* Mobile first - show nav on mobile */
.nav-desktop {
  display: none !important;
}

.btn-search-desktop {
  display: none !important;
}

.hamburger-menu {
  display: flex;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  gap: 5px;
  padding: var(--spacing-sm);
  margin-left: auto;
  color: var(--on-surface);
}

.hamburger-menu span {
  width: 24px;
  height: 2px;
  background-color: var(--on-surface);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
  transform-origin: center;
  display: block;
}

.hamburger-menu[aria-expanded="false"] span:nth-child(1) {
  transform: translateY(0px) rotate(0deg);
}

.hamburger-menu[aria-expanded="false"] span:nth-child(2) {
  opacity: 1;
}

.hamburger-menu[aria-expanded="false"] span:nth-child(3) {
  transform: translateY(0px) rotate(0deg);
}

.hamburger-menu[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.hamburger-menu[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.hamburger-menu[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

.nav-mobile {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background-color: var(--surface-container-lowest);
  border-bottom: 1px solid var(--border-low);
  flex-direction: column;
  gap: 0;
  padding: var(--spacing-md);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  z-index: 35;
}

.nav-mobile.active {
  display: flex;
}

.nav-mobile a {
  padding: var(--spacing-md);
  text-decoration: none;
  color: var(--on-surface-variant);
  transition: color var(--transition-base);
  font-size: 14px;
  font-weight: 500;
}

.nav-mobile a:hover {
  color: var(--on-surface);
  background-color: var(--surface-container-low);
  border-radius: 4px;
}

/* Tablet and up */
@media (min-width: 768px) {
  .nav-desktop {
    display: flex !important;
    gap: var(--spacing-md) !important;
  }

  .btn-search-desktop {
    display: flex !important;
  }

  .hamburger-menu {
    display: none !important;
  }

  .nav-mobile {
    display: none !important;
  }

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

  .logo-text {
    display: inline;
  }
}

/* ========================================
   FOOTER
   ======================================== */

footer {
  background-color: var(--surface-container-lowest);
  border-top: 1px solid var(--border-low);
  padding: var(--spacing-3xl) var(--margin-mobile);
  margin-top: var(--spacing-3xl);
}

@media (min-width: 768px) {
  footer {
    padding: var(--spacing-3xl) var(--margin-desktop);
  }
}

.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-2xl);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr auto;
    align-items: flex-start;
  }
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  padding: var(--spacing-md) 0;
}

.footer-section:first-child {
  padding-top: 0;
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .footer-section:first-child {
    grid-column: auto;
    padding-top: var(--spacing-md);
  }
}

.footer-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--on-surface);
  margin: 0;
}

.footer-description {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.43;
  color: var(--on-surface-variant);
  margin: 0;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-lg);
}

@media (min-width: 768px) {
  .footer-bottom {
    text-align: left;
  }
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.footer-links a {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.43;
  color: var(--on-surface-variant);
  text-decoration: none;
  transition: color var(--transition-base);
}

.footer-links a:hover {
  color: var(--on-surface);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid var(--border-low);
  padding-top: var(--spacing-lg);
  text-align: center;
  font-size: 14px;
  color: var(--on-surface-variant);
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */

main {
  margin-top: 64px;
  min-height: 100vh;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--margin-mobile);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--margin-desktop);
  }
}

/* ========================================
   SECTIONS & LAYOUT
   ======================================== */

.section {
  width: 100%;
  padding: var(--spacing-3xl) var(--margin-mobile);
  border-bottom: 1px solid var(--border-low);
}

@media (min-width: 768px) {
  .section {
    padding: var(--spacing-3xl) var(--margin-desktop);
  }
}

/* Grid for 2/3 + 1/3 layout (mobile: stacked, desktop: 2fr 1fr) */
@media (min-width: 768px) {
  [style*="grid-template-columns: 1fr"] {
    grid-template-columns: 2fr 1fr !important;
  }
}

.section-hero {
  background-color: var(--surface-container-lowest);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--spacing-xl);
}

.section-dark {
  background-color: var(--surface-bright);
}

.section-light {
  background-color: var(--surface-container-lowest);
}

/* ========================================
   GRID UTILITIES
   ======================================== */

.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Layout: 2/3 + 1/3 columns with flex containers */

.grid-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-4 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================================
   FLEXBOX & GRID UTILITIES
   ======================================== */

/* Display */
.flex {
  display: flex;
}

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

/* Direction */
.flex-row {
  flex-direction: row;
}

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

.flex-row-reverse {
  flex-direction: row-reverse;
}

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

/* Wrap */
.flex-wrap {
  flex-wrap: wrap;
}

.flex-nowrap {
  flex-wrap: nowrap;
}

/* Align Items (vertical in flex-row, horizontal in flex-col) */
.items-start {
  align-items: flex-start;
}

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

.items-end {
  align-items: flex-end;
}

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

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

/* Justify Content (horizontal in flex-row, vertical in flex-col) */
.justify-start {
  justify-content: flex-start;
}

.justify-center {
  justify-content: center;
}

.justify-end {
  justify-content: flex-end;
}

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

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

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

/* Gap (spacing between flex/grid items) */
.gap-xs {
  gap: var(--spacing-xs);
}

.gap-sm {
  gap: var(--spacing-sm);
}

.gap-md {
  gap: var(--spacing-md);
}

.gap-lg {
  gap: var(--spacing-lg);
}

.gap-xl {
  gap: var(--spacing-xl);
}

/* Flex Shorthand */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-start {
  display: flex;
  align-items: flex-start;
}

/* Grid Columns */
.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-cols-auto {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-cols-auto-md {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Grid Gap */
.grid-gap-md {
  gap: var(--spacing-md);
}

.grid-gap-lg {
  gap: var(--spacing-lg);
}

/* Border Utilities */
.border-top {
  border-top: 1px solid var(--border-low);
}

.border-top-none {
  border-top: none;
}

/* Padding Top */
.pt-lg {
  padding-top: var(--spacing-lg);
}

/* Flex Item Properties */
.flex-1 {
  flex: 1;
}

.flex-0 {
  flex: 0;
}

.flex-shrink-0 {
  flex-shrink: 0;
}

.flex-grow {
  flex-grow: 1;
}

/* ========================================
   SPACING UTILITIES
   ======================================== */

.p-0 {
  padding: 0;
}

.p-md {
  padding: var(--spacing-md);
}

.p-lg {
  padding: var(--spacing-lg);
}

.px-0 {
  padding-left: 0;
  padding-right: 0;
}

.px-md {
  padding-left: var(--spacing-md);
  padding-right: var(--spacing-md);
}

.py-0 {
  padding-top: 0;
  padding-bottom: 0;
}

.py-md {
  padding-top: var(--spacing-md);
  padding-bottom: var(--spacing-md);
}

.m-0 {
  margin: 0;
}

.mx-0 {
  margin-left: 0;
  margin-right: 0;
}

.my-0 {
  margin-top: 0;
  margin-bottom: 0;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-sm {
  margin-bottom: var(--spacing-sm);
}

.mb-md {
  margin-bottom: var(--spacing-md);
}

.mb-lg {
  margin-bottom: var(--spacing-lg);
}

.mb-xl {
  margin-bottom: var(--spacing-xl);
}

.mt-0 {
  margin-top: 0;
}

.mt-sm {
  margin-top: var(--spacing-sm);
}

.mt-md {
  margin-top: var(--spacing-md);
}

.mt-lg {
  margin-top: var(--spacing-lg);
}

.mt-xl {
  margin-top: var(--spacing-xl);
}

/* ========================================
   WIDTH & SIZE UTILITIES
   ======================================== */

.w-full {
  width: 100%;
}

.w-auto {
  width: auto;
}

.min-w-fit {
  min-width: fit-content;
}

.btn-auto {
  width: auto !important;
}

.btn-full {
  width: 100%;
}

/* Display utilities */
.d-flex {
  display: flex;
}

.d-block {
  display: block;
}

.d-inline {
  display: inline;
}

.d-inline-flex {
  display: inline-flex;
}

.d-none {
  display: none;
}

/* ========================================
   TYPOGRAPHY UTILITIES
   ======================================== */

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

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

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

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

.text-uppercase {
  text-transform: uppercase;
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

/* ========================================
   TABS
   ======================================== */

.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-low);
  gap: 0;
}

.tab-button {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--on-surface-variant);
  transition: all var(--transition-base);
  margin-bottom: -1px;
}

.tab-button:hover {
  color: var(--on-surface);
}

.tab-button.active {
  color: var(--on-surface);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
  padding: var(--spacing-lg);
}

.tab-content.active {
  display: block;
}

/* ========================================
   ACCORDION
   ======================================== */

.accordion {
  border: 1px solid var(--border-low);
}

.accordion-item {
  border-bottom: 1px solid var(--border-low);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  padding: var(--spacing-lg);
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--on-surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all var(--transition-base);
}

.accordion-header:hover {
  background-color: var(--surface-subtle);
}

.accordion-header.active {
  background-color: var(--surface-subtle);
}

.accordion-icon {
  transition: transform var(--transition-base);
}

.accordion-header.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  display: none;
  padding: 0 var(--spacing-lg) var(--spacing-lg) var(--spacing-lg);
  background-color: var(--surface-subtle);
}

.accordion-content.active {
  display: block;
}

/* ========================================
   PAGINATION
   ======================================== */

.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
}

.pagination-button {
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--border-low);
  background: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-button:hover:not(:disabled) {
  border-color: var(--on-surface);
  background-color: var(--surface-subtle);
}

.pagination-button.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

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

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

/* ========================================
   DROPDOWN MENU
   ======================================== */

.dropdown {
  position: relative;
  display: inline-block;
}

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

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background-color: var(--surface-container-lowest);
  border: 1px solid var(--border-low);
  margin-top: 8px;
  z-index: 50;
  display: none;
  flex-direction: column;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.dropdown:hover .dropdown-content,
.dropdown.open .dropdown-content {
  display: flex;
}

.dropdown-item {
  padding: 12px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--on-surface);
  text-align: left;
  transition: all var(--transition-base);
  border-bottom: 1px solid var(--border-low);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background-color: var(--surface-subtle);
}

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

.dropdown-divider {
  height: 1px;
  background-color: var(--border-low);
  margin: 4px 0;
}

/* ========================================
   SWITCH / TOGGLE
   ======================================== */

.switch-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.switch {
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 24px;
  background-color: #ccc;
  border-radius: 0;
  border: none;
  cursor: pointer;
  position: relative;
  transition: background-color var(--transition-base);
}

.switch::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: left var(--transition-base);
}

.switch:checked {
  background-color: var(--primary);
}

.switch:checked::before {
  left: 22px;
}

.switch:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
}

.toast {
  background-color: var(--surface-container-lowest);
  border: 1px solid var(--border-low);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: slideIn 0.3s ease-out;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.toast.hide {
  animation: slideOut 0.3s ease-out forwards;
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--on-surface);
  margin-bottom: 4px;
}

.toast-message {
  font-size: 14px;
  color: var(--on-surface-variant);
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--text-muted);
  transition: color var(--transition-base);
}

.toast-close:hover {
  color: var(--on-surface);
}

.toast-success {
  border-left: 4px solid #22c55e;
}

.toast-error {
  border-left: 4px solid var(--error);
}

.toast-warning {
  border-left: 4px solid #f59e0b;
}

.toast-info {
  border-left: 4px solid #3b82f6;
}

/* ========================================
   POPOVER
   ======================================== */

.popover-trigger {
  cursor: pointer;
  position: relative;
}

.popover-content {
  position: absolute;
  background-color: var(--surface-container-lowest);
  border: 1px solid var(--border-low);
  padding: var(--spacing-lg);
  z-index: 50;
  display: none;
  min-width: 240px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.popover-trigger:hover .popover-content,
.popover-trigger.open .popover-content {
  display: block;
}

/* ========================================
   DIVIDERS & SEPARATORS
   ======================================== */

.divider {
  height: 1px;
  background-color: var(--border-low);
  margin: var(--spacing-lg) 0;
}

.divider-vertical {
  width: 1px;
  background-color: var(--border-low);
  display: inline-block;
  margin: 0 var(--spacing-lg);
}

.divider-vertical-auto {
  width: 1px;
  background-color: var(--border-low);
  height: auto;
  align-self: stretch;
}

.divider-vertical-sm {
  width: 1px;
  background-color: var(--border-low);
  height: 30px;
  align-self: center;
}

.divider-vertical-md {
  width: 1px;
  background-color: var(--border-low);
  height: 50px;
  align-self: center;
}

.divider-vertical-lg {
  width: 1px;
  background-color: var(--border-low);
  height: 70px;
  align-self: center;
}

.divider-text {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  color: var(--text-muted);
  font-size: 14px;
  margin: var(--spacing-lg) 0;
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--border-low);
}

/* ========================================
   TOOLTIPS
   ======================================== */

.tooltip-wrapper {
  position: relative;
  display: inline-block;
  cursor: help;
  border-bottom: 1px dotted var(--text-muted);
}

.tooltip {
  position: absolute;
  background-color: var(--primary);
  color: var(--on-primary);
  padding: 8px 12px;
  border-radius: 0;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  margin-bottom: 8px;
}

.tooltip-wrapper:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--primary);
}

/* ========================================
   PROGRESS BAR
   ======================================== */

.progress {
  width: 100%;
  height: 8px;
  background-color: var(--surface-container-high);
  border-radius: 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--primary);
  width: 0%;
  transition: width var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-bar.indeterminate {
  background: linear-gradient(90deg, var(--primary) 25%, var(--primary-container) 50%, var(--primary) 75%);
  background-size: 200% 100%;
  animation: progress-indeterminate 1.5s infinite;
}

@keyframes progress-indeterminate {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.progress-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
}

/* ========================================
   NUMBER INPUT
   ======================================== */

.number-input-group {
  display: flex;
  border: 1px solid var(--border-low);
  height: 40px;
}

.number-input-group input {
  flex: 1;
  border: none;
  padding: 8px 12px;
  text-align: center;
  font-size: 14px;
}

.number-input-group input:focus {
  outline: none;
}

.number-input-button {
  width: 40px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--on-surface-variant);
  border-left: 1px solid var(--border-low);
  transition: all var(--transition-base);
}

.number-input-button:hover {
  background-color: var(--surface-subtle);
}

.number-input-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========================================
   SLIDER / RANGE
   ======================================== */

.slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--surface-container-high);
  outline: none;
  border-radius: 0;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--primary);
  cursor: pointer;
  border-radius: 50%;
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--primary);
  cursor: pointer;
  border-radius: 50%;
  border: none;
}

.slider:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.slider-container {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ========================================
   COMBOBOX / COMMAND
   ======================================== */

.combobox {
  position: relative;
}

.combobox-input {
  width: 100%;
}

.combobox-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--surface-container-lowest);
  border: 1px solid var(--border-low);
  border-top: none;
  max-height: 300px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}

.combobox.open .combobox-menu {
  display: block;
}

.combobox-item {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px;
  color: var(--on-surface);
  transition: all var(--transition-base);
  border-bottom: 1px solid var(--border-low);
}

.combobox-item:last-child {
  border-bottom: none;
}

.combobox-item:hover {
  background-color: var(--surface-subtle);
}

.combobox-item.selected {
  background-color: var(--surface-subtle);
  font-weight: 600;
}

.combobox-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ========================================
   LISTS
   ======================================== */

.list {
  list-style: none;
}

.list-item {
  padding: 8px 0;
  font-size: 14px;
}

.list-unordered .list-item::before {
  content: '•';
  display: inline-block;
  width: 20px;
  margin-right: 8px;
}

.list-ordered {
  counter-reset: list-counter;
}

.list-ordered .list-item::before {
  content: counter(list-counter) '.';
  counter-increment: list-counter;
  display: inline-block;
  width: 20px;
  margin-right: 8px;
  font-weight: 600;
}

/* ========================================
   LINKS
   ======================================== */

a {
  color: var(--primary);
  text-decoration: none;
  transition: all var(--transition-base);
  cursor: pointer;
}

a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

a:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Link Variants */

.link-primary {
  color: var(--primary);
}

.link-primary:hover {
  text-decoration: underline;
}

.link-secondary {
  color: var(--on-surface-variant);
}

.link-secondary:hover {
  color: var(--on-surface);
  text-decoration: underline;
}

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

.link-muted:hover {
  color: var(--on-surface);
  text-decoration: underline;
}

/* Link Inline - sem underline por padrão */
.link-inline {
  text-decoration: none;
  border-bottom: 1px solid var(--border-low);
}

.link-inline:hover {
  border-bottom-color: var(--primary);
  background-color: var(--surface-subtle);
}

/* Link Arrow */
.link-arrow::after {
  content: ' →';
  transition: transform var(--transition-base);
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

/* ========================================
   BORDER UTILITIES
   ======================================== */

.border {
  border: 1px solid var(--border-low);
}

.border-t {
  border-top: 1px solid var(--border-low);
}

.border-b {
  border-bottom: 1px solid var(--border-low);
}

.border-l {
  border-left: 1px solid var(--border-low);
}

.border-r {
  border-right: 1px solid var(--border-low);
}

/* ========================================
   ALIGNMENT UTILITIES
   ======================================== */

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

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

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

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

.items-start {
  align-items: flex-start;
}

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

.items-end {
  align-items: flex-end;
}

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

.justify-start {
  justify-content: flex-start;
}

.justify-center {
  justify-content: center;
}

.justify-end {
  justify-content: flex-end;
}

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

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

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

/* ========================================
   VISIBILITY UTILITIES
   ======================================== */

.hidden {
  display: none;
}

@media (min-width: 768px) {
  .hidden-mobile {
    display: none;
  }

  .show-mobile {
    display: none;
  }

  .show-desktop {
    display: block;
  }
}

@media (max-width: 767px) {
  .show-mobile {
    display: block;
  }

  .hidden-mobile {
    display: block;
  }

  .show-desktop {
    display: none;
  }
}

/* ========================================
   COMPANY CARD
   ======================================== */

.company-card {
  background-color: var(--surface-container-lowest);
  border: 1px solid var(--border-low);
  padding: var(--spacing-lg);
  transition: all var(--transition-base);
  cursor: pointer;
}

.company-card:hover {
  border-color: var(--on-surface);
  background-color: var(--surface-subtle);
}

.company-header {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  align-items: flex-start;
}

.company-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.company-info {
  flex: 1;
}

.company-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--on-surface);
  margin-bottom: 4px;
}

.company-cnpj {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.company-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-low);
}

.company-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.company-detail-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.company-detail-value {
  font-size: 14px;
  color: var(--on-surface);
  font-weight: 500;
}

/* ========================================
   RESULT GRID
   ======================================== */

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-lg);
}

.result-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

/* ========================================
   FILTER PANEL
   ======================================== */

.filter-panel {
  background-color: var(--surface-container-lowest);
  border: 1px solid var(--border-low);
  padding: var(--spacing-lg);
}

.filter-group {
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border-low);
}

.filter-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--on-surface);
  margin-bottom: var(--spacing-md);
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.filter-option {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.filter-option input {
  cursor: pointer;
}

.filter-option label {
  font-size: 14px;
  color: var(--on-surface);
  cursor: pointer;
  flex: 1;
}

.filter-actions {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border-low);
}

.filter-actions button {
  flex: 1;
}

/* ========================================
   DATE RANGE PICKER
   ======================================== */

.date-range-picker {
  display: flex;
  gap: var(--spacing-md);
  align-items: flex-end;
  flex-wrap: wrap;
}

.date-range-input {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.date-range-input label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.date-range-separator {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  font-weight: 600;
}

.date-range-preset {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.preset-button {
  padding: 8px 12px;
  border: 1px solid var(--border-low);
  background: none;
  cursor: pointer;
  font-size: 12px;
  transition: all var(--transition-base);
}

.preset-button:hover {
  border-color: var(--on-surface);
  background-color: var(--surface-subtle);
}

.preset-button.active {
  background-color: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

/* ========================================
   COPY BUTTON
   ======================================== */

.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--border-low);
  background: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  transition: all var(--transition-base);
  border-radius: 0;
}

.copy-button:hover {
  border-color: var(--on-surface);
  color: var(--on-surface);
  background-color: var(--surface-subtle);
}

.copy-button.copied {
  background-color: #22c55e;
  color: white;
  border-color: #22c55e;
}

/* ========================================
   EXPORT OPTIONS
   ======================================== */

.export-menu {
  position: relative;
  display: inline-block;
}

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

.export-options {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background-color: var(--surface-container-lowest);
  border: 1px solid var(--border-low);
  z-index: 50;
  display: none;
  flex-direction: column;
  min-width: 180px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.export-menu:hover .export-options,
.export-menu.open .export-options {
  display: flex;
}

.export-option {
  padding: 12px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--on-surface);
  text-align: left;
  transition: all var(--transition-base);
  border-bottom: 1px solid var(--border-low);
  display: flex;
  gap: 8px;
  align-items: center;
}

.export-option:last-child {
  border-bottom: none;
}

.export-option:hover {
  background-color: var(--surface-subtle);
}

.export-icon {
  font-size: 16px;
}

/* ========================================
   SEARCH FORM
   ======================================== */

.search-form {
  display: flex;
  gap: var(--spacing-md);
  flex-direction: column;
}

@media (min-width: 768px) {
  .search-form {
    flex-direction: row;
  }
}

.search-input-group {
  flex: 1;
  display: flex;
  gap: 0;
  transition: outline var(--transition-base);
}

.search-input-group .input {
  flex: 1;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.search-input-group .input:focus {
  outline: none;
}

.search-input-group:has(.input:focus) {
  outline: 2px solid var(--primary);
  outline-offset: 0px;
}

.search-input-group .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: none;
}

/* ========================================
   SHEET / DRAWER
   ======================================== */

.sheet-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 40;
  display: none;
}

.sheet-overlay.open {
  display: block;
}

.sheet {
  position: fixed;
  background-color: var(--surface-container-lowest);
  z-index: 50;
  height: 100vh;
  width: 350px;
  top: 0;
  left: -350px;
  transition: left var(--transition-base);
  overflow-y: auto;
  border-right: 1px solid var(--border-low);
}

.sheet.open {
  left: 0;
}

.sheet-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border-low);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sheet-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.sheet-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
}

.sheet-content {
  padding: var(--spacing-lg);
}

/* ========================================
   HOVER CARD
   ======================================== */

.hover-card-trigger {
  cursor: pointer;
  position: relative;
}

.hover-card {
  position: absolute;
  background-color: var(--surface-container-lowest);
  border: 1px solid var(--border-low);
  padding: var(--spacing-lg);
  border-radius: 0;
  z-index: 50;
  min-width: 280px;
  display: none;
  top: 100%;
  left: 0;
  margin-top: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.hover-card-trigger:hover .hover-card {
  display: block;
}

/* ========================================
   CONTEXT MENU
   ======================================== */

.context-menu {
  position: fixed;
  background-color: var(--surface-container-lowest);
  border: 1px solid var(--border-low);
  z-index: 100;
  display: none;
  min-width: 180px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.context-menu.show {
  display: flex;
  flex-direction: column;
}

.context-menu-item {
  padding: 12px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--on-surface);
  text-align: left;
  transition: all var(--transition-base);
  border-bottom: 1px solid var(--border-low);
}

.context-menu-item:last-child {
  border-bottom: none;
}

.context-menu-item:hover {
  background-color: var(--surface-subtle);
}

/* ========================================
   DATE PICKER
   ======================================== */

.date-picker {
  position: relative;
}

.date-picker-input {
  width: 100%;
}

.date-picker-calendar {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--surface-container-lowest);
  border: 1px solid var(--border-low);
  padding: var(--spacing-lg);
  z-index: 50;
  display: none;
  margin-top: 8px;
  min-width: 300px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.date-picker.open .date-picker-calendar {
  display: block;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border-low);
}

.calendar-month {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
}

.calendar-nav {
  display: flex;
  gap: 8px;
}

.calendar-nav button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-low);
  background: none;
  cursor: pointer;
  transition: all var(--transition-base);
}

.calendar-nav button:hover {
  background-color: var(--surface-subtle);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
  text-align: center;
}

.calendar-weekday {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  aspect-ratio: 1;
  border: 1px solid var(--border-low);
  background: none;
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition-base);
}

.calendar-day:hover:not(:disabled) {
  background-color: var(--surface-subtle);
}

.calendar-day.selected {
  background-color: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.calendar-day.today {
  font-weight: 600;
}

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

/* ========================================
   TIME PICKER
   ======================================== */

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

.time-input {
  width: 60px;
  text-align: center;
}

.time-separator {
  font-size: 16px;
  font-weight: 600;
}

/* ========================================
   MENUBAR
   ======================================== */

.menubar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-low);
  padding: 0;
}

.menubar-item {
  position: relative;
  padding: 12px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  transition: all var(--transition-base);
}

.menubar-item:hover {
  color: var(--on-surface);
  background-color: var(--surface-subtle);
}

.menubar-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--surface-container-lowest);
  border: 1px solid var(--border-low);
  display: none;
  flex-direction: column;
  min-width: 180px;
  margin-top: 0;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.menubar-item.open .menubar-submenu {
  display: flex;
}

.menubar-submenu-item {
  padding: 12px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--on-surface);
  text-align: left;
  transition: all var(--transition-base);
  border-bottom: 1px solid var(--border-low);
}

.menubar-submenu-item:last-child {
  border-bottom: none;
}

.menubar-submenu-item:hover {
  background-color: var(--surface-subtle);
}

/* ========================================
   MODALS & OVERLAYS
   ======================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: none;
}

.modal-backdrop.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background-color: var(--surface-container-lowest);
  border: 1px solid var(--border-low);
  border-radius: 0;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border-low);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-base);
}

.modal-close:hover {
  background-color: var(--surface-subtle);
}

.modal-body {
  padding: var(--spacing-lg);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 767px) {
  .display-lg {
    font-size: 32px;
    line-height: 1.25;
  }

  .headline-lg {
    font-size: 24px;
  }

  header {
    padding: 0 var(--gutter-mobile);
  }

  .section {
    padding: var(--spacing-2xl) var(--gutter-mobile);
  }
}

/* ========================================
   HERO SEARCH DROPDOWN
   ======================================== */

.hero-search-dropdown {
  display: none !important;
}

.hero-search-dropdown.show {
  display: flex !important;
  flex-direction: column;
}

.hero-search-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--border-low);
  text-decoration: none;
  color: var(--on-surface);
  transition: all var(--transition-base);
}

.hero-search-item:last-child {
  border-bottom: none;
}

.hero-search-item:hover {
  background-color: var(--surface-subtle);
}

.hero-search-item-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.hero-search-item-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.hero-search-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--on-surface);
  display: block;
}

.hero-search-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
}

/* ========================================
   INPUT WITH SPINNER
   ======================================== */

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper .input {
  flex: 1;
  padding-right: 40px;
}

.input-spinner {
  position: absolute;
  right: 12px;
  display: none;
  pointer-events: none;
}

.input-wrapper.loading .input-spinner {
  display: flex;
}
