:root {
    color-scheme: light;
    --brand-navy: #1f4e6b;
    --brand-cyan: #1fa3d6;
    --brand-ink: #2b2b2b;
    --bg: #f4f6f8;
    --panel: #ffffff;
    --panel-raised: #ffffff;
    --panel-soft: #edf5f9;
    --text: #2b2b2b;
    --muted: #667680;
    --line: #d7e1e8;
    --brand: #1f4e6b;
    --brand-dark: #173b52;
    --brand-bright: #1fa3d6;
    --accent: #1fa3d6;
    --accent-soft: #e7f6fc;
    --sidebar-bg: #163d55;
    --sidebar-strong: #ffffff;
    --sidebar-muted: #b9d6e4;
    --control-bg: #ffffff;
    --hover-soft: #e6f4fa;
    --shadow: 0 18px 42px rgba(31, 78, 107, 0.11);
    --shadow-soft: 0 8px 18px rgba(31, 78, 107, 0.08);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0f2635;
    --panel: #132f41;
    --panel-raised: #17384c;
    --panel-soft: #0f344c;
    --text: #f4f6f8;
    --muted: #b8cbd5;
    --line: rgba(244, 246, 248, 0.14);
    --brand: #1fa3d6;
    --brand-dark: #7bd4f3;
    --brand-bright: #1fa3d6;
    --accent: #44bee8;
    --accent-soft: rgba(31, 163, 214, 0.15);
    --sidebar-bg: #0b1f2c;
    --sidebar-strong: #ffffff;
    --sidebar-muted: #9fc5d8;
    --control-bg: #0f2635;
    --hover-soft: rgba(31, 163, 214, 0.18);
    --shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
    --shadow-soft: 0 8px 18px rgba(0, 0, 0, 0.18);
}

* {
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, textarea, select {
    font: inherit;
}

.page {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
    background:
        radial-gradient(circle at 100% 0, color-mix(in srgb, var(--brand-bright) 14%, transparent), transparent 28rem),
        linear-gradient(135deg, color-mix(in srgb, var(--brand) 8%, transparent), transparent 34rem),
        var(--bg);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    align-items: center;
    justify-items: end;
    padding: clamp(18px, 5vw, 56px);
    background:
        linear-gradient(90deg, rgba(0, 12, 41, 0.08), rgba(0, 10, 28, 0.28)),
        url("/auth/telalogin_web.png") center / cover no-repeat,
        #02091e;
}

.auth-card {
    display: grid;
    gap: 22px;
    width: min(430px, 100%);
    margin-right: min(7vw, 110px);
    border: 1px solid rgba(139, 177, 255, 0.25);
    border-radius: 8px;
    background: rgba(0, 13, 43, 0.55);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
    padding: clamp(26px, 4vw, 46px);
    color: #ffffff;
    backdrop-filter: blur(12px);
}

.auth-register-card {
    gap: 16px;
}

.auth-form {
    display: grid;
    gap: 18px;
}

.auth-heading h1 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 2rem;
}

.auth-heading p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
}

.auth-field {
    display: grid;
    gap: 8px;
}

.auth-field label,
.auth-check {
    color: #ffffff;
    font-weight: 700;
}

.auth-input-wrap {
    display: grid;
    grid-template-columns: 22px 1fr;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    border: 1px solid rgba(152, 184, 255, 0.38);
    border-radius: 8px;
    background: rgba(2, 18, 58, 0.42);
    padding: 0 16px;
}

.auth-input-wrap:focus-within {
    border-color: #1fa3d6;
    box-shadow: 0 0 0 3px rgba(31, 163, 214, 0.2);
}

.auth-input-wrap svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: rgba(231, 242, 255, 0.78);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.auth-input-wrap input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #ffffff;
}

.auth-input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.58);
}

.auth-primary,
.auth-secondary {
    width: 100%;
    min-height: 52px;
    border-radius: 8px;
    font-weight: 800;
    text-align: center;
}

.auth-primary {
    border: 0;
    background: linear-gradient(180deg, #18aaff, #0066e8);
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(0, 102, 232, 0.32);
    cursor: pointer;
}

.auth-secondary {
    display: grid;
    place-items: center;
    border: 1px solid rgba(152, 184, 255, 0.32);
    background: rgba(2, 18, 58, 0.3);
    color: #ffffff;
}

.auth-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    background: rgba(152, 184, 255, 0.28);
}

