/* Alloy design tokens — the canonical source for both applications. */
:root {
  color-scheme: dark;

  --color-background-primary: #111111;
  --color-background-surface: #111111;
  --color-background-raised: #161616;
  --color-background-hover: #1e1e1e;
  --color-text-primary: #eaeaea;
  --color-text-muted: #a3a3a3;
  --color-text-subtle: #888888;
  --color-border-default: #333333;
  --color-border-strong: #666666;
  --color-action-primary: #eaeaea;
  --color-action-primary-text: #111111;
  --color-action-primary-hover: #ffffff;
  --color-status-success: #4ade80;
  --color-status-warning: #facc15;
  --color-status-danger: #ff6565;
  --color-input-background: #1e1e1e;
  --color-input-border: #333333;
  --color-navigation-background: #111111;
  --color-navigation-border: #222222;
  --color-navigation-text: #eaeaea;
  --color-navigation-muted: #888888;

  --font-family-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.85rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.2rem;
  --font-size-xl: 2rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --radius-control: 4px;
  --radius-dialog: 8px;
  --size-control-sm: 35px;
  --size-control-touch: 44px;
  --shadow-popover: 0 8px 24px rgb(0 0 0 / 16%);
  --shadow-dialog: 0 8px 32px rgb(0 0 0 / 20%);
  --duration-fast: 150ms;
  --duration-normal: 200ms;
  --duration-theme: 400ms;
  --ease-standard: ease;
  --z-navigation: 50;
  --z-popover: 203;
  --z-dialog-backdrop: 200;
  --z-dialog: 201;
  --focus-ring-color: var(--color-text-primary);
  --focus-ring-width: 1px;

  /* Compatibility aliases. New component CSS uses semantic tokens. */
  --bg: var(--color-background-primary);
  --surface: var(--color-background-surface);
  --surface-raised: var(--color-background-raised);
  --fg: var(--color-text-primary);
  --muted: var(--color-text-muted);
  --subtle: var(--color-text-subtle);
  --border: var(--color-border-default);
  --border-strong: var(--color-border-strong);
  --hover: var(--color-background-hover);
  --status-active: var(--color-status-success);
  --status-warn: var(--color-status-warning);
  --status-error: var(--color-status-danger);
  --success: var(--color-status-success);
  --warning: var(--color-status-warning);
  --error: var(--color-status-danger);
  --input-bg: var(--color-input-background);
  --input-border: var(--color-input-border);
  --input-text: var(--color-text-primary);
  --input-placeholder: var(--color-text-muted);
  --nav-bg: var(--color-navigation-background);
  --nav-border: var(--color-navigation-border);
  --nav-text: var(--color-navigation-text);
  --nav-hover: #ffffff;
  --nav-text-muted: var(--color-navigation-muted);
  --nav-muted: var(--color-navigation-muted);
  --font-mono: var(--font-family-mono);
  --mono: var(--font-family-mono);
  --sans: var(--font-family-sans);
  font-family: var(--font-family-sans);
  box-sizing: border-box;
}

[data-theme="light"] {
  color-scheme: light;
  --color-background-primary: #ffffff;
  --color-background-surface: #ffffff;
  --color-background-raised: #ffffff;
  --color-background-hover: #f0f0f0;
  --color-text-primary: #111111;
  --color-text-muted: #666666;
  --color-text-subtle: #888888;
  --color-border-default: #eaeaea;
  --color-border-strong: #8a8a8a;
  --color-action-primary: #111111;
  --color-action-primary-text: #ffffff;
  --color-action-primary-hover: #333333;
  --color-status-success: #16803c;
  --color-status-warning: #8a5a00;
  --color-status-danger: #c62e2e;
  --color-input-background: #f9f9f9;
  --color-input-border: #dddddd;
}

:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: 2px;
    box-shadow: none;
}

input:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: none;
    border-color: var(--fg);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

