/* TEC Core design tokens. Defaults live here; admin settings override
   --tec-brand, --tec-deep, --tec-font-arabic, and --tec-font-latin
   on the document element. Do not redeclare those four on body. */

:root {
    color-scheme: light;
    --tec-font-arabic: "IBM Plex Sans Arabic";
    --tec-font-latin: Inter;
    --tec-font-sans: var(--tec-font-arabic), var(--tec-font-latin), "IBM Plex Sans Arabic", Inter, "Cairo", sans-serif;
    --tec-brand: #F59E0B;
    --tec-deep: #1F2937;
    --tec-on-brand: #1F2937;
    --tec-bg: #FAFAF9;
    --tec-surface: #FFFFFF;
    --tec-ink: #1F2937;
    --tec-muted: #57534E;
    --tec-line: #E7E7E7;
    --tec-brand-soft: #FEF3C7;
    --tec-sidebar: #FFFFFF;
    --tec-sidebar-ink: #1F2937;
    --tec-sidebar-muted: #57534E;
    --tec-shadow: none;
    --tec-status-available: #10B981;
    --tec-status-booked: #F59E0B;
    --tec-status-maintenance: #EF4444;
    --tec-status-info: #0369A1;
    --tec-success: #10B981;
    --tec-warning: #F59E0B;
    --tec-danger: #EF4444;
    --tec-info: #0369A1;
    --tec-space-1: 4px;
    --tec-space-2: 8px;
    --tec-space-3: 12px;
    --tec-space-4: 16px;
    --tec-space-5: 24px;
    --tec-space-6: 32px;
    --tec-space-7: 48px;
    --tec-space-8: 64px;
    --tec-space-9: 96px;
    --tec-space-10: 128px;
    --tec-radius-control: 8px;
    --tec-radius-card: 12px;
    --tec-radius-pill: 999px;
    --tec-control-height: 40px;
    --tec-control-height-touch: 44px;
    --tec-hero-height: 52px;
    --tec-container: 1200px;
    --tec-dashboard: 1280px;
    --tec-measure: 680px;
    --tec-ease: cubic-bezier(.2, .8, .2, 1);
    --tec-duration: 150ms;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --tec-bg: #111114;
    --tec-surface: #191C22;
    --tec-ink: #EDEDED;
    --tec-muted: #A1A1AA;
    --tec-line: rgba(255, 255, 255, .08);
    --tec-brand-soft: #3A2A10;
    --tec-sidebar: #1F2937;
    --tec-sidebar-ink: #EDEDED;
    --tec-sidebar-muted: #A1A1AA;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .tec-app {
    background: var(--tec-bg);
    color: var(--tec-ink);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    max-width: 100%;
    overflow-x: clip;
}

body {
    margin: 0;
    background: var(--tec-bg);
    color: var(--tec-ink);
    font-family: var(--tec-font-sans);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.55;
}

[dir="rtl"] body,
[lang="ar"] body {
    line-height: 1.75;
    letter-spacing: 0;
}

:focus-visible {
    outline: 2px solid var(--tec-brand);
    outline-offset: 4px;
}

/* Marketing homepage */
.tec-market {
    background: var(--tec-bg);
    color: var(--tec-ink);
}

.tec-market a {
    color: var(--tec-deep);
}

.tec-wrap {
    width: min(var(--tec-container), calc(100% - 64px));
    margin-inline: auto;
}

.tec-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--tec-space-4);
    min-height: 64px;
    padding-block: var(--tec-space-4);
}

.tec-top .tec-brand {
    font-weight: 600;
    color: var(--tec-ink);
    text-decoration: none;
}

.tec-top nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--tec-space-3);
    margin-inline-start: auto;
}

.tec-top a,
.tec-lang-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding-inline: var(--tec-space-3);
    border-radius: var(--tec-radius-pill);
    text-decoration: none;
    color: var(--tec-ink);
}

.tec-lang-link[aria-current="true"] {
    background: var(--tec-brand-soft);
    color: var(--tec-deep);
}