.auth-message {
    margin: 0;
    border: 1px solid rgba(255, 99, 99, 0.4);
    border-radius: 8px;
    background: rgba(150, 30, 30, 0.32);
    color: #ffd5d5;
    font-weight: 700;
    padding: 12px 14px;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.78);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--brand-bright) 16%, transparent), transparent 18rem),
        var(--sidebar-bg);
    color: var(--sidebar-strong);
    padding: 18px;
    border-right: 1px solid color-mix(in srgb, var(--brand-bright) 20%, transparent);
}

.workspace {
    min-width: 0;
}

.content {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 28px;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.page-header h1 {
    margin: 0;
    font-size: 2rem;
    font-family: Montserrat, "Segoe UI", Arial, sans-serif;
    font-weight: 800;
    color: var(--text);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.muted {
    margin: 8px 0 0;
    color: var(--muted);
}

.primary-action,
.secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    padding: 0 16px;
    font-weight: 760;
    cursor: pointer;
    white-space: nowrap;
}

.primary-action {
    background: linear-gradient(135deg, var(--brand), var(--brand-bright));
    color: #fff;
    box-shadow: var(--shadow-soft);
}

.primary-action:hover {
    background: var(--brand-dark);
    color: #fff;
}

.primary-action.small,
.secondary-action {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.88rem;
}

.small-link {
    width: fit-content;
}

.primary-action:disabled,
.secondary-action:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.secondary-action {
    background: var(--panel-soft);
    color: var(--brand-dark);
    border: 1px solid var(--line);
}

.danger-action {
    color: #8f1d1d;
}

.danger-action:hover {
    background: #fde8e8;
    color: #7f1d1d;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.registry-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 14px;
}

.registry-choice-card {
    min-height: 190px;
}

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

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

.registry-list-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    align-items: start;
}

.metric-card,
.form-panel,
.data-section,
.flow-panel,
.work-card,
.empty-state {
    background: color-mix(in srgb, var(--panel) 94%, #fff 6%);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.metric-card {
    display: grid;
    gap: 8px;
    padding: 18px;
    border-top: 3px solid var(--brand-bright);
}

.metric-card span,
.metric-card small,
.work-card span,
.work-card p {
    color: var(--muted);
}

.metric-card strong {
    font-size: 2rem;
    line-height: 1;
    color: var(--brand);
}

.flow-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin-bottom: 24px;
}

.flow-step {
    padding: 18px;
    background: linear-gradient(180deg, var(--panel), var(--panel-soft));
}

.flow-step span {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 800;
    margin-bottom: 12px;
}

.flow-step strong {
    display: block;
    margin-bottom: 6px;
}

.flow-step p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.data-section,
.form-panel {
    padding: 18px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.section-title h2,
.form-panel h2 {
    margin: 0;
    font-size: 1.12rem;
}

.section-title a,
.section-title span {
    color: var(--muted);
    font-size: 0.92rem;
}

.responsive-table {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 13px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 0 10px;
    background: var(--panel-soft);
    color: var(--brand-dark);
    font-size: 0.82rem;
    font-weight: 760;
}

.status-pill.warning {
    background: var(--accent-soft);
    color: var(--accent);
}

.split-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
    gap: 18px;
    margin-bottom: 22px;
}

.request-workspace {
    display: grid;
    gap: 18px;
    margin-bottom: 22px;
}

.quote-workspace {
    display: grid;
    gap: 18px;
    margin-bottom: 22px;
}

.quote-editor {
    max-width: none;
}

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

.quote-list-section {
    display: grid;
    gap: 14px;
}

.quote-card-list {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    align-items: start;
}

.quote-card {
    align-content: start;
}

.quote-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.quote-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.quote-metrics.single {
    grid-template-columns: 1fr;
}

.quote-metrics div {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    padding: 9px;
}

.quote-metrics span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 760;
}

.quote-metrics strong {
    color: var(--text);
}

.order-section {
    display: grid;
    gap: 14px;
}

.order-toolbar {
    align-items: flex-end;
    margin-bottom: 0;
}

.order-toolbar > div:first-child {
    display: grid;
    gap: 4px;
}

.filter-control {
    display: grid;
    gap: 6px;
    width: min(260px, 100%);
}

.order-list {
    display: grid;
    gap: 10px;
}

.order-card {
    gap: 0;
}

.order-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) minmax(190px, auto) 210px;
    align-items: center;
    gap: 12px;
}

.icon-toggle {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    color: var(--brand-dark);
    font-weight: 850;
    cursor: pointer;
}

.icon-toggle:hover {
    border-color: var(--brand);
    background: var(--hover-soft);
}

.order-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.order-main strong,
.order-main span {
    overflow-wrap: anywhere;
}

.order-meta {
    display: grid;
    justify-items: start;
    gap: 5px;
}

.order-meta small {
    color: var(--muted);
    font-size: 0.86rem;
}