[data-reduced-motion="true"] *,
[data-reduced-motion="true"] *::before,
[data-reduced-motion="true"] *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
*, *::before, *::after {
    box-sizing: inherit;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

body {
  margin: 0;
  transition: background-color 0.4s ease, color 0.4s ease;
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.6;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.layout-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 100px 20px;
    position: relative;
}

.page {
    animation: fadeIn 0.35s ease both;
}

.tab-content {
    animation: fadeIn 0.3s ease both;
}

.grid > div {
    animation: fadeInUp 0.35s ease both;
}
.grid > div:nth-child(1) { animation-delay: 0s; }
.grid > div:nth-child(2) { animation-delay: 0.05s; }
.grid > div:nth-child(3) { animation-delay: 0.1s; }

.modal-backdrop {
    animation: fadeIn 0.2s ease both;
}

.modal-card {
    animation: scaleIn 0.2s ease both;
}

.page h1,
h1 {
    font-family: var(--font-family-mono);
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 2rem;
    letter-spacing: -0.03em;
}

/* Headings & Typography enhancements */
h2 {
    font-weight: 500;
    font-size: 1.5rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

h3 {
    font-weight: 500;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.metric-value {
    color: var(--fg);
    font-size: 3rem;
    font-weight: 400;
    line-height: 1.2;
    margin: 0;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.metric-label {
    color: var(--muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

/* Grids and Lists */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 767px) {
    .grid-2col {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

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

.bare-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.bare-list li:last-child {
    border-bottom: none;
}

/* Forms and Inputs */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--muted);
    font-size: 0.85rem;
}

input,
textarea {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 4px;
    color: var(--input-text);
    font-family: var(--font-mono);
    outline: none;
    transition: border-color 0.2s, background-color 0.2s;
    width: 100%;
}

input {
    min-height: 35px;
    padding: 0.4rem 0.65rem;
    font-size: 0.85rem;
}

textarea {
    padding: 0.75rem;
    font-size: 0.9rem;
}

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

input:focus, textarea:focus {
    border-color: var(--fg);
}

/* Buttons */
.btn-primary {
    background-color: var(--fg);
    color: var(--bg);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 4px;
    font-weight: 500;
    transition: opacity 0.2s;
    display: inline-block;
    text-align: center;
}

.btn-primary:hover {
    opacity: 0.8;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
}

.modal-card {
    position: fixed;
    z-index: 201;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 380px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.modal-card-large {
    width: 720px;
    max-width: 95vw;
    height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-card-large .log-console {
    flex: 1;
    max-height: none;
    margin-top: 0.75rem;
    box-shadow: none;
}

.modal-card h2 {
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 600;
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    transition: color 0.15s;
}
.modal-close:hover {
    color: var(--fg);
}





.modal-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.25rem;
}
.modal-actions .btn-primary,
.modal-actions .btn-secondary,
.modal-actions .btn-danger {
    flex: 1;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-secondary {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-block;
    text-align: center;
}
.btn-secondary:hover {
    background: var(--hover);
}

.modal-danger-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.btn-danger {
    background: transparent;
    color: var(--status-error);
    border: 1px solid var(--status-error);
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-danger:hover {
    background: rgba(239,68,68,0.08);
}

.btn-danger.btn-danger-warn:hover {
    background: var(--status-error);
    color: #fff;
}

.modal-card hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1rem 0;
}

/* Tables */
.bare-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    font-size: 0.9rem;
}

.bare-table th {
    text-align: left;
    font-weight: normal;
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    padding: 0.5rem 0.75rem;
}

.bare-table td {
    padding: 0.5rem 0.75rem;
    min-height: 36px;
}

.clickable-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.clickable-row:hover {
    background: var(--hover);
}


/* Table filters */
.table-filters {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-input {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--input-bg);
    color: var(--input-text);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    outline: none;
    min-width: 160px;
    width: auto;
    flex: 1 1 160px;
    max-width: 280px;
}

.filter-input:focus {
    border-color: var(--fg);
}

.filter-select {
    box-sizing: border-box;
    height: 36px;
    min-height: 36px;
    padding: 0 0.65rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background-color: var(--input-bg);
    background-image: none;
    color: var(--input-text);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-shadow: none;
}

.filter-select:focus {
    border-color: var(--fg);
    box-shadow: none;
}

/* Custom select */
.cs-wrap {
    position: relative;
    width: max-content;
}

.cs-wrap.form-control {
    width: 100%;
}

.cs-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 100%;
    white-space: nowrap;
    text-align: left;
}

.cs-backdrop {
    position: fixed;
    inset: 0;
    z-index: 202;
    width: 100vw;
    height: 100vh;
    padding: 0;
    background: transparent;
    cursor: default;
}

.cs-drop {
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    z-index: 203;
    min-width: 100%;
    width: max-content;
    overflow: hidden;
    padding: 0.2rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    animation: slideDown 0.15s ease both;
}

.cs-opt {
    display: block;
    width: 100%;
    padding: 0.45rem 0.6rem;
    color: var(--muted);
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-align: left;
    white-space: nowrap;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.cs-opt:hover,
.cs-opt:focus-visible {
    color: var(--fg);
    background: var(--hover);
    outline: none;
}

.cs-opt-selected {
    color: var(--fg);
}

/* Navigation */

.app-header-bar {
    width: 100%;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
}

/* Base Mobile Navbar (Top bar with hamburger) */
.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--nav-bg);
    color: var(--nav-text);
    min-height: 56px;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--nav-border);
}

.logo-text {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: -1px;
    color: var(--nav-text);
    text-decoration: none;
}

.hamburger-btn {
    color: var(--nav-text);
    font-size: 1.2rem;
    min-width: 44px;
    min-height: 44px;
}

/* Sidebar Overlay (Mobile) */
.nav-menu-container {
    position: fixed;
    top: 0; left: 0;
    width: min(300px, 100vw);
    height: 100dvh;
    background: var(--nav-bg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--nav-border);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.nav-menu-container.open {
    transform: translateX(0);
    visibility: visible;
}

.nav-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--nav-border);
}

.close-btn {
    color: var(--nav-text);
    font-size: 1rem;
    background: #222;
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

.nav-links {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    overflow-y: auto;
    flex-grow: 1; /* Push actions down on mobile */
    margin: 0;
}

.nav-item {
    color: var(--nav-text);
    text-decoration: none;
    font-family: var(--font-mono);
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    transition: background-color 0.1s;
}

.nav-item:hover {
    color: var(--nav-hover);
    background: #1a1a1a;
}

/* Backdrop */
.nav-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
.nav-backdrop.open {
    display: block;
}


/* Desktop overlay override */
@media (min-width: 768px) {
    .mobile-header {
        display: none;
    }

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

    .nav-menu-container {
        position: static;
        width: 100%;
        height: auto;
        min-height: 56px;
        max-width: 1100px;
        margin: 0 auto;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0 2rem;
        transform: translateX(0);
        visibility: visible;
        border-right: none;
        border-bottom: 1px solid var(--nav-border);
        transition: none;
    }

    .nav-sidebar-header {
        border-bottom: none;
        padding: 1rem 0;
    }

    .close-btn {
        display: none;
    }

    .nav-links {
        flex-direction: row;
        padding: 0;
        overflow-y: visible;
        flex-grow: 0;
        margin: 0 auto;
        display: flex;
        justify-content: center;
        gap: 1rem;
    }

    .nav-item {
        padding: 1.5rem 1rem;
    }

    .nav-item:hover {
        background: transparent;
    }
}

/* Actions and Buttons */

.theme-icon-btn {
    background: transparent;
    border: none;
    color: var(--nav-text-muted);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    min-width: 44px;
    min-height: 44px;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}
.theme-icon-btn:hover {
    color: var(--nav-hover);
    background: rgba(255,255,255, 0.05); /* Slight highlight */
}
.theme-icon-btn:active {
    transform: scale(0.9);
}
.theme-icon-svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: fill 0.3s;
}

@keyframes spin-softly {
    0% { transform: rotate(0deg); opacity: 0; }
    100% { transform: rotate(360deg); opacity: 1; }
}
.theme-animate {
    animation: spin-softly 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eaeaea;
    color: #111111;
    font-family: var(--font-mono);
    font-weight: bold;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    margin: 0;
}
.nav-login-btn:hover {
    background: #ffffff;
}

.nav-user-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--nav-text);
    margin: 0;
}