html[data-theme="dark"] .tec-lang-link[aria-current="true"] {
    background: #78350F;
    color: #FDE68A;
}

.tec-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: var(--tec-space-7);
    align-items: center;
    padding-block: var(--tec-space-7) var(--tec-space-6);
    overflow: clip;
    position: relative;
}

.tec-display {
    font-size: 64px;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin: 0 0 var(--tec-space-4);
    max-width: 11em;
}

[dir="rtl"] .tec-display {
    line-height: 1.25;
    letter-spacing: 0;
    max-width: 11em;
}

.tec-lead {
    font-size: 18px;
    line-height: 1.6;
    max-width: var(--tec-measure);
    margin: 0 0 var(--tec-space-6);
    color: var(--tec-muted);
}

[dir="rtl"] .tec-lead {
    line-height: 1.8;
}

.tec-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tec-space-3);
    margin: 0 0 var(--tec-space-5);
}

.tec-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--tec-hero-height);
    padding-inline: var(--tec-space-5);
    border-radius: var(--tec-radius-control);
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--tec-duration) var(--tec-ease), border-color var(--tec-duration) var(--tec-ease);
}

.tec-btn-primary,
body.tec-market a.tec-btn-primary,
html[data-theme="dark"] body.tec-app.tec-market > main a.tec-btn-primary,
html[data-theme="light"] body.tec-app.tec-market > main a.tec-btn-primary,
body.tec-market button.tec-btn-primary {
    background: var(--tec-brand);
    color: var(--tec-on-brand);
}

body.tec-market a.tec-btn-secondary,
html[data-theme="dark"] body.tec-app.tec-market > main a.tec-btn-secondary,
html[data-theme="light"] body.tec-app.tec-market > main a.tec-btn-secondary,
body.tec-market button.tec-btn-secondary {
    background: var(--tec-surface);
    color: var(--tec-ink);
    border-color: var(--tec-line);
}

.tec-btn-primary:hover {
    filter: brightness(1.05);
}

.tec-btn-secondary {
    background: var(--tec-surface);
    color: var(--tec-ink);
    border-color: var(--tec-line);
}

.tec-btn:disabled,
.tec-btn[aria-disabled="true"] {
    opacity: .5;
    cursor: not-allowed;
}

.tec-btn.is-loading {
    color: transparent;
    position: relative;
}

.tec-btn.is-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid var(--tec-on-brand);
    border-inline-end-color: transparent;
    border-radius: var(--tec-radius-pill);
    animation: tec-spin .6s linear infinite;
}

.tec-trust {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tec-space-2);
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--tec-muted);
    font-size: 14px;
    font-weight: 500;
}

.tec-trust li {
    border: 1px solid var(--tec-line);
    background: var(--tec-surface);
    border-radius: var(--tec-radius-pill);
    padding: var(--tec-space-2) var(--tec-space-3);
}

.tec-shot {
    position: relative;
    background: var(--tec-surface);
    border: 1px solid var(--tec-line);
    border-radius: var(--tec-radius-card);
    padding: var(--tec-space-5);
    min-width: 0;
    overflow: hidden;
}

.tec-shot-bar {
    display: flex;
    gap: var(--tec-space-2);
    margin-block-end: var(--tec-space-4);
}

.tec-shot-bar span {
    width: 8px;
    height: 8px;
    border-radius: var(--tec-radius-pill);
    background: var(--tec-line);
}

.tec-market .tec-gantt-head,
.tec-market .tec-gantt-row {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: var(--tec-space-3);
    align-items: center;
}

.tec-market .tec-gantt-head {
    color: var(--tec-muted);
    font-size: 14px;
    font-weight: 500;
    margin-block-end: var(--tec-space-2);
}

.tec-market .tec-gantt-days,
.tec-market .tec-gantt-track {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: var(--tec-space-1);
}

.tec-market .tec-gantt-days span {
    text-align: center;
}

