/* =============================================================================
   DIALEDRIDE FIELD APP THEME
   Shared product UI overhaul for workspace, login, admin, and beta admin.
   ============================================================================= */

html.field-theme {
    color-scheme: light;
    --field-paper: #f3efe6;
    --field-paper-strong: #fffaf0;
    --field-ink: #1a2524;
    --field-ink-soft: #33403d;
    --field-muted: #5d6865;
    --field-faint: #7c8580;
    --field-line: rgba(26, 37, 36, 0.16);
    --field-line-strong: rgba(26, 37, 36, 0.28);
    --field-rust: #b85733;
    --field-teal: #2f6f73;
    --field-green: #2f7d59;
    --field-yellow: #a86b1d;
    --field-red: #b84942;
    --field-shadow: 0 18px 36px rgba(49, 38, 26, 0.1);
    --bg: var(--field-paper);
    --surface: rgba(255, 250, 240, 0.9);
    --surface-raised: rgba(255, 250, 240, 0.96);
    --surface-soft: rgba(26, 37, 36, 0.055);
    --border: var(--field-line);
    --border-strong: var(--field-line-strong);
    --gold: var(--field-rust);
    --accent: var(--field-teal);
    --text: var(--field-ink);
    --muted: var(--field-muted);
    --muted-soft: var(--field-faint);
    --danger: var(--field-red);
    --warning: var(--field-yellow);
    --success: var(--field-green);
    --info: var(--field-teal);
    --color-primary: 184 87 51;
    --color-accent: 47 111 115;
    --dr-bg: var(--field-paper);
    --dr-surface: rgba(255, 250, 240, 0.88);
    --dr-surface-strong: rgba(255, 250, 240, 0.96);
    --dr-surface-soft: rgba(26, 37, 36, 0.045);
    --dr-border: var(--field-line);
    --dr-border-strong: var(--field-line-strong);
    --dr-text: var(--field-ink);
    --dr-muted: var(--field-muted);
    --dr-subtle: var(--field-faint);
    --dr-input-bg: rgba(255, 250, 240, 0.92);
    --dr-shadow: var(--field-shadow);
    --dr-radius-xl: 4px;
    --dr-radius-lg: 3px;
    --dr-radius-md: 2px;
    --dr-radius-sm: 2px;
}

html.field-theme.dark {
    color-scheme: dark;
    --field-paper: #101615;
    --field-paper-strong: #18211f;
    --field-ink: #f4efe5;
    --field-ink-soft: #d9d0c2;
    --field-muted: #aaa091;
    --field-faint: #83796d;
    --field-line: rgba(244, 239, 229, 0.14);
    --field-line-strong: rgba(244, 239, 229, 0.26);
    --field-rust: #de7b55;
    --field-teal: #75bec0;
    --field-green: #74c99b;
    --field-yellow: #ddb06a;
    --field-red: #e67a72;
    --field-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
    --bg: var(--field-paper);
    --surface: rgba(24, 33, 31, 0.92);
    --surface-raised: rgba(29, 39, 37, 0.97);
    --surface-soft: rgba(244, 239, 229, 0.06);
    --border: var(--field-line);
    --border-strong: var(--field-line-strong);
    --gold: var(--field-rust);
    --accent: var(--field-teal);
    --text: var(--field-ink);
    --muted: var(--field-muted);
    --muted-soft: var(--field-faint);
    --danger: var(--field-red);
    --warning: var(--field-yellow);
    --success: var(--field-green);
    --info: var(--field-teal);
    --dr-bg: var(--field-paper);
    --dr-surface: rgba(24, 33, 31, 0.9);
    --dr-surface-strong: rgba(29, 39, 37, 0.96);
    --dr-surface-soft: rgba(244, 239, 229, 0.055);
    --dr-border: var(--field-line);
    --dr-border-strong: var(--field-line-strong);
    --dr-text: var(--field-ink);
    --dr-muted: var(--field-muted);
    --dr-subtle: var(--field-faint);
    --dr-input-bg: rgba(16, 22, 21, 0.86);
    --dr-shadow: var(--field-shadow);
}

html.field-theme,
html.field-theme body {
    max-width: 100%;
    overflow-x: hidden;
}

html.field-theme body {
    background-color: var(--field-paper) !important;
    background-image:
        linear-gradient(rgba(26, 37, 36, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 37, 36, 0.035) 1px, transparent 1px) !important;
    background-size: 44px 44px !important;
    color: var(--field-ink) !important;
}