.nav-logout-link {
    color: var(--nav-text-muted);
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
}
.nav-logout-link:hover {
    color: var(--nav-hover);
}

/* Nav Actions Container */
.nav-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--nav-border);
    margin-top: auto;
    /* Default direction: row (Theme on left, Auth on right) */
    flex-direction: row;
}

@media (min-width: 768px) {
    .nav-actions {
        border-top: none;
        padding: 0;
        margin-top: 0;
        justify-content: flex-end;
        gap: 1rem;
        /* Desktop direction: row-reverse. Flips order so Auth is left, Theme is right. */
        flex-direction: row-reverse;
    }
}

/* Page subtitle */
.page-subtitle {
    color: var(--muted);
    font-size: 1rem;
    margin-top: 0.25rem;
}

/* Consistent section spacing within pages */
.page-block {
    margin-top: 4rem;
}

/* Footer bar at bottom of a page */
.page-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}



/* Small muted text */
.muted-text {
    color: var(--muted);
    font-size: 0.9rem;
}

/* Price values on purchase page */
.price-value {
    font-size: 2.5rem;
    margin-bottom: 0;
}

.price-note {
    color: var(--muted);
    font-size: 0.9rem;
}

/* Pricing card spacing */
.grid > div h3 {
    margin-bottom: 0;
}