.tec-market .tec-gantt-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.tec-market .tec-gantt-track {
    background: color-mix(in srgb, var(--tec-ink) 4%, transparent);
    border-radius: var(--tec-radius-pill);
    min-height: 24px;
}

.tec-market .tec-gantt-bar {
    display: block;
    height: 24px;
    border-radius: var(--tec-radius-pill);
    grid-column: var(--start) / span var(--span);
}

.tec-market .tec-gantt-bar.is-available { background: var(--tec-status-available); }
.tec-market .tec-gantt-bar.is-booked { background: var(--tec-status-booked); }
.tec-market .tec-gantt-bar.is-maintenance { background: var(--tec-status-maintenance); }

img.tec-shot-dark,
.tec-hero-shot.tec-shot-dark,
.tec-feature-row img.tec-shot-dark,
.tec-stage .tec-float img.tec-shot-dark {
    display: none;
}

html[data-theme="dark"] img.tec-shot-light,
html[data-theme="dark"] .tec-hero-shot.tec-shot-light,
html[data-theme="dark"] .tec-feature-row img.tec-shot-light,
html[data-theme="dark"] .tec-stage .tec-float img.tec-shot-light {
    display: none;
}

html[data-theme="dark"] img.tec-shot-dark,
html[data-theme="dark"] .tec-hero-shot.tec-shot-dark,
html[data-theme="dark"] .tec-feature-row img.tec-shot-dark,
html[data-theme="dark"] .tec-stage .tec-float img.tec-shot-dark {
    display: block;
}

.tec-float {
    position: static;
    width: min(280px, 100%);
    margin-inline-start: auto;
    background: var(--tec-surface);
    color: var(--tec-ink);
    border: 1px solid var(--tec-line);
    border-radius: var(--tec-radius-card);
    padding: var(--tec-space-4);
    box-shadow: 0 8px 24px rgba(31, 41, 55, .08);
}

.tec-float strong,
.tec-float p {
    margin: 0;
}

.tec-float p {
    color: var(--tec-muted);
    font-size: 14px;
    margin-block-start: var(--tec-space-1);
}

.tec-float-quote {
    margin-block-start: var(--tec-space-2);
}

.tec-float-invoice {
    inset-block-end: var(--tec-space-5);
    inset-inline-start: var(--tec-space-4);
}

.tec-stage {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 220px);
    grid-template-rows: auto auto;
    gap: var(--tec-space-4);
    align-items: start;
    overflow: visible;
    padding: 0;
}

.tec-frame {
    grid-column: 1;
    grid-row: 1 / span 2;
    border: 1px solid var(--tec-line);
    border-radius: var(--tec-radius-card);
    background: var(--tec-surface);
    overflow: hidden;
    transform: none;
}

[dir="rtl"] .tec-frame {
    transform: rotateY(8deg) rotateX(4deg);
}

.tec-frame .tec-shot-bar {
    margin: var(--tec-space-3) var(--tec-space-4) 0;
}

.tec-hero-shot,
.tec-feature-row img,
.tec-stage .tec-float img {
    display: block;
    width: 100%;
    height: auto;
}

.tec-hero-shot {
    height: auto;
    max-height: 420px;
    object-fit: contain;
    object-position: top center;
    background: var(--tec-surface);
}

.tec-stage .tec-float {
    position: static;
    z-index: 1;
    width: auto;
    margin: 0;
    padding: var(--tec-space-2);
}

.tec-stage .tec-float-quote {
    grid-column: 2;
    grid-row: 1;
}

.tec-stage .tec-float-invoice {
    grid-column: 2;
    grid-row: 2;
    width: auto;
}

.tec-stage .tec-float img {
    max-height: 180px;
    height: auto;
    object-fit: contain;
    border-radius: var(--tec-radius-control);
}

.tec-stage .tec-float-quote img {
    object-position: top center;
}

.tec-stage .tec-float-invoice img {
    object-position: center center;
}

.tec-feature-row {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: var(--tec-space-6);
    align-items: center;
}

