/* ========================================
   Nord Color Palette & Theme Variables
   ======================================== */

:root {
  /* Nord Color Palette - Base Colors */
  /* Polar Night - Dark backgrounds */
  --nord0: #2e3440;
  --nord1: #3b4252;
  --nord2: #434c5e;
  --nord3: #4c566a;
  
  /* Snow Storm - Light backgrounds */
  --nord4: #d8dee9;
  --nord5: #e5e9f0;
  --nord6: #eceff4;
  
  /* Frost - Blues/Teals */
  --nord7: #8fbcbb;
  --nord8: #88c0d0;
  --nord9: #81a1c1;
  --nord10: #5e81ac;
  
  /* Aurora - Accent colors */
  --nord11: #bf616a; /* red */
  --nord12: #d08770; /* orange */
  --nord13: #ebcb8b; /* yellow */
  --nord14: #a3be8c; /* green */
  --nord15: #b48ead; /* purple */
  
  /* Light Theme - Semantic Mappings */
  --bg-primary: var(--nord6);
  --bg-secondary: var(--nord5);
  --bg-tertiary: var(--nord4);
  --text-primary: var(--nord0);
  --text-secondary: var(--nord3);
  --border: var(--nord4);
  --accent: var(--nord10);
  --accent-hover: var(--nord9);
  --success: var(--nord14);
  --warning: var(--nord13);
  --danger: var(--nord11);
  --info: var(--nord8);
}

[data-theme="dark"] {
  --bg-primary: var(--nord0);
  --bg-secondary: var(--nord1);
  --bg-tertiary: var(--nord2);
  --text-primary: var(--nord6);
  --text-secondary: var(--nord4);
  --border: var(--nord3);
  --accent: var(--nord8);
  --accent-hover: var(--nord7);
}

/* ========================================
   Base Styles
   ======================================== */

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

html {
  font-size: 16px;
  line-height: 1.6;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.app-layout {
  min-height: 100vh;
  display: flex;
}

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

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

code {
  background-color: var(--bg-secondary);
  color: var(--accent);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
  font-size: 0.9em;
}

/* ========================================
   Sidebar Navigation
   ======================================== */

.sidebar {
  width: 240px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
}

.sidebar-header {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-header .logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.25rem;
  transition: color 0.2s ease;
}

.sidebar-header .logo:hover {
  color: var(--accent);
}

.logo-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.logo-text {
  font-weight: 700;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.nav-link.active {
  background-color: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  font-weight: 600;
}

.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 70%;
  background-color: var(--accent);
  border-radius: 0 2px 2px 0;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-text {
  font-size: 0.9375rem;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
}

.sidebar-footer-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.theme-toggle,
.logout-button {
  flex: 1;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.625rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover,
.logout-button:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--accent);
}

.logout-button:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.theme-icon,
.logout-icon {
  width: 20px;
  height: 20px;
}

.current-user {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  min-height: 100vh;
}

/* ========================================
   Flash Messages
   ======================================== */

.flash-messages {
  padding: 1rem 2rem 0;
}

.flash {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-left: 4px solid;
}

.flash.success {
  background-color: color-mix(in srgb, var(--success) 15%, transparent);
  border-left-color: var(--success);
  color: var(--text-primary);
}

.flash.alert, .flash.error {
  background-color: color-mix(in srgb, var(--danger) 15%, transparent);
  border-left-color: var(--danger);
  color: var(--text-primary);
}

.flash.notice {
  background-color: color-mix(in srgb, var(--info) 15%, transparent);
  border-left-color: var(--info);
  color: var(--text-primary);
}

/* ========================================
   Main Content
   ======================================== */

main {
  padding: 2rem;
  flex: 1;
}

main > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.search-container {
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}

.search-input {
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

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

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

.button,
button[type="submit"],
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

.button svg,
button[type="submit"] svg,
input[type="submit"] svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.button-primary,
button[type="submit"],
input[type="submit"] {
  background-color: var(--accent);
  color: var(--nord6);
  border-color: var(--accent);
}

.button-primary:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--nord6);
}

.button-secondary {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border);
}

.button-secondary:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--accent);
  color: var(--text-primary);
}

.button-danger {
  background-color: var(--danger);
  color: var(--nord6);
  border-color: var(--danger);
}

.button-danger:hover {
  background-color: var(--nord11);
  opacity: 0.9;
  color: var(--nord6);
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ========================================
   Forms
   ======================================== */

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* Toggle Switch Checkbox */
.checkbox-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1.75rem;
}

.checkbox-toggle input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 48px;
  height: 26px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.checkbox-toggle input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background-color: var(--bg-primary);
  border-radius: 50%;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.checkbox-toggle input[type="checkbox"]:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.checkbox-toggle input[type="checkbox"]:checked::before {
  transform: translateX(22px);
  background-color: white;
}

.checkbox-toggle input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.checkbox-toggle .toggle-label {
  margin-bottom: 0;
  font-weight: 400;
  cursor: pointer;
}

/* Combobox */
.combobox {
  position: relative;
}

.combobox input[type="text"] {
  width: 100%;
}