.grid > div .btn-primary {
    margin-top: 2rem;
}

/* Outline Download buttons */
.outline-btn {
    border: 1px solid var(--border);
    color: var(--fg);
    background: transparent;
    padding: 0.4rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

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

/* Dashboard tabs */
.tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s, border-color 0.2s;
}

.tab-btn:hover {
    color: var(--fg);
}

.tab-btn.tab-active {
    color: var(--fg);
    border-bottom-color: var(--fg);
}

.tab-content {
    margin-top: 2rem;
}

/* Chat layout */
.chat-layout {
    display: flex;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 4px;
    min-height: 320px;
}

.chat-sidebar {
    flex: 0 0 200px;
    border-right: 1px solid var(--border);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
}

.chat-conv-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-conv {
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.6rem;
    cursor: pointer;
    border-radius: 3px;
    font-size: 0.85rem;
    transition: background 0.15s;
}

.chat-conv:hover {
    background: var(--hover);
}

.chat-conv.active {
    background: var(--hover);
}

.chat-conv-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-msgs {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.msg {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    animation: fadeInUp 0.25s ease both;
}
.msg:nth-child(1) { animation-delay: 0s; }
.msg:nth-child(2) { animation-delay: 0.03s; }
.msg:nth-child(3) { animation-delay: 0.06s; }
.msg:nth-child(4) { animation-delay: 0.09s; }
.msg:nth-child(5) { animation-delay: 0.12s; }

.msg.user {
    align-self: flex-end;
    align-items: flex-end;
    border-right: 3px solid var(--fg);
    padding-right: 0.75rem;
}

.msg.support {
    align-self: flex-start;
    align-items: flex-start;
    border-left: 3px solid var(--muted);
    padding-left: 0.75rem;
}

.msg-bubble {
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-word;
}

.msg.user .msg-bubble {
    background: none;
    color: var(--fg);
}

.msg.support .msg-bubble {
    background: var(--hover);
    color: var(--fg);
    border-bottom-left-radius: 2px;
}

.msg-system {
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    color: var(--muted);
    padding: 0.25rem 0;
    text-align: center;
}

.msg-time {
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 2px;
}

.chat-input-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid var(--border);
    align-items: center;
}

.chat-input {
    flex: 1;
    width: auto;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    outline: none;
}

.chat-input:focus {
    border-color: var(--fg);
}

@media (max-width: 767px) {
    .chat-layout {
        flex-direction: column;
        min-height: 240px;
    }
    .chat-sidebar {
        flex: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 0.5rem;
    }
    .chat-conv-list {
        flex-direction: row;
        overflow-x: auto;
        gap: 0.25rem;
        padding-bottom: 0.25rem;
    }
    .chat-conv {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
        border: 1px solid var(--border);
        border-radius: 4px;
    }
    .chat-conv.active {
        border-color: var(--fg);
    }
    .chat-msgs {
        padding: 0.5rem;
    }
    .msg {
        max-width: 90%;
    }
}