.tec-feature-row.is-flip .tec-feature-copy {
    order: 2;
}

.tec-feature-row img {
    max-height: 360px;
    object-fit: contain;
    object-position: top center;
    border: 1px solid var(--tec-line);
    border-radius: var(--tec-radius-card);
    background: var(--tec-surface);
}

.tec-feature-row img.is-mid {
    object-position: center center;
}

body.tec-market .tec-prices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--tec-space-5);
    width: 100%;
}

.tec-prices .tec-price {
    max-width: none;
}

.tec-booking-only {
    display: none;
}

.tec-section {
    padding-block: var(--tec-space-6);
}

.tec-market h1:not(.tec-display) {
    font-size: 36px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 var(--tec-space-4);
}

[dir="rtl"] .tec-market h1:not(.tec-display) {
    letter-spacing: 0;
    line-height: 1.35;
}

.tec-section h2 {
    font-size: 36px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.015em;
    margin: 0 0 var(--tec-space-4);
}

[dir="rtl"] .tec-section h2 {
    line-height: 1.35;
    letter-spacing: 0;
}

.tec-section .tec-kicker {
    max-width: var(--tec-measure);
    margin: 0 0 var(--tec-space-6);
    color: var(--tec-muted);
}

.tec-grid-3,
.tec-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--tec-space-5);
}

.tec-feature,
.tec-step,
.tec-price,
.tec-faq details {
    background: var(--tec-surface);
    border: 1px solid var(--tec-line);
    border-radius: var(--tec-radius-card);
    padding: var(--tec-space-5);
}

.tec-feature h3,
.tec-step h3,
.tec-price h3 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin: var(--tec-space-3) 0 var(--tec-space-2);
}

[dir="rtl"] .tec-feature h3,
[dir="rtl"] .tec-step h3 {
    line-height: 1.4;
    letter-spacing: 0;
}

.tec-feature p,
.tec-step p,
.tec-price p,
.tec-faq p {
    margin: 0;
    color: var(--tec-muted);
}

.tec-mini {
    display: grid;
    gap: var(--tec-space-2);
    margin-block-end: var(--tec-space-2);
}

.tec-mini span {
    display: block;
    height: 8px;
    border-radius: var(--tec-radius-pill);
    background: var(--tec-line);
}

.tec-mini span:nth-child(1) { width: 70%; background: var(--tec-status-booked); }
.tec-mini span:nth-child(2) { width: 45%; background: var(--tec-status-available); }
.tec-mini span:nth-child(3) { width: 88%; background: var(--tec-status-maintenance); }

.tec-step b {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: var(--tec-radius-pill);
    background: var(--tec-brand);
    color: var(--tec-on-brand);
    font-weight: 600;
}

.tec-band {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
    gap: var(--tec-space-5);
    align-items: center;
}

.tec-price {
    border-color: var(--tec-line);
    max-width: none;
}

.tec-price.is-recommended {
    border-color: var(--tec-brand);
    box-shadow: inset 0 0 0 1px var(--tec-brand);
}

.tec-price p.tec-price-flag {
    display: inline-flex;
    margin: 0 0 var(--tec-space-3);
    padding: var(--tec-space-1) var(--tec-space-3);
    border-radius: var(--tec-radius-pill);
    background: #FEF3C7;
    color: #92400E;
    font-size: 14px;
    font-weight: 600;
}

html[data-theme="dark"] .tec-price p.tec-price-flag {
    background: #78350F;
    color: #FDE68A;
}

.tec-price p.tec-price-figure {
    margin: 0 0 var(--tec-space-2);
    color: var(--tec-ink);
    background: transparent;
    font-size: 36px;
    font-weight: 600;
    line-height: 1.15;
}

.tec-price p.tec-price-renewal {
    margin: 0 0 var(--tec-space-3);
    color: var(--tec-muted);
    font-size: 14px;
}

.tec-price ul {
    margin: var(--tec-space-4) 0;
    padding-inline-start: var(--tec-space-5);
}