.user-access-card {
    padding: 18px;
}

.user-access-row {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(140px, auto) minmax(220px, auto);
    align-items: center;
    gap: 18px;
}

.user-access-main {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.user-access-main strong {
    font-size: 1.05rem;
    overflow-wrap: normal;
    word-break: normal;
}

.user-access-main span {
    color: var(--muted);
    overflow-wrap: normal;
    word-break: normal;
}

.user-access-meta {
    display: grid;
    justify-items: start;
    gap: 6px;
}

.user-access-meta small {
    color: var(--muted);
    font-size: 0.9rem;
}

.user-access-actions {
    display: grid;
    justify-items: start;
    gap: 10px;
}

.user-active-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}

.user-active-toggle input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-bright);
}

.user-active-toggle.disabled {
    cursor: not-allowed;
    opacity: 0.56;
}

.user-access-actions .compact-select {
    width: min(280px, 100%);
}

.order-status-select {
    min-width: 0;
}

.order-details {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.detail-grid > div,
.order-notes > div {
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    padding: 10px;
}

.detail-grid span,
.order-detail-section > span,
.order-notes span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.detail-grid strong {
    overflow-wrap: anywhere;
}

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

.order-detail-section {
    display: grid;
    gap: 8px;
}

.order-notes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.order-notes p {
    color: var(--text);
}

.empty-state.compact {
    padding: 14px;
    box-shadow: none;
}

.request-form-panel {
    max-width: none;
}

.request-form-panel .form-sections {
    grid-template-columns: 1fr;
    align-items: start;
}

.request-form-panel .form-section {
    align-self: start;
}

.request-queue-list {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    align-items: start;
}

.form-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

label {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 760;
}

.form-field {
    display: grid;
    gap: 6px;
}

.label-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mini-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    border-radius: 6px;
    background: var(--panel-soft);
    color: var(--brand-dark);
    padding: 0 10px;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

.mini-action:hover {
    background: var(--hover-soft);
    color: var(--brand-dark);
}

.form-control,
.compact-select {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--control-bg);
    color: var(--text);
    padding: 9px 11px;
}

.textarea {
    min-height: 96px;
    resize: vertical;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

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

.client-location-grid {
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
}

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

.technical-grid {
    margin-bottom: 10px;
}

.form-sections {
    display: grid;
    gap: 10px;
}

.form-section {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    overflow: hidden;
}

.form-section-header {
    display: grid;
    gap: 2px;
    padding: 11px 12px;
    background: var(--panel-soft);
}

.form-section-header span {
    color: var(--text);
    font-weight: 800;
}

.form-section-header small {
    color: var(--muted);
}

.form-section > :not(.form-section-header) {
    margin: 12px;
}

.form-section > .form-control,
.form-section > .textarea {
    width: calc(100% - 24px);
}

.form-section .items-builder,
.form-section .attachments-panel {
    border: 0;
    padding: 0;
    background: transparent;
}

.mt-field {
    margin-top: 8px;
}

.card-list {
    display: grid;
    gap: 12px;
}

.work-card {
    display: grid;
    gap: 10px;
    padding: 15px;
}

.work-card.horizontal {
    grid-template-columns: minmax(0, 1fr) auto 190px;
    align-items: center;
}

.work-card strong {
    display: block;
}

.work-card p {
    margin: 0;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.actions-cell {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.compact-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.empty-state {
    display: grid;
    gap: 6px;
    padding: 22px;
    color: var(--muted);
}

.part-number-preview {
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    padding: 12px;
}

.part-number-preview span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 760;
}

.part-number-preview strong {
    font-size: 1.05rem;
    word-break: break-word;
}

.warning-panel,
.attachments-panel {
    display: grid;
    gap: 6px;
    border: 1px solid #f2c7a7;
    border-radius: 8px;
    background: var(--accent-soft);
    color: #7c2d12;
    padding: 12px;
}

.warning-panel.soft {
    border-color: var(--line);
    background: var(--panel-soft);
    color: var(--muted);
}

.warning-panel span {
    font-size: 0.9rem;
}

.attachments-panel {
    border-color: var(--line);
    background: var(--panel);
    color: var(--text);
}

.upload-zone {
    position: relative;
    display: grid;
    place-items: center;
    gap: 6px;
    min-height: 130px;
    border: 1px dashed var(--brand);
    border-radius: 8px;
    background: var(--panel-soft);
    color: var(--brand-dark);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: var(--brand-dark);
    background: var(--hover-soft);
}

.upload-zone input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 6px;
    background: var(--brand);
    color: #fff;
    font-size: 0.95rem;
}

.upload-zone span,
.upload-message {
    color: var(--muted);
    font-size: 0.9rem;
}

.attachment-list {
    display: grid;
    gap: 8px;
}

.attachment-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: stretch;
}