html.field-theme.dark body {
    background-color: var(--field-paper) !important;
    background-image:
        linear-gradient(rgba(244, 239, 229, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(244, 239, 229, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 20% 0%, rgba(222, 123, 85, 0.08), transparent 36%),
        linear-gradient(180deg, #101615 0%, #0b1110 100%) !important;
    background-size: 44px 44px, 44px 44px, auto, auto !important;
    color: var(--field-ink) !important;
}

html.field-theme body::before {
    content: '' !important;
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: 12px !important;
    height: auto !important;
    background:
        repeating-linear-gradient(to bottom, rgba(255, 250, 240, 0.64) 0 1px, transparent 1px 18px),
        var(--field-rust) !important;
    z-index: 9999 !important;
    pointer-events: none !important;
}

html.field-theme.dark body::before {
    background:
        repeating-linear-gradient(to bottom, rgba(16, 22, 21, 0.72) 0 1px, transparent 1px 18px),
        #7e3c2a !important;
}

html.field-theme * {
    letter-spacing: 0;
}

html.field-theme h1,
html.field-theme h2,
html.field-theme h3,
html.field-theme h4,
html.field-theme h5,
html.field-theme h6,
html.field-theme .font-display,
html.field-theme .font-condensed,
html.field-theme .brand-title,
html.field-theme .section-title,
html.field-theme .dr-client-title,
html.field-theme .dr-settings-title,
html.field-theme .dr-settings-group-title {
    font-family: Inter, system-ui, sans-serif !important;
    letter-spacing: 0 !important;
}

html.field-theme .font-mono,
html.field-theme .dr-input--mono,
html.field-theme .stat-value,
html.field-theme table,
html.field-theme code {
    font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
}

html.field-theme ::selection {
    background: rgba(184, 87, 51, 0.28);
    color: var(--field-ink);
}

/* Text and utility color normalisation */
html.field-theme .text-white,
html.field-theme .text-\[\#ffffff\],
html.field-theme .hover\:text-white:hover {
    color: var(--field-ink) !important;
}

html.field-theme [class*="text-white/"] {
    color: var(--field-muted) !important;
}

html.field-theme .text-black {
    color: var(--field-paper-strong) !important;
}

html.field-theme p,
html.field-theme li,
html.field-theme dt,
html.field-theme dd,
html.field-theme span,
html.field-theme div {
    border-color: var(--field-line);
}

html.field-theme .text-brand-gold,
html.field-theme [class*="text-brand-gold/"],
html.field-theme .brand-kicker,
html.field-theme .kicker,
html.field-theme label,
html.field-theme th,
html.field-theme .stripe-links a,
html.field-theme .access-meta {
    color: var(--field-rust) !important;
}

html.field-theme .text-green-400,
html.field-theme .text-green-300,
html.field-theme .status[data-tone="success"],
html.field-theme .badge[data-tone="success"] {
    color: var(--field-green) !important;
}

html.field-theme .text-red-400,
html.field-theme .status[data-tone="error"],
html.field-theme .status[data-tone="warning"],
html.field-theme .badge[data-tone="danger"],
html.field-theme .button-danger {
    color: var(--field-red) !important;
}

html.field-theme .badge[data-tone="warning"] {
    color: var(--field-yellow) !important;
}

html.field-theme .badge[data-tone="info"] {
    color: var(--field-teal) !important;
}

/* Utility backgrounds and borders used heavily by the workspace */
html.field-theme .bg-\[\#080908\],
html.field-theme .bg-black,
html.field-theme .bg-black\/15,
html.field-theme .bg-black\/20,
html.field-theme .bg-black\/25,
html.field-theme .bg-black\/30,
html.field-theme .bg-black\/40,
html.field-theme .bg-black\/50,
html.field-theme .bg-white\/\[0\.03\],
html.field-theme [class*="bg-white/"] {
    background-color: rgba(255, 250, 240, 0.72) !important;
}

html.field-theme.dark .bg-\[\#080908\],
html.field-theme.dark .bg-black,
html.field-theme.dark .bg-black\/15,
html.field-theme.dark .bg-black\/20,
html.field-theme.dark .bg-black\/25,
html.field-theme.dark .bg-black\/30,
html.field-theme.dark .bg-black\/40,
html.field-theme.dark .bg-black\/50,
html.field-theme.dark .bg-white\/\[0\.03\],
html.field-theme.dark [class*="bg-white/"] {
    background-color: rgba(244, 239, 229, 0.055) !important;
}

html.field-theme .bg-brand-gold,
html.field-theme .bg-brand-gold\/5,
html.field-theme .bg-brand-gold\/10,
html.field-theme .bg-brand-gold\/20,
html.field-theme [class*="bg-brand-gold/"] {
    background-color: rgba(184, 87, 51, 0.1) !important;
}

html.field-theme.dark .bg-brand-gold,
html.field-theme.dark .bg-brand-gold\/5,
html.field-theme.dark .bg-brand-gold\/10,
html.field-theme.dark .bg-brand-gold\/20,
html.field-theme.dark [class*="bg-brand-gold/"] {
    background-color: rgba(222, 123, 85, 0.14) !important;
}

html.field-theme .border-white\/5,
html.field-theme .border-white\/10,
html.field-theme .border-white\/20,
html.field-theme [class*="border-white/"],
html.field-theme .border-brand-gold\/20,
html.field-theme .border-brand-gold\/30,
html.field-theme [class*="border-brand-gold/"] {
    border-color: var(--field-line) !important;
}

/* App top bars and brand */
html.field-theme .topbar,
html.field-theme body > div[x-data] > .border-b,
html.field-theme .dr-home-topbar {
    background: rgba(255, 250, 240, 0.9) !important;
    border-bottom: 1px solid var(--field-line) !important;
    box-shadow: 0 8px 24px rgba(49, 38, 26, 0.08);
}

html.field-theme.dark .topbar,
html.field-theme.dark body > div[x-data] > .border-b,
html.field-theme.dark .dr-home-topbar {
    background: rgba(16, 22, 21, 0.92) !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.34);
}

html.field-theme .brand-mark,
html.field-theme .dr-home-brand__mark,
html.field-theme .dr-access-screen__panel .brand-mark,
html.field-theme .flex.h-11.w-11 {
    border-color: var(--field-ink) !important;
    border-radius: 2px !important;
    background: var(--field-ink) !important;
    color: var(--field-paper-strong) !important;
}

html.field-theme.dark .brand-mark,
html.field-theme.dark .dr-home-brand__mark,
html.field-theme.dark .dr-access-screen__panel .brand-mark,
html.field-theme.dark .flex.h-11.w-11 {
    border-color: var(--field-line-strong) !important;
    background: var(--field-rust) !important;
    color: #100f0d !important;
}

html.field-theme.dark .brand-mark i,
html.field-theme.dark .dr-home-brand__mark i,
html.field-theme.dark .flex.h-11.w-11 i {
    color: #100f0d !important;
}

html.field-theme .brand-mark i,
html.field-theme .dr-home-brand__mark i,
html.field-theme .flex.h-11.w-11 i {
    color: var(--field-paper-strong) !important;
}

html.field-theme .brand-title,
html.field-theme .font-condensed.text-3xl {
    color: var(--field-ink) !important;
    font-weight: 900 !important;
    line-height: 0.95 !important;
}

/* Panels, cards, shells */
html.field-theme .auth-panel,
html.field-theme .gate-panel,
html.field-theme .panel,
html.field-theme .dr-panel,
html.field-theme .dr-subpanel,
html.field-theme .dr-metric,
html.field-theme .dr-empty-state,
html.field-theme .dr-shell,
html.field-theme .dr-settings-shell,
html.field-theme .dr-settings-preview,
html.field-theme .stat,
html.field-theme .drop-zone,
html.field-theme .file-item,
html.field-theme .empty-state,
html.field-theme .notice,
html.field-theme .signed-in,
html.field-theme .access-panel {
    border-color: var(--field-line) !important;
    border-radius: 3px !important;
    background: rgba(255, 250, 240, 0.88) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

html.field-theme.dark .auth-panel,
html.field-theme.dark .gate-panel,
html.field-theme.dark .panel,
html.field-theme.dark .dr-panel,
html.field-theme.dark .dr-subpanel,
html.field-theme.dark .dr-metric,
html.field-theme.dark .dr-empty-state,
html.field-theme.dark .dr-shell,
html.field-theme.dark .dr-settings-shell,
html.field-theme.dark .dr-settings-preview,
html.field-theme.dark .stat,
html.field-theme.dark .drop-zone,
html.field-theme.dark .file-item,
html.field-theme.dark .empty-state,
html.field-theme.dark .notice,
html.field-theme.dark .signed-in,
html.field-theme.dark .access-panel {
    background: rgba(24, 33, 31, 0.88) !important;
    box-shadow: none !important;
}

html.field-theme .auth-panel,
html.field-theme .gate-panel,
html.field-theme .panel,
html.field-theme .dr-panel,
html.field-theme .dr-settings-shell,
html.field-theme .dr-settings-preview {
    border-left: 6px solid var(--field-rust) !important;
}

html.field-theme .dr-panel--accent,
html.field-theme .dr-panel--required,
html.field-theme .dr-settings-preview {
    border-color: var(--field-line-strong) !important;
}

html.field-theme .dr-panel--success,
html.field-theme .dr-status--success,
html.field-theme .badge[data-tone="success"] {
    border-color: rgba(47, 125, 89, 0.35) !important;
    background: rgba(47, 125, 89, 0.08) !important;
}

html.field-theme .dr-panel--warning,
html.field-theme .dr-status--warning,
html.field-theme .badge[data-tone="warning"] {
    border-color: rgba(168, 107, 29, 0.35) !important;
    background: rgba(168, 107, 29, 0.08) !important;
}

html.field-theme .dr-panel--danger,
html.field-theme .dr-subpanel--danger,
html.field-theme .dr-status--danger,
html.field-theme .badge[data-tone="danger"] {
    border-color: rgba(184, 73, 66, 0.35) !important;
    background: rgba(184, 73, 66, 0.08) !important;
}

html.field-theme .dr-panel--info,
html.field-theme .dr-status--info,
html.field-theme .badge[data-tone="info"] {
    border-color: rgba(47, 111, 115, 0.35) !important;
    background: rgba(47, 111, 115, 0.08) !important;
}

/* Buttons */
html.field-theme .button,
html.field-theme .dr-button,
html.field-theme .dr-home-primary-action,
html.field-theme .dr-home-secondary-action {
    min-height: 42px;
    border-radius: 2px !important;
    box-shadow: none !important;
    letter-spacing: 0 !important;
}

html.field-theme .button-primary,
html.field-theme .dr-button--primary,
html.field-theme .dr-button--garage-add,
html.field-theme .dr-button--fit-optimizer,
html.field-theme .dr-home-primary-action {
    border-color: var(--field-ink) !important;
    background: var(--field-ink) !important;
    color: var(--field-paper-strong) !important;
}

html.field-theme.dark .button-primary,
html.field-theme.dark .dr-button--primary,
html.field-theme.dark .dr-button--garage-add,
html.field-theme.dark .dr-button--fit-optimizer,
html.field-theme.dark .dr-home-primary-action {
    border-color: var(--field-rust) !important;
    background: var(--field-rust) !important;
    color: #100f0d !important;
}

html.field-theme .button-primary:hover,
html.field-theme .dr-button--primary:hover,
html.field-theme .dr-button--garage-add:hover:not(:disabled),
html.field-theme .dr-button--fit-optimizer:hover:not(:disabled) {
    border-color: var(--field-rust) !important;
    background: var(--field-rust) !important;
    transform: translateY(-1px);
}

html.field-theme .button-secondary,
html.field-theme .button-danger,
html.field-theme .dr-button--secondary,
html.field-theme .dr-button--ghost,
html.field-theme .dr-home-secondary-action {
    border-color: var(--field-line-strong) !important;
    background: rgba(255, 250, 240, 0.72) !important;
    color: var(--field-ink) !important;
}

html.field-theme.dark .button-secondary,
html.field-theme.dark .button-danger,
html.field-theme.dark .dr-button--secondary,
html.field-theme.dark .dr-button--ghost,
html.field-theme.dark .dr-home-secondary-action {
    border-color: var(--field-line-strong) !important;
    background: rgba(244, 239, 229, 0.055) !important;
    color: var(--field-ink) !important;
}

html.field-theme .button-danger {
    border-color: rgba(184, 73, 66, 0.36) !important;
    color: var(--field-red) !important;
}

html.field-theme .dr-button:hover,
html.field-theme .button:hover {
    border-color: var(--field-rust) !important;
}

html.field-theme .dr-axis-toggle {
    border-color: var(--field-line-strong) !important;
    background: rgba(255, 250, 240, 0.62) !important;
}

html.field-theme.dark .dr-axis-toggle {
    border-color: var(--field-line-strong) !important;
    background: rgba(244, 239, 229, 0.04) !important;
}

html.field-theme .dr-axis-toggle__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-height: 30px;
    border-radius: 0 !important;
    letter-spacing: 0.04em !important;
}

html.field-theme .dr-axis-toggle__button--idle {
    background: transparent !important;
    color: var(--field-muted) !important;
}

html.field-theme .dr-axis-toggle__button--idle:hover {
    color: var(--field-ink) !important;
}

html.field-theme .dr-axis-toggle__button--active {
    background: #f2d77b !important;
    color: #21190c !important;
}

html.field-theme.dark .dr-axis-toggle__button--active {
    background: #d8aa3a !important;
    color: #100f0d !important;
}

html.field-theme .dr-axis-toggle__button--active i,
html.field-theme .dr-axis-toggle__button--active span {
    color: inherit !important;
}

/* Forms */
html.field-theme input,
html.field-theme select,
html.field-theme textarea,
html.field-theme .dr-input,
html.field-theme .dr-select,
html.field-theme .dr-textarea {
    border-color: var(--field-line) !important;
    border-radius: 2px !important;
    background-color: rgba(255, 250, 240, 0.94) !important;
    color: var(--field-ink) !important;
    color-scheme: light !important;
}

html.field-theme.dark input,
html.field-theme.dark select,
html.field-theme.dark textarea,
html.field-theme.dark .dr-input,
html.field-theme.dark .dr-select,
html.field-theme.dark .dr-textarea {
    background-color: rgba(11, 17, 16, 0.88) !important;
    color: var(--field-ink) !important;
    color-scheme: dark !important;
}

html.field-theme input:focus,
html.field-theme select:focus,
html.field-theme textarea:focus,
html.field-theme .dr-input:focus,
html.field-theme .dr-select:focus,
html.field-theme .dr-textarea:focus {
    border-color: rgba(184, 87, 51, 0.68) !important;
    box-shadow: 0 0 0 4px rgba(184, 87, 51, 0.12) !important;
}

html.field-theme input::placeholder,
html.field-theme textarea::placeholder {
    color: rgba(93, 104, 101, 0.72);
}

html.field-theme.dark input::placeholder,
html.field-theme.dark textarea::placeholder {
    color: rgba(170, 160, 145, 0.72);
}

/* Kicker, chips, metrics */
html.field-theme .dr-kicker,
html.field-theme .dr-kicker-compact,
html.field-theme .stat-label,
html.field-theme .drop-title,
html.field-theme .brand-kicker,
html.field-theme .kicker {
    color: var(--field-rust) !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
}

html.field-theme .dr-kicker::before {
    width: 0;
    margin: 0;
}

html.field-theme .badge,
html.field-theme .dr-status,
html.field-theme .dr-meta-strip > span,
html.field-theme .rounded-full {
    border-radius: 2px !important;
}

html.field-theme .dr-meta-strip {
    color: var(--field-muted) !important;
    letter-spacing: 0 !important;
}

html.field-theme .dr-workspace-metric,
html.field-theme .dr-workflow-step,
html.field-theme .date-action,
html.field-theme .detail-section,
html.field-theme .detail-block {
    border-color: var(--field-line) !important;
    border-radius: 2px !important;
    background: rgba(255, 250, 240, 0.66) !important;
}

html.field-theme.dark .dr-workspace-metric,
html.field-theme.dark .dr-workflow-step,
html.field-theme.dark .date-action,
html.field-theme.dark .detail-section,
html.field-theme.dark .detail-block {
    background: rgba(244, 239, 229, 0.045) !important;
}

html.field-theme .dr-workflow-step--active {
    border-color: rgba(184, 87, 51, 0.48) !important;
    background: rgba(184, 87, 51, 0.1) !important;
    color: var(--field-ink) !important;
}

html.field-theme.dark .dr-workflow-step--active {
    background: rgba(222, 123, 85, 0.16) !important;
}

html.field-theme .dr-workflow-step--complete {
    border-color: rgba(47, 125, 89, 0.35) !important;
    background: rgba(47, 125, 89, 0.08) !important;
    color: var(--field-ink) !important;
}

html.field-theme.dark .dr-workflow-step--complete {
    background: rgba(116, 201, 155, 0.12) !important;
}

html.field-theme .dr-workspace-focus,
html.field-theme .dr-next-action,
html.field-theme .dr-next-action--high,
html.field-theme .dr-next-action--medium,
html.field-theme .dr-next-action--low {
    background: rgba(255, 250, 240, 0.78) !important;
    border-left-color: var(--field-rust) !important;
}

html.field-theme.dark .dr-workspace-focus,
html.field-theme.dark .dr-next-action,
html.field-theme.dark .dr-next-action--high,
html.field-theme.dark .dr-next-action--medium,
html.field-theme.dark .dr-next-action--low {
    background: rgba(24, 33, 31, 0.82) !important;
}

/* Settings and report preview */
html.field-theme .dr-settings-header,
html.field-theme .dr-settings-path,
html.field-theme .dr-settings-collapsible-body,
html.field-theme .table-head,
html.field-theme .panel-head {
    border-color: var(--field-line) !important;
    background: rgba(255, 250, 240, 0.44) !important;
}

html.field-theme.dark .dr-settings-header,
html.field-theme.dark .dr-settings-path,
html.field-theme.dark .dr-settings-collapsible-body,
html.field-theme.dark .table-head,
html.field-theme.dark .panel-head {
    background: rgba(244, 239, 229, 0.04) !important;
}

html.field-theme .dr-settings-step {
    background: rgba(255, 250, 240, 0.72) !important;
}

html.field-theme.dark .dr-settings-step {
    background: rgba(244, 239, 229, 0.055) !important;
}

html.field-theme .dr-settings-step-index {
    border-radius: 2px !important;
    background: var(--field-ink) !important;
    color: var(--field-paper-strong) !important;
}

html.field-theme .dr-settings-group-icon,
html.field-theme .access-icon,
html.field-theme .drop-icon {
    border-color: var(--field-ink) !important;
    border-radius: 2px !important;
    background: var(--field-ink) !important;
    color: var(--field-paper-strong) !important;
}

html.field-theme .dr-settings-preview-accent,
html.field-theme .dr-settings-preview-paper-bar {
    background: var(--field-rust) !important;
}

html.field-theme .dr-settings-preview-paper {
    border-color: rgba(26, 37, 36, 0.22) !important;
    border-radius: 2px !important;
    background:
        linear-gradient(rgba(26, 37, 36, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 37, 36, 0.035) 1px, transparent 1px),
        #fffaf0 !important;
    background-size: 32px 32px !important;
    color: var(--field-ink) !important;
}

html.field-theme.dark .dr-settings-preview-paper {
    border-color: var(--field-line-strong) !important;
    background:
        linear-gradient(rgba(244, 239, 229, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(244, 239, 229, 0.03) 1px, transparent 1px),
        #151c1a !important;
    color: var(--field-ink) !important;
}

html.field-theme .dr-settings-swatch-mark {
    border-radius: 2px !important;
}

/* Login/admin layout */
html.field-theme .auth-shell,
html.field-theme .gate {
    min-height: 100vh;
    padding-left: max(24px, 32px);
}

html.field-theme .auth-panel,
html.field-theme .gate-panel {
    width: min(100%, 560px);
}

html.field-theme .admin-shell {
    padding-left: max(24px, 36px);
}

html.field-theme .admin-grid,
html.field-theme .viewer-grid,
html.field-theme .stat-grid,
html.field-theme .import-band {
    gap: 16px;
}

html.field-theme table {
    background: rgba(255, 250, 240, 0.42);
    color: var(--field-ink) !important;
}

html.field-theme.dark table {
    background: rgba(244, 239, 229, 0.035);
    color: var(--field-ink) !important;
}

html.field-theme th,
html.field-theme td {
    border-color: var(--field-line) !important;
    color: var(--field-ink-soft) !important;
    opacity: 1 !important;
}

html.field-theme tbody tr,
html.field-theme .file-row,
html.field-theme .record-button,
html.field-theme .file-item {
    color: var(--field-ink) !important;
    opacity: 1 !important;
}

html.field-theme tbody tr:nth-child(even),
html.field-theme .file-row:nth-child(even) {
    background: rgba(26, 37, 36, 0.025) !important;
}

html.field-theme.dark tbody tr:nth-child(even),
html.field-theme.dark .file-row:nth-child(even) {
    background: rgba(244, 239, 229, 0.035) !important;
}

html.field-theme tbody tr:hover,
html.field-theme .record-button:hover,
html.field-theme .file-item:hover {
    background: rgba(184, 87, 51, 0.07) !important;
}

html.field-theme.dark tbody tr:hover,
html.field-theme.dark .record-button:hover,
html.field-theme.dark .file-item:hover {
    background: rgba(222, 123, 85, 0.13) !important;
}

html.field-theme tbody tr[aria-current="true"],
html.field-theme tbody tr[data-selected="true"],
html.field-theme .file-row[aria-current="true"],
html.field-theme .record-button[aria-current="true"],
html.field-theme .file-item[aria-current="true"] {
    border-color: rgba(184, 87, 51, 0.5) !important;
    background: rgba(184, 87, 51, 0.12) !important;
    color: var(--field-ink) !important;
}

html.field-theme.dark tbody tr[aria-current="true"],
html.field-theme.dark tbody tr[data-selected="true"],
html.field-theme.dark .file-row[aria-current="true"],
html.field-theme.dark .record-button[aria-current="true"],
html.field-theme.dark .file-item[aria-current="true"] {
    border-color: rgba(222, 123, 85, 0.56) !important;
    background: rgba(222, 123, 85, 0.18) !important;
}

html.field-theme td strong,
html.field-theme .user-cell strong,
html.field-theme .file-row strong,
html.field-theme .record-button strong,
html.field-theme .file-item strong,
html.field-theme .stat-value,
html.field-theme .section-title,
html.field-theme .drop-title {
    color: var(--field-ink) !important;
    opacity: 1 !important;
}

html.field-theme .subtle,
html.field-theme .account-line,
html.field-theme .drop-meta,
html.field-theme .stat-note,
html.field-theme .auth-copy,
html.field-theme .access-panel p,
html.field-theme .notice,
html.field-theme .signed-in,
html.field-theme td,
html.field-theme .status {
    color: var(--field-muted) !important;
    opacity: 1 !important;
}

html.field-theme .user-cell .subtle,
html.field-theme td .subtle,
html.field-theme .file-row .subtle,
html.field-theme .record-button .subtle,
html.field-theme .file-item .subtle {
    color: var(--field-ink-soft) !important;
}

html.field-theme .empty-row,
html.field-theme .empty-state {
    color: var(--field-muted) !important;
}

html.field-theme :disabled,
html.field-theme [aria-disabled="true"] {
    opacity: 0.68 !important;
}

/* Access screen */
html.field-theme .dr-access-screen {
    background-color: var(--field-paper) !important;
    background-image:
        linear-gradient(rgba(26, 37, 36, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 37, 36, 0.035) 1px, transparent 1px) !important;
    background-size: 44px 44px !important;
    color: var(--field-ink) !important;
}

html.field-theme.dark .dr-access-screen {
    background-color: var(--field-paper) !important;
    background-image:
        linear-gradient(rgba(244, 239, 229, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(244, 239, 229, 0.03) 1px, transparent 1px),
        linear-gradient(180deg, #101615 0%, #0b1110 100%) !important;
    color: var(--field-ink) !important;
}

html.field-theme .dr-access-screen__panel {
    border-color: var(--field-line) !important;
    border-left: 6px solid var(--field-rust) !important;
    border-radius: 3px !important;
    background: rgba(255, 250, 240, 0.92) !important;
}

html.field-theme.dark .dr-access-screen__panel {
    background: rgba(24, 33, 31, 0.92) !important;
}

html.field-theme .dr-access-screen__copy {
    color: var(--field-muted) !important;
}

@media (max-width: 760px) {
    html.field-theme body::before {
        width: 6px !important;
    }

    html.field-theme .auth-shell,
    html.field-theme .gate,
    html.field-theme .admin-shell,
    html.field-theme main.mx-auto {
        padding-left: 24px !important;
        padding-right: 16px !important;
    }

    html.field-theme .topbar,
    html.field-theme body > div[x-data] > .border-b > div {
        align-items: stretch !important;
    }

    html.field-theme .brand-title {
        font-size: clamp(1.55rem, 8vw, 2.15rem) !important;
    }

    html.field-theme .brand-kicker,
    html.field-theme .kicker {
        font-size: 0.58rem !important;
    }

    html.field-theme .button,
    html.field-theme .dr-button {
        width: 100%;
    }
}