.tec-price li {
    margin-block: var(--tec-space-2);
}

.tec-faq {
    display: grid;
    gap: var(--tec-space-3);
    max-width: 800px;
}

.tec-faq summary {
    cursor: pointer;
    font-weight: 600;
}

.tec-faq p {
    margin-block-start: var(--tec-space-3);
}

.tec-close {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--tec-space-5);
    background: var(--tec-surface);
    color: var(--tec-ink);
    border: 1px solid var(--tec-line);
    border-radius: var(--tec-radius-card);
    padding: var(--tec-space-7);
}

html[data-theme="dark"] .tec-close {
    background: var(--tec-surface);
    border: 1px solid var(--tec-line);
}

.tec-close h2 {
    color: inherit;
    margin: 0 0 var(--tec-space-3);
}

.tec-close p {
    margin: 0;
    max-width: var(--tec-measure);
}

.tec-foot {
    display: flex;
    justify-content: space-between;
    gap: var(--tec-space-4);
    padding-block: var(--tec-space-6);
    color: var(--tec-muted);
    font-size: 14px;
}

.tec-foot a {
    color: var(--tec-muted);
}

.tec-maker {
    font-size: 12px;
}

.tec-maker a {
    color: inherit;
}

.tec-app-foot,
.tec-release {
    margin: 0;
    padding: var(--tec-space-4) var(--tec-space-5);
    color: var(--tec-muted);
    font-size: 14px;
}

.tec-market form {
    display: grid;
    gap: var(--tec-space-4);
    max-width: var(--tec-measure);
    margin-block-start: var(--tec-space-5);
}

.tec-market form label {
    font-weight: 600;
}

.tec-market form input,
.tec-market form textarea {
    width: 100%;
    min-height: 44px;
    margin-block-start: var(--tec-space-2);
    padding: var(--tec-space-3) var(--tec-space-4);
    border: 1px solid var(--tec-line);
    border-radius: var(--tec-radius-control);
    background: var(--tec-surface);
    color: var(--tec-ink);
    font: inherit;
    font-size: 16px;
}

.tec-market form textarea {
    min-height: 128px;
}

.tec-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding-inline: var(--tec-space-3);
    border-radius: var(--tec-radius-pill);
    font-size: 14px;
    font-weight: 500;
}