.combobox-list {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 6px 6px;
  z-index: 100;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.combobox-option {
  padding: 0.625rem 1rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.combobox-option:hover,
.combobox-option.selected {
  background-color: var(--bg-tertiary);
}

.combobox-option.selected {
  background-color: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
}

.error {
  background-color: color-mix(in srgb, var(--danger) 15%, transparent);
  border: 1px solid var(--danger);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.error h2 {
  color: var(--danger);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.error ul {
  list-style-position: inside;
  color: var(--text-primary);
}

/* ========================================
   Sites List
   ======================================== */

.sites-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.site-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.site-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 15%, transparent);
}

.site-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.site-card h2 a {
  color: var(--text-primary);
}

.site-card h2 a:hover {
  color: var(--accent);
}

.site-slug {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.site-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.site-actions .button {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}

/* ========================================
   Site Details
   ======================================== */

.site-details dl {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.site-details dt {
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}

.site-details dt:first-child {
  margin-top: 0;
}

.site-details dd {
  color: var(--text-primary);
  margin-left: 0;
}

/* ========================================
   Repository Tree
   ======================================== */

.repository-tree {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.file-list {
  list-style: none;
}

.file-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: background-color 0.2s ease;
}

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

.file-item:hover {
  background-color: var(--bg-tertiary);
}

.file-icon {
  font-size: 1.25rem;
}

.file-name {
  font-family: "SF Mono", Monaco, monospace;
  color: var(--text-primary);
}

/* ========================================
   Dealers
   ======================================== */

.map-section {
  margin-bottom: 3rem;
}

.map-section h2 {
  margin-bottom: 1rem;
}

.map-container {
  height: 400px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.dealers-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.dealer-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.dealer-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 15%, transparent);
}

.dealer-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.dealer-card-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

.dealer-card-header h3 a {
  color: var(--text-primary);
}

.dealer-card-header h3 a:hover {
  color: var(--accent);
}

.location-count {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.dealer-locations {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.location-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  background-color: var(--bg-primary);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.location-icon {
  flex-shrink: 0;
  color: var(--accent);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: flex-start;
  padding-top: 0.125rem;
}

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

.location-info {
  flex: 1;
  font-size: 0.9375rem;
  line-height: 1.5;
}

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

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

.location-contact {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.25rem;
}

.badge-info {
  background-color: color-mix(in srgb, var(--info) 20%, transparent);
  color: var(--info);
  border: 1px solid var(--info);
}

.no-locations {
  color: var(--text-secondary);
  font-style: italic;
  font-size: 0.9375rem;
  margin: 0.5rem 0;
}

/* Dealer Detail Page */
.dealer-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.dealer-locations-section h2,
.dealer-map-section h2 {
  margin-bottom: 1rem;
}

.location-cards {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.location-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.location-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.location-card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1rem;
}

.location-card dt {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.location-card dd {
  color: var(--text-primary);
  margin: 0;
  font-size: 0.9375rem;
}

.dealer-map-section {
  position: sticky;
  top: 2rem;
  height: fit-content;
}

.dealer-detail-map {
  height: 400px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

@media (max-width: 900px) {
  .dealer-detail-layout {
    grid-template-columns: 1fr;
  }
  
  .dealer-map-section {
    position: static;
    order: -1;
  }
}

.dealer-card-actions {
  display: flex;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}

.action-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.action-link:hover {
  color: var(--accent);
}

.action-link svg {
  width: 16px;
  height: 16px;
}

/* ========================================
   Utilities
   ======================================== */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
  font-size: 1.125rem;
}

.back-link {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.back-link a {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.back-link a:hover {
  color: var(--accent);
}

/* ========================================
   Version History
   ======================================== */

.versions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.version-item {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.version-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.version-event {
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
}

.version-event.create {
  background-color: color-mix(in srgb, var(--success) 20%, transparent);
  color: var(--success);
  border: 1px solid var(--success);
}

.version-event.update {
  background-color: color-mix(in srgb, var(--info) 20%, transparent);
  color: var(--info);
  border: 1px solid var(--info);
}

.version-event.destroy {
  background-color: color-mix(in srgb, var(--danger) 20%, transparent);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.version-date {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.version-user {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-style: italic;
}

.version-changes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.change-item {
  font-size: 0.9375rem;
  line-height: 1.5;
}

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

.old-value {
  color: var(--danger);
  text-decoration: line-through;
}

.new-value {
  color: var(--success);
}

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

/* ========================================
   Auth Pages
   ======================================== */

.auth-body {
  background-color: var(--bg-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 1rem;
}

.auth-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.auth-logo-icon {
  width: 40px;
  height: 40px;
  color: var(--accent);
}

.auth-logo-text {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

.auth-title {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.auth-form .form-group {
  margin-bottom: 1.25rem;
}

.auth-form label {
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.auth-form input[type="email"],
.auth-form input[type="password"] {
  padding: 0.875rem 1rem;
  font-size: 1rem;
}

.auth-form button[type="submit"],
.auth-form input[type="submit"] {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  margin-top: 0.5rem;
}

.auth-links {
  margin-top: 1.5rem;
  text-align: center;
}

.auth-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.auth-links a:hover {
  color: var(--accent);
}

.auth-flash {
  padding: 0.875rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.auth-flash.alert {
  background-color: color-mix(in srgb, var(--danger) 15%, transparent);
  border: 1px solid var(--danger);
  color: var(--danger);
}

.auth-flash.notice {
  background-color: color-mix(in srgb, var(--success) 15%, transparent);
  border: 1px solid var(--success);
  color: var(--success);
}

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

@media (max-width: 768px) {
  .app-layout {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  
  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
  }
  
  .nav-link.active::before {
    left: 50%;
    transform: translateX(-50%);
    top: auto;
    bottom: 0;
    width: 70%;
    height: 3px;
  }
  
  main {
    padding: 1rem;
  }
  
  main > header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .sites-list {
    grid-template-columns: 1fr;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .button,
  button[type="submit"],
  input[type="submit"] {
    width: 100%;
  }
}