/* Mobile: smaller paddings and gaps */
@media (max-width: 767px) {
    .layout-container {
        padding: 60px 16px;
        overflow-x: hidden;
    }
    .grid {
        gap: 1.5rem;
    }
    .page h1 {
        font-size: 1.5rem;
    }
    .metric-value {
        font-size: 2.2rem;
    }
    .tab-bar {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .tab-bar::-webkit-scrollbar {
        display: none;
    }
    .tab-btn {
        flex-shrink: 0;
        margin-bottom: 0;
    }
    .bare-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* System Console Logs */
.log-console {
    background: var(--input-bg);
    color: var(--fg);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.75rem;
    border-radius: 4px;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid var(--border);
    margin-top: 0.5rem;
    text-align: left;
}

.log-line {
    white-space: pre-wrap;
    line-height: 1.4;
    margin-bottom: 0.2rem;
}

.log-line.info {
    color: var(--fg);
}
.log-line.warn {
    color: var(--status-error);
}

/* Shared utilities and component patterns */
.icon {
    display: block;
    fill: none;
}

.icon--medium {
    width: 1.25rem;
    height: 1.25rem;
}

.text-link {
    color: var(--fg);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.btn-primary,
.btn-secondary,
.outline-btn {
    text-decoration: none;
}

button:disabled,
.btn-primary:disabled,
.outline-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.button-block {
    width: 100%;
}

.auth-page {
    max-width: 400px;
    margin: 0 auto;
}

.notice-card {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.form-footer {
    margin-top: 1rem;
    text-align: center;
}

.field-label {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    margin: 0.75rem 0 0.3rem;
}

.form-control {
    width: 100%;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.status-active { color: var(--status-active); }
.status-warning { color: var(--status-warn); }
.status-inactive { color: var(--muted); }

.cell-mono { font-family: var(--font-mono); }
.cell-muted { color: var(--muted); }
.table-primary-action { margin-left: auto; }
.btn-compact { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.modal-card-wide { width: 520px; }

.details-list,
.details-grid {
    margin: 0;
}

.details-list > div {
    margin-bottom: 0.75rem;
}

.details-list dt,
.detail-card dt {
    color: var(--muted);
    font-size: 0.75rem;
}

.details-list dd,
.detail-card dd {
    margin: 0.2rem 0 0;
    font-family: var(--font-mono);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.detail-card {
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.75rem;
}

.segmented-control {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.segmented-control__option {
    padding: 0.4rem 0.5rem;
    min-width: 38px;
    text-align: center;
    box-sizing: border-box;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.segmented-control__option + .segmented-control__option {
    border-left: 1px solid var(--border);
}

.segmented-control__option:hover { background: var(--hover); }
.segmented-control__option.is-active { background: var(--fg); color: var(--bg); }

.monitoring-toolbar,
.section-heading,
.settings-action-row,
.contact-row,
.download-row,
.download-target {
    display: flex;
    align-items: center;
}

.monitoring-toolbar {
    gap: 0.75rem;
    flex-wrap: wrap;
}

.monitoring-grid { margin-top: 2rem; }

.metric-chart {
    aspect-ratio: 1;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.metric-chart__title { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.metric-chart__body { display: flex; gap: 0.5rem; flex: 1; min-height: 0; }
.metric-chart__axis { display: flex; flex-direction: column; justify-content: space-between; color: var(--muted); font-family: var(--font-mono); font-size: 0.65rem; text-align: right; }
.metric-chart__plot { width: 100%; height: 100%; overflow: visible; }
.chart-grid-line { stroke: var(--border); stroke-width: 0.5; vector-effect: non-scaling-stroke; }
.chart-line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart-line--primary { stroke: var(--fg); }
.chart-line--secondary { stroke: var(--muted); stroke-dasharray: 4 3; }

.section-heading { margin: 4rem 0 1rem; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.section-heading h2 { margin-top: 0; }
.config-editor { min-height: 22rem; resize: vertical; }
.form-note { margin-top: 0.5rem; color: var(--muted); font-size: 0.8rem; }

.display-title { letter-spacing: -1px; }
.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 4rem; }
.download-section-header { margin: 0 0 2rem; font-size: 1rem; }
.section-index { color: var(--muted); }
.download-commands { display: flex; flex-direction: column; gap: 1.5rem; font-family: var(--font-mono); }
.coming-soon { padding: 1rem 0; font-style: italic; }
.download-row { justify-content: space-between; gap: 1rem; }
.download-target { gap: 0.5rem; color: var(--muted); min-width: 0; }
.download-icon { width: 18px; height: 18px; flex: 0 0 auto; fill: currentColor; }
.download-icon__cutout { fill: var(--bg); }

.mono-title { font-family: var(--font-mono); }
.feature-list { list-style: none; padding: 0; color: var(--muted); }
.feature-list li { padding: 0.35rem 0; }
.contact-list { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-row { align-items: baseline; gap: 0.5rem; }
.contact-label { color: var(--muted); font-family: var(--font-mono); }
.faq-answer { margin-top: 0.5rem; }

.section-intro { margin-bottom: 2rem; }
.device-list { display: flex; flex-direction: column; gap: 1rem; }
.device-card { display: flex; align-items: center; padding: 1rem; border: 1px solid var(--border); border-radius: 4px; }
.compact-text { font-size: 0.8rem; }
.device-summary { margin-top: 2rem; font-size: 0.8rem; }
.new-appeal-button { width: 100%; margin-bottom: 0.75rem; font-size: 0.85rem; }
.chat-send { padding: 0.5rem 1rem; font-size: 0.85rem; }
.section-title-flush { margin-top: 0; }
.settings-block { margin-top: 1.25rem; }
.settings-form { display: flex; flex-direction: column; gap: 0.75rem; }
.settings-form .form-group { margin-bottom: 0; }
.settings-form .field-label { margin: 0 0 0.3rem; }
.settings-form .btn-primary { padding: 0.5rem 1rem; font-size: 0.85rem; }
.align-start { align-self: flex-start; }
.settings-section { border-top: 1px solid var(--border); padding-top: 1rem; }
.settings-action-row { gap: 0.75rem; }
.push-right { margin-left: auto; }

@media (max-width: 767px) {
    .details-grid { grid-template-columns: 1fr; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .download-row { align-items: flex-start; flex-direction: column; }
    .settings-action-row { align-items: flex-start; flex-direction: column; }
    .push-right { margin-left: 0; }
}

/* Utility: hide elements (used by Modal and other conditional components) */
.is-hidden {
    display: none !important;
}

/* Canonical application primitives shared by panel and client. */
.page-header { margin-bottom: var(--space-16); }
.page-header h1 { margin: 0 0 var(--space-2); font-size: var(--font-size-xl); line-height: 1.25; font-weight: 500; }
.page-header p { max-width: 590px; margin: var(--space-1) 0 0; color: var(--color-text-muted); font-size: var(--font-size-md); }
.eyebrow {
    color: var(--color-text-muted);
    font: 400 0.8rem/1.2 var(--font-family-mono);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.section-heading p { margin: 0; color: var(--color-text-muted); font-size: 0.9rem; }
.metric { min-width: 0; padding: 0; display: flex; flex-direction: column; }
.metric-detail { margin-top: 0.35rem; color: var(--color-text-muted); font-size: 0.8rem; }
.setting-row {
    width: 100%;
    min-height: 72px;
    padding: var(--space-3) var(--space-1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    border-bottom: 1px solid var(--color-border-default);
    text-align: left;
}
.setting-copy { min-width: 0; display: flex; flex-direction: column; }
.setting-copy small { margin-top: 0.2rem; }
.switch-toggle {
    width: 44px;
    height: 24px;
    padding: 2px;
    background: var(--color-border-default, #333);
    border-radius: 12px;
    border: none;
    cursor: pointer;
    position: relative;
    transition: background 0.2s ease;
    flex-shrink: 0;
}
.switch-toggle.is-on {
    background: var(--color-action-primary, #3b82f6);
}
.switch-toggle__thumb {
    display: block;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}
.switch-toggle.is-on .switch-toggle__thumb {
    transform: translateX(20px);
}
.icon { width: 20px; height: 20px; flex: 0 0 auto; }
.icon-button {
    width: var(--size-control-touch);
    height: var(--size-control-touch);
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: var(--radius-control);
    color: var(--color-navigation-muted);
}
.icon-button:hover:not(:disabled) { color: var(--color-navigation-text); background: rgb(255 255 255 / 5%); }
.icon-button:active:not(:disabled) { transform: scale(0.96); }
.form-error { margin: 0 0 var(--space-4); color: var(--color-status-danger); font-size: 0.8rem; }
.empty-state,
.error-state { margin: 0; padding: var(--space-8) var(--space-3); text-align: center; }
.empty-state { color: var(--color-text-muted); }
.error-state { color: var(--color-status-danger); }
.spinner {
    width: 1.25rem;
    height: 1.25rem;
    display: inline-block;
    border: 2px solid var(--color-border-default);
    border-top-color: var(--color-text-primary);
    border-radius: 50%;
    animation: alloy-spin 0.8s linear infinite;
}
@keyframes alloy-spin { to { transform: rotate(360deg); } }
.toast {
    position: fixed;
    z-index: calc(var(--z-dialog) - 10);
    right: max(20px, env(safe-area-inset-right));
    bottom: calc(96px + env(safe-area-inset-bottom));
    width: min(360px, calc(100% - 40px));
    min-height: 54px;
    padding: 0.6rem 0.6rem 0.6rem 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    border: 1px solid var(--color-border-default);
    border-left-width: 3px;
    border-radius: var(--radius-control);
    background: var(--color-background-primary);
    box-shadow: var(--shadow-popover);
    animation: fadeInUp var(--duration-fast) var(--ease-standard) both;
    text-align: left;
    cursor: pointer;
}
.toast__content {
    display: block;
    width: 100%;
}
.toast.success { border-left-color: var(--color-status-success); }
.toast.warning { border-left-color: var(--color-status-warning); }
.toast.error { border-left-color: var(--color-status-danger); }
.cs-opt-active { color: var(--color-text-primary); background: var(--color-background-hover); }
.segmented-control__option[aria-pressed="true"] { background: var(--color-action-primary); color: var(--color-action-primary-text); }

.panel,
.card {
    border: 1px solid var(--color-border-default);
    border-radius: var(--radius-control);
    background: var(--color-background-surface);
}

.panel {
    padding: var(--space-4);
}

.card {
    padding: var(--space-6);
    box-shadow: none;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-3) var(--space-4);
}

.detail-item__label {
    color: var(--color-text-muted);
    font: 400 0.75rem/1.2 var(--font-family-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-item__value {
    margin: 0;
    font-family: var(--font-family-mono);
    color: var(--color-text-primary);
}

.row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.download-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border-default);
}

.download-target {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    font-family: var(--font-family-mono);
}

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

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

@media (max-width: 680px) {
    .page-header { margin-bottom: var(--space-12); }
    .page-header h1 { font-size: 1.5rem; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: var(--space-3); }
    .setting-row { gap: var(--space-3); }
}

@media (max-width: 767px) {
    .download-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .row-actions {
        justify-content: flex-start;
    }
}

/* Darksignal screenshot baseline overrides. */
:root {
    --font-family-sans: "Plus Jakarta Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-family-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --color-background-primary: #ffffff;
    --color-background-surface: #ffffff;
    --color-background-raised: #f8f8f8;
    --color-background-hover: #f2f2f2;
    --color-text-primary: #111111;
    --color-text-muted: #666666;
    --color-text-subtle: #8a8a8a;
    --color-border-default: #efefef;
    --color-border-strong: #d8d8d8;
    --color-action-primary: #111111;
    --color-action-primary-text: #ffffff;
    --color-action-primary-hover: #2b2b2b;
    --color-status-success: #4ed883;
    --color-status-warning: #a37918;
    --color-status-danger: #944a42;
    --color-input-background: #ffffff;
    --color-input-border: #d8d8d8;
    --color-navigation-background: #111111;
    --color-navigation-border: #1f1f1f;
    --color-navigation-text: #eaeaea;
    --color-navigation-muted: #929292;
    --shadow-popover: none;
    --shadow-dialog: 0 18px 44px rgb(0 0 0 / 38%);
    --radius-control: 3px;
    --radius-dialog: 4px;
}

[data-theme="dark"] {
    --color-background-primary: #111111;
    --color-background-surface: #111111;
    --color-background-raised: #1e1e1e;
    --color-background-hover: #181818;
    --color-text-primary: #eaeaea;
    --color-text-muted: #9a9a9a;
    --color-text-subtle: #787878;
    --color-border-default: #232323;
    --color-border-strong: #313131;
    --color-action-primary: #eaeaea;
    --color-action-primary-text: #111111;
    --color-action-primary-hover: #ffffff;
    --color-status-success: #4ed883;
    --color-status-warning: #b08d35;
    --color-status-danger: #9e5e53;
    --color-input-background: #1e1e1e;
    --color-input-border: #2b2b2b;
}

html,
body {
    min-height: 100%;
}

body {
    background: var(--color-background-primary);
    color: var(--color-text-primary);
    font-family: var(--font-family-sans);
    font-size: 14px;
    line-height: 1.5;
}

a {
    color: inherit;
}

input,
textarea,
select {
    border-radius: 3px;
    background: var(--color-input-background);
    border: 1px solid var(--color-input-border);
    color: var(--color-text-primary);
    font-family: var(--font-family-mono);
    font-size: 12px;
}

input,
select {
    min-height: 34px;
    padding: 0.45rem 0.65rem;
}

textarea {
    min-height: 108px;
    padding: 0.65rem;
    line-height: 1.5;
}

.form-group label,
.field-label,
.details-list dt,
.detail-card dt,
.metric-label,
.eyebrow {
    color: var(--color-text-muted);
    font-family: var(--font-family-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.btn-primary,
.btn-secondary,
.btn-danger,
.outline-btn,
.nav-login-btn {
    min-height: 34px;
    padding: 0.45rem 0.8rem;
    border-radius: 3px;
    font-family: var(--font-family-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
}

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

.btn-primary:hover {
    opacity: 1;
    background: var(--color-action-primary-hover);
}

.btn-secondary,
.outline-btn {
    background: transparent;
    color: var(--color-text-primary);
    border: 1px solid var(--color-border-default);
}

.btn-secondary:hover,
.outline-btn:hover {
    background: var(--color-background-hover);
}

.btn-danger {
    color: var(--color-status-danger);
    border-color: color-mix(in srgb, var(--color-status-danger) 44%, transparent);
}

.status-active,
.status-warning,
.status-inactive {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 0.45rem;
    border: 1px solid var(--color-border-default);
    border-radius: 999px;
    font-family: var(--font-family-mono);
    font-size: 11px;
    line-height: 1;
}

.status-active {
    color: var(--color-status-success);
    border-color: color-mix(in srgb, var(--color-status-success) 28%, var(--color-border-default));
}

.status-warning {
    color: var(--color-status-warning);
    border-color: color-mix(in srgb, var(--color-status-warning) 28%, var(--color-border-default));
}

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

.page-header {
    margin-bottom: 1.75rem;
}

.page-header h1,
h1 {
    margin: 0;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    line-height: 1.04;
    letter-spacing: -0.04em;
    font-weight: 500;
}

.page-header p {
    max-width: 34rem;
    margin-top: 0.9rem;
    color: var(--color-text-muted);
    font-size: 14px;
}

.section-heading {
    margin: 0 0 1rem;
}

.section-heading h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.section-heading p {
    margin-top: 0.35rem;
    color: var(--color-text-muted);
    font-size: 13px;
}

.tab-bar {
    gap: 1.15rem;
    margin: 0 0 1.5rem;
    border-bottom: 1px solid var(--color-border-default);
}

.tab-btn {
    padding: 0.7rem 0 0.72rem;
    font-family: var(--font-family-mono);
    font-size: 12px;
    color: var(--color-text-muted);
}

.tab-btn.tab-active {
    color: var(--color-text-primary);
    border-bottom-color: var(--color-text-primary);
}

.bare-table {
    margin-top: 0;
    font-size: 13px;
}

.bare-table th {
    padding: 0 0 0.8rem;
    color: var(--color-text-muted);
    font-family: var(--font-family-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.bare-table td {
    padding: 0.8rem 0;
    border-top: 1px solid var(--color-border-default);
    vertical-align: middle;
}

.clickable-row:hover {
    background: transparent;
}

.modal-backdrop {
    background: rgb(8 8 8 / 88%);
}

.modal-card {
    width: 288px;
    padding: 1rem;
    background: var(--color-background-primary);
    border-color: var(--color-border-default);
    border-radius: 4px;
    box-shadow: var(--shadow-dialog);
}

.modal-card-wide {
    width: 360px;
}

.modal-card-large {
    width: 540px;
    max-width: min(92vw, 540px);
    height: auto;
    max-height: 82vh;
}

.modal-card h2 {
    margin-bottom: 0.85rem;
    padding-right: 1.75rem;
    font-size: 15px;
    font-weight: 500;
}

.modal-close {
    top: 0.65rem;
    right: 0.55rem;
    width: 28px;
    height: 28px;
    padding: 0;
    display: grid;
    place-items: center;
}

.toast {
    background: var(--color-background-primary);
    border-radius: 4px;
    font-size: 12px;
}

.mobile-header {
    min-height: 54px;
    padding: 0 20px;
}

.logo-text {
    font-family: var(--font-family-mono);
    font-size: 25px;
    font-weight: 500;
    letter-spacing: -0.06em;
}

@media (min-width: 768px) {
    .app-header-bar {
        width: 100%;
        background: var(--nav-bg);
        border-bottom: 1px solid var(--nav-border);
    }

    .nav-menu-container {
        width: 100%;
        max-width: 100%;
        min-height: 54px;
        padding: 0 max(20px, calc((100vw - 1280px) / 2));
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 1rem;
        border-bottom: none;
        background: var(--nav-bg);
    }

    .nav-sidebar-header {
        padding: 0;
        justify-self: start;
    }

    .nav-links {
        gap: 1.6rem;
        justify-self: center;
        margin: 0;
    }

    .nav-item {
        padding: 1rem 0;
        font-size: 12px;
        color: var(--color-navigation-text);
    }

    .nav-actions {
        justify-self: end;
        gap: 0.8rem;
    }

    .nav-user-area,
    .nav-login-btn,
    .nav-logout-link {
        font-size: 12px;
    }
}

@media (max-width: 767px) {
    .page-header h1,
    h1 {
        font-size: 2.1rem;
    }
}