.tec-status-available { background: #D1FAE5; color: #065F46; }
.tec-status-booked { background: #FEF3C7; color: #92400E; }
.tec-status-maintenance { background: #FEE2E2; color: #991B1B; }

html[data-theme="dark"] .tec-status-available { background: #064E3B; color: #A7F3D0; }
html[data-theme="dark"] .tec-status-booked { background: #78350F; color: #FDE68A; }
html[data-theme="dark"] .tec-status-maintenance { background: #7F1D1D; color: #FECACA; }

html[data-theme="dark"] .tec-shot,
html[data-theme="dark"] .tec-feature,
html[data-theme="dark"] .tec-step,
html[data-theme="dark"] .tec-price,
html[data-theme="dark"] .tec-faq details,
html[data-theme="dark"] .tec-float,
html[data-theme="dark"] .tec-trust li {
    background: var(--tec-surface);
    color: var(--tec-ink);
    border-color: var(--tec-line);
}

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

@media (max-width: 767px) {
    .tec-wrap { width: min(var(--tec-container), calc(100% - 48px)); }
    .tec-display { font-size: 40px; }
    .tec-section h2 { font-size: 26px; }
    .tec-feature h3 { font-size: 20px; }
    .tec-lead { font-size: 17px; }
    .tec-hero,
    .tec-grid-3,
    .tec-steps,
    .tec-band,
    .tec-close,
    .tec-foot,
    .tec-top,
    .tec-feature-row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
    body.tec-market .tec-prices {
        grid-template-columns: 1fr;
    }
    .tec-top nav { margin-inline-start: 0; flex-wrap: wrap; }
    .tec-hero { padding-block: var(--tec-space-6); gap: var(--tec-space-5); }
    .tec-section { padding-block: var(--tec-space-6); }
    .tec-market .tec-gantt-head,
    .tec-market .tec-gantt-row { grid-template-columns: 96px minmax(0, 1fr); }
    .tec-float { position: static; width: auto; margin-block-start: var(--tec-space-4); }
    .tec-frame,
    [dir="rtl"] .tec-frame { transform: none; }
    .tec-stage { display: flex; flex-direction: column; padding: 0; overflow: visible; }
    .tec-frame { grid-column: auto; grid-row: auto; }
    .tec-hero-shot { height: auto; max-height: 420px; object-fit: contain; }
    .tec-stage .tec-float,
    .tec-stage .tec-float-invoice { position: static; width: auto; inset: auto; }
    .tec-stage .tec-float img { max-height: none; }
    .tec-feature-row.is-flip .tec-feature-copy { order: 0; }
    .tec-feature-row img { height: auto; max-height: 420px; object-fit: contain; }
    .tec-btn { min-height: 44px; width: 100%; }
    .tec-actions { flex-direction: column; }
}

.tec-shot-open {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: zoom-in;
}

.tec-lightbox {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    margin: 0;
    padding: 0;
    border: 0;
    background: #111114;
    color: #ededed;
}

.tec-lightbox form {
    position: absolute;
    z-index: 2;
    top: 12px;
    inset-inline-end: 12px;
}

.tec-lightbox-stage {
    width: 100%;
    height: 100%;
    overflow: auto;
    touch-action: pan-x pan-y pinch-zoom;
}

.tec-lightbox img {
    display: block;
    width: auto;
    max-width: none;
    height: auto;
}

.tec-lightbox::backdrop {
    background: rgba(17, 17, 20, .72);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    .tec-frame { transform: none; }
}

/* Dashboard reinforcement. Loaded after the application stylesheet. */
.tec-app {
    font-family: var(--tec-font-sans);
    background: var(--tec-bg);
    color: var(--tec-ink);
    overflow-x: clip;
}

.tec-app .tec-gantt-track {
    background: color-mix(in srgb, var(--tec-ink) 6%, var(--tec-surface));
    border-radius: var(--tec-radius-pill);
    min-height: 24px;
}

.tec-app .tec-gantt-bar { height: 1.25rem; }
.tec-app .tec-gantt-bar.is-available { background: var(--tec-status-available); }
.tec-app .tec-gantt-bar.is-booked { background: var(--tec-status-booked); }
.tec-app .tec-gantt-bar.is-maintenance { background: var(--tec-status-maintenance); }

.tec-app .tec-button,
.tec-app .tec-main button,
.tec-app a.tec-button {
    background: var(--tec-brand);
    color: var(--tec-on-brand);
    border-radius: var(--tec-radius-control);
    min-height: var(--tec-control-height);
}

.tec-app button.tec-button-ghost,
.tec-app a.tec-button-ghost {
    background: transparent;
    color: var(--tec-ink);
    border: 1px solid var(--tec-line);
}

.tec-app .tec-card,
.tec-app .tec-table-wrap,
.tec-app .tec-tile {
    border-radius: var(--tec-radius-card);
    box-shadow: none;
}

.tec-app .tec-badge,
.tec-app .tec-status {
    border-radius: var(--tec-radius-pill);
}

.tec-app .tec-badge:not(.tec-badge-warn):not(.tec-badge-bad):not(.tec-badge-neutral):not(.tec-status-available):not(.tec-status-maintenance) {
    background: #FEF3C7;
    color: #92400E;
}

html[data-theme="dark"] .tec-app .tec-badge:not(.tec-badge-warn):not(.tec-badge-bad):not(.tec-badge-neutral):not(.tec-status-available):not(.tec-status-maintenance) {
    background: #78350F;
    color: #FDE68A;
}

html[data-theme="dark"] .tec-sidebar {
    background: #1F2937;
    color: #EDEDED;
    border-inline-end: 1px solid rgba(255, 255, 255, .08);
}

html[data-theme="dark"] .tec-sidebar a,
html[data-theme="dark"] .tec-brand,
html[data-theme="dark"] .tec-nav-group summary,
html[data-theme="dark"] .tec-icon-button,
html[data-theme="dark"] .tec-account-menu,
html[data-theme="dark"] .tec-account-menu button,
html[data-theme="dark"] .tec-main,
html[data-theme="dark"] .tec-header,
html[data-theme="dark"] .tec-card,
html[data-theme="dark"] .tec-table-wrap,
html[data-theme="dark"] .tec-tabbar,
html[data-theme="dark"] .tec-fab-sheet {
    background-color: transparent;
    color: #EDEDED;
}

html[data-theme="dark"] .tec-header,
html[data-theme="dark"] .tec-card,
html[data-theme="dark"] .tec-table-wrap,
html[data-theme="dark"] .tec-account-menu,
html[data-theme="dark"] .tec-tabbar,
html[data-theme="dark"] .tec-fab-sheet,
html[data-theme="dark"] .tec-main input,
html[data-theme="dark"] .tec-main select,
html[data-theme="dark"] .tec-main textarea {
    background: var(--tec-surface);
    color: var(--tec-ink);
    border-color: var(--tec-line);
}

html[data-theme="dark"] .tec-sidebar a[aria-current],
html[data-theme="dark"] .tec-sidebar a:hover {
    background: color-mix(in srgb, var(--tec-brand) 24%, #0b1220);
    color: var(--tec-on-dark, #F8FAFC);
}

html[data-theme="dark"] .tec-main a:not(.tec-button) {
    color: var(--tec-on-dark, #F8FAFC);
}

html[data-theme="dark"] .tec-tabs a[aria-current],
html[data-theme="dark"] .tec-chips a[aria-current] {
    background: var(--tec-brand);
    color: var(--tec-on-brand, #1F2937);
    border-color: var(--tec-brand);
}

html[data-theme="dark"] .tec-main a.tec-tap {
    color: var(--tec-ink);
    background: var(--tec-surface);
}

[dir="rtl"] .tec-ico-mirror {
    transform: scaleX(-1);
}

.tec-login{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);min-height:100vh}
.tec-login-panel{margin:32px;border:1px solid var(--tec-line);border-radius:12px;padding:48px;background:var(--tec-surface);display:flex;flex-direction:column;justify-content:flex-end;gap:24px}
.tec-login-form{display:flex;flex-direction:column;justify-content:center;padding:48px}
.tec-login-form input,.tec-card input{width:100%;min-height:44px;margin-top:8px;padding:12px 16px;border:1px solid var(--tec-line);border-radius:8px;font:inherit;font-size:16px;background:var(--tec-surface);color:var(--tec-ink)}
@media(max-width:767px){.tec-login{grid-template-columns:1fr}.tec-login-panel,.tec-login-form{margin:0;padding:24px}}
.tec-shell{display:grid;grid-template-columns:276px minmax(0,1fr);min-height:100vh;width:100%;max-width:100%;min-width:0}
.tec-workspace,.tec-main,.tec-main form,.tec-main fieldset,.tec-card,.tec-chips{min-width:0;max-width:100%}
.tec-main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),.tec-main select,.tec-main textarea,.tec-card input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),.tec-card select,.tec-card textarea{min-width:0;max-width:100%;width:100%}
.tec-switch{position:relative}
.tec-switch input{position:absolute;width:1px;height:1px;min-width:0;max-width:1px}
.tec-chips{display:flex;flex-wrap:wrap}
.tec-sidebar{background:var(--tec-sidebar);color:var(--tec-sidebar-ink);border-inline-end:1px solid var(--tec-line);padding:16px 12px;display:flex;flex-direction:column;gap:8px}
.tec-sidebar a,.tec-nav-group summary{display:flex;align-items:center;gap:8px;color:var(--tec-sidebar-ink);text-decoration:none;padding:8px 12px;border-radius:8px}
.tec-sidebar a[aria-current]{background:var(--tec-brand-soft);color:var(--tec-deep)}
.tec-header{display:flex;align-items:center;gap:12px;min-height:64px;padding:8px 24px;background:var(--tec-surface);border-block-end:1px solid var(--tec-line)}
.tec-header nav{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.tec-main{padding:24px 32px 48px}
.tec-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.tec-kpi strong{display:block;font-size:32px;font-weight:600;margin-top:8px}
.tec-page-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:24px}
.tec-page-head h1{font-size:32px;font-weight:600;line-height:1.1;margin:0}
[dir=rtl] .tec-page-head h1{letter-spacing:0;line-height:1.3}

@media (max-width: 767px) {
    .tec-shell{display:block}
    .tec-preview .tec-sidebar{display:none}
    .tec-kpis{grid-template-columns:1fr}
    .tec-main{padding:16px 24px 32px}
    .tec-app .tec-button,
    .tec-app .tec-main button,
    .tec-app .tec-main input,
    .tec-app .tec-main select,
    .tec-app .tec-icon-button,
    .tec-app .tec-tap {
        min-height: 44px;
    }
    .tec-workspace { overflow-x: clip; }
    .tec-table-wrap,
    .tec-main .tec-table { overflow: visible; background: transparent; border: 0; box-shadow: none; }
    .tec-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .tec-table,
    .tec-table tbody { display: block; width: 100%; }
    .tec-table tr {
        display: flex;
        flex-direction: column;
        background: var(--tec-surface);
        border: 1px solid var(--tec-line);
        border-radius: var(--tec-radius-card);
        margin-block: var(--tec-space-3);
        padding-block: var(--tec-space-2);
    }
    .tec-table td {
        display: block;
        width: auto;
        border: 0;
        padding: var(--tec-space-2) var(--tec-space-4);
        text-align: start;
    }
    .tec-table td:first-child { font-weight: 600; }
    .tec-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: 14px;
        font-weight: 500;
        color: var(--tec-muted);
    }
    .tec-table td.tec-empty::before,
    .tec-table td[colspan]::before { content: none; }
    html[data-theme="dark"] .tec-table tr {
        background: var(--tec-surface);
        color: var(--tec-ink);
        border-color: var(--tec-line);
    }
}
.tec-app .tec-tabs a[aria-current],
.tec-app .tec-chips a[aria-current] {
    background: var(--tec-brand);
    color: var(--tec-on-brand);
    border-color: var(--tec-brand);
}
html[data-theme="dark"] .tec-app .tec-tabs a[aria-current],
html[data-theme="dark"] .tec-app .tec-chips a[aria-current] {
    background: var(--tec-brand);
    color: var(--tec-on-brand);
    border-color: var(--tec-brand);
}
html[data-theme="dark"] .tec-app a.tec-tap,
html[data-theme="dark"] .tec-app .tec-main a.tec-tap {
    color: var(--tec-ink);
    background: var(--tec-surface);
    border-color: var(--tec-line);
}
html[data-theme="dark"] .tec-app .tec-sidebar a[aria-current],
html[data-theme="dark"] .tec-app .tec-sidebar a:hover {
    color: var(--tec-on-dark);
    background: color-mix(in srgb, var(--tec-brand) 24%, #111114);
}
.tec-app a.tec-btn-primary,
.tec-app a.tec-button:not(.tec-button-ghost) {
    color: var(--tec-on-brand);
    background: var(--tec-brand);
}
[data-href] { cursor: pointer; }
.tec-action-bar {
    position: sticky;
    bottom: var(--tec-space-8);
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    gap: var(--tec-space-2);
    padding: var(--tec-space-3);
    background: var(--tec-surface);
    border: 1px solid var(--tec-line);
    border-radius: var(--tec-radius-card);
}
.tec-action-bar a,
.tec-action-bar button {
    position: relative;
    z-index: 2;
}