.attachment-item {
    display: grid;
    gap: 2px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: var(--panel);
}

.attachment-item span {
    color: var(--muted);
    font-size: 0.86rem;
}

.items-builder {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 12px;
}

.item-add-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(96px, 140px) auto;
    gap: 10px;
    align-items: end;
}

.add-item-action {
    min-height: 42px;
}

.request-items-list {
    display: grid;
    gap: 8px;
}

.request-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
}

.request-item > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.request-item strong {
    overflow-wrap: anywhere;
}

.card-product-list {
    display: grid;
    gap: 6px;
}

.order-product-block {
    display: grid;
    gap: 6px;
}

.card-product-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    color: var(--text);
    text-decoration: none;
}

.card-product-item:hover {
    border-color: var(--brand);
    background: var(--hover-soft);
}

.card-product-item.unresolved {
    border-color: #f2c7a7;
    background: var(--accent-soft);
}

.card-product-item.with-toggle {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.card-product-item strong {
    overflow-wrap: anywhere;
}

.card-product-item span {
    color: var(--muted);
    font-weight: 700;
}

.product-file-toggle {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    color: var(--brand-dark);
    font-weight: 850;
    cursor: pointer;
}

.product-file-toggle:hover {
    background: var(--hover-soft);
    border-color: var(--brand);
}

.product-attachments {
    display: grid;
    gap: 8px;
    margin-left: 34px;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #7f1d1d;
    color: white;
    padding: 0.75rem 1rem;
}

#blazor-error-ui .reload {
    color: white;
    text-decoration: underline;
    margin-left: 12px;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
}

@media (max-width: 960px) {
    .auth-shell {
        align-items: end;
        justify-items: center;
        min-height: 100svh;
        padding: 18px;
        background:
            linear-gradient(180deg, rgba(0, 12, 41, 0.04), rgba(0, 10, 28, 0.42)),
            url("/auth/telalogin_mobile.png") center / cover no-repeat,
            #02091e;
    }

    .auth-card {
        margin: 0;
        width: min(420px, 100%);
        background: rgba(0, 13, 43, 0.68);
        padding: 24px;
    }

    .page {
        display: block;
        padding-bottom: 70px;
    }

    .user-access-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        z-index: 50;
        height: auto;
        padding: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .content {
        padding: 18px;
    }

    .page-header {
        display: grid;
    }

    .metric-grid,
    .registry-choice-grid,
    .flow-panel,
    .request-form-panel .form-sections,
    .order-row,
    .detail-grid,
    .technical-detail-grid,
    .order-notes,
    .client-register-grid,
    .product-register-grid,
    .registry-list-grid,
    .split-grid {
        grid-template-columns: 1fr;
    }

    .work-card.horizontal {
        grid-template-columns: 1fr;
    }

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

    .filter-control {
        width: 100%;
    }

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

    .icon-toggle {
        width: 100%;
    }
}

@media (max-width: 700px) {
    .page-header h1 {
        font-size: 1.55rem;
    }

    .responsive-table table,
    .responsive-table thead,
    .responsive-table tbody,
    .responsive-table th,
    .responsive-table td,
    .responsive-table tr {
        display: block;
    }

    .responsive-table thead {
        display: none;
    }

    .responsive-table tr {
        border: 1px solid var(--line);
        border-radius: 8px;
        margin-bottom: 10px;
        background: var(--panel);
        overflow: hidden;
    }

    .responsive-table td {
        display: flex;
        justify-content: space-between;
        gap: 16px;
        border-bottom: 1px solid var(--line);
    }

    .responsive-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-weight: 760;
    }

    .actions-cell {
        justify-content: stretch;
    }

    .actions-cell button {
        flex: 1;
    }

    .field-grid,
    .client-location-grid,
    .dates-grid,
    .dimensions-grid,
    .material-grid,
    .pressure-grid,
    .quote-summary-grid,
    .quote-delivery-grid,
    .quote-metrics {
        grid-template-columns: 1fr;
    }

    .item-add-grid,
    .request-item,
    .order-row,
    .detail-grid,
    .technical-detail-grid,
    .order-notes,
    .client-register-grid,
    .product-register-grid,
    .registry-list-grid,
    .card-product-item {
        grid-template-columns: 1fr;
    }

    .product-file-toggle {
        width: 100%;
    }

    .product-attachments {
        margin-left: 0;
    }

    .attachment-row {
        grid-template-columns: 1fr;
    }
}
