:root {
    --ink: #17231f;
    --muted: #6a7772;
    --line: #dfe7e3;
    --paper: #ffffff;
    --canvas: #f4f7f5;
    --forest: #173f32;
    --forest-2: #245943;
    --mint: #dff1e8;
    --mint-2: #eef8f3;
    --amber: #c98724;
    --danger: #b84141;
    --navy: #2d526c;
    --radius: 18px;
    --shadow: 0 12px 34px rgba(22, 50, 40, .07);
}

* { box-sizing: border-box; }

html { color-scheme: light; scroll-behavior: smooth; }

body {
    margin: 0;
    min-width: 320px;
    background: var(--canvas);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
input, select, textarea { min-width: 0; }

.app-shell { padding-left: 264px; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    display: flex;
    width: 264px;
    flex-direction: column;
    background:
        radial-gradient(circle at 20% 110%, rgba(89, 150, 121, .22), transparent 38%),
        #12211c;
    color: #e8f1ed;
    padding: 25px 19px;
}

.brand, .auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    place-items: center;
    border-radius: 13px;
    background: #d5f0e3;
    color: var(--forest);
    font-size: 14px;
    font-weight: 850;
    letter-spacing: -.02em;
}

.brand strong, .auth-brand strong { display: block; font-size: 15px; letter-spacing: -.01em; }
.brand small, .auth-brand small { display: block; color: #97aaa2; font-size: 11px; margin-top: 1px; }

.main-nav { display: grid; gap: 7px; margin-top: 42px; }

.main-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 47px;
    padding: 0 13px;
    border-radius: 12px;
    color: #afbeb8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 650;
    transition: .18s ease;
}

.main-nav a span { width: 21px; text-align: center; color: #86a096; font-size: 20px; }
.main-nav a:hover { background: rgba(255, 255, 255, .06); color: white; }
.main-nav a.active { background: #d9eee4; color: #173f32; }
.main-nav a.active span { color: #173f32; }

.sidebar-foot {
    display: grid;
    gap: 15px;
    margin-top: auto;
    padding: 18px 4px 1px;
    border-top: 1px solid rgba(255, 255, 255, .09);
}

.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip .avatar {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50%;
    background: #315848;
    color: #d9eee4;
    font-weight: 800;
}
.user-chip strong, .user-chip small { display: block; }
.user-chip strong { font-size: 13px; }
.user-chip small { color: #90a39b; font-size: 11px; }

.text-button {
    border: 0;
    background: none;
    color: #a9bbb4;
    padding: 0;
    font-size: 12px;
    cursor: pointer;
}
.text-button:hover { color: white; }

.main { min-height: 100vh; }

.topbar {
    display: flex;
    min-height: 112px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px clamp(25px, 4vw, 58px);
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(14px);
}

.topbar h1 { margin: 2px 0 0; font-size: clamp(24px, 3vw, 31px); line-height: 1.1; letter-spacing: -.04em; }
.eyebrow { margin: 0; color: #75847e; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.top-actions, .record-actions, .hero-actions, .sticky-actions { display: flex; align-items: center; gap: 9px; }

.content { width: min(1500px, 100%); margin: 0 auto; padding: 30px clamp(19px, 4vw, 58px) 60px; }

.button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0 18px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 760;
    cursor: pointer;
    transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
    outline: 3px solid rgba(50, 115, 87, .22);
    outline-offset: 2px;
}
.button.primary { background: var(--forest); color: white; box-shadow: 0 8px 18px rgba(23, 63, 50, .15); }
.button.primary:hover { background: #0d3226; }
.button.secondary { border-color: #ccd7d2; background: white; color: var(--ink); }
.button.whatsapp-button { border-color: #169c52; background: #1faa59; color: white; box-shadow: 0 8px 18px rgba(31, 170, 89, .16); }
.button.whatsapp-button:hover { background: #168b49; }
.button.danger-button { border-color: #e4bcbc; background: #fff1f1; color: #a33333; }
.button.danger-button:hover { background: #fbe3e3; }
.button.light { background: #e5f4ed; color: #173f32; }
.button.ghost-light { border-color: rgba(255, 255, 255, .28); color: white; }
.button.compact { min-height: 40px; padding: 0 14px; font-size: 12px; }
.button.full { width: 100%; }

.hero-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    min-height: 230px;
    padding: clamp(28px, 5vw, 47px);
    border-radius: 24px;
    background:
        radial-gradient(circle at 88% 0%, rgba(126, 178, 151, .35), transparent 32%),
        linear-gradient(124deg, #153d31, #0f2a22);
    color: white;
    box-shadow: 0 18px 45px rgba(21, 61, 49, .18);
}
.hero-panel::after {
    position: absolute;
    right: -74px;
    bottom: -118px;
    width: 310px;
    height: 310px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
    box-shadow: 0 0 0 38px rgba(255, 255, 255, .02), 0 0 0 75px rgba(255, 255, 255, .02);
    content: "";
}
.hero-panel > * { position: relative; z-index: 1; }
.hero-panel .eyebrow { color: #a9c4b8; }
.hero-panel h2 { max-width: 650px; margin: 14px 0 10px; font-size: clamp(29px, 4vw, 45px); line-height: 1.04; letter-spacing: -.05em; }
.hero-panel p:not(.eyebrow) { max-width: 620px; margin: 0; color: #bed0c8; font-size: 14px; }
.hero-actions { flex-wrap: wrap; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 17px 0 25px; }
.stat-card {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 118px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 8px 26px rgba(30, 55, 46, .035);
}
.stat-icon { display: grid; width: 43px; height: 43px; flex: 0 0 43px; place-items: center; border-radius: 13px; font-size: 20px; }
.stat-icon.green { background: #def1e8; color: #256044; }
.stat-icon.navy { background: #e3edf3; color: #315b74; }
.stat-icon.amber { background: #faecd5; color: #a66b19; }
.stat-icon.sage { background: #e8efe8; color: #5a735e; }
.stat-card small, .stat-card strong, .stat-card span:not(.stat-icon) { display: block; }
.stat-card small { color: var(--muted); font-size: 11px; font-weight: 720; }
.stat-card strong { margin: 1px 0 -1px; font-size: 28px; line-height: 1.2; letter-spacing: -.04em; }
.stat-card span:not(.stat-icon) { color: #85918d; font-size: 10px; }

.dashboard-grid, .detail-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr); gap: 17px; }
.detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }

.panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 8px 28px rgba(35, 54, 47, .035);
}
.panel-head {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 19px 22px;
    border-bottom: 1px solid #edf1ef;
}
.panel-head h2 { margin: 4px 0 0; font-size: 17px; letter-spacing: -.025em; }
.inline-link { color: var(--forest-2); font-size: 12px; font-weight: 760; text-decoration: none; }
.inline-link:hover { text-decoration: underline; }

.responsive-table { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 17px; background: #fbfcfb; color: #7a8782; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 15px 17px; border-top: 1px solid #edf1ef; color: #3d4945; font-size: 12px; vertical-align: middle; }
tbody tr:first-child td { border-top: 0; }
tbody tr:hover { background: #fbfdfc; }
td strong, td small { display: block; }
td strong { color: var(--ink); font-size: 13px; }
td small { color: #87938f; font-size: 10px; margin-top: 2px; }
.row-link { color: var(--forest-2); font-size: 11px; font-weight: 800; text-decoration: none; }
.row-share-link { color: #168a49; font-size: 11px; font-weight: 800; text-decoration: none; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.row-actions form { margin: 0; }
.row-delete-link { border: 0; background: transparent; color: var(--danger); padding: 0; font-size: 11px; font-weight: 800; cursor: pointer; }
.row-delete-link:hover { text-decoration: underline; }

.badge {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    border-radius: 999px;
    padding: 0 10px;
    background: #edf1ef;
    color: #5b6863;
    font-size: 9px;
    font-weight: 830;
    letter-spacing: .02em;
    white-space: nowrap;
}
.badge.success { background: #dff2e8; color: #286043; }
.badge.info { background: #e2edf4; color: #305c75; }
.badge.warning { background: #faecd3; color: #946016; }
.badge.danger { background: #f7e1e1; color: #9d3939; }
.badge.neutral { background: #e8ecea; color: #58645f; }
.badge.outline { border: 1px solid #d7dfdb; background: white; color: #5f6d68; }

.repair-stack { padding: 7px 15px 14px; }
.repair-mini-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #edf1ef; }
.repair-mini-row:last-child { border-bottom: 0; }
.repair-mini {
    display: grid;
    min-width: 0;
    flex: 1;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 13px 5px;
    text-decoration: none;
}
.repair-mini-delete { border: 0; border-radius: 8px; background: #fff0f0; color: var(--danger); padding: 7px 8px; font-size: 9px; font-weight: 800; cursor: pointer; }
.repair-mini strong, .repair-mini small { display: block; }
.repair-mini strong { font-size: 12px; }
.repair-mini small { color: #87938e; font-size: 9px; margin-top: 2px; }
.repair-dot { width: 7px; height: 7px; border-radius: 50%; background: #6a7c74; }
.repair-dot.success { background: #2e8059; }
.repair-dot.warning { background: #d2922a; }
.repair-dot.info { background: #467b9b; }

.alert {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 0 0 18px;
    border: 1px solid #d8e7df;
    border-radius: 13px;
    background: #eff9f4;
    color: #28543f;
    padding: 12px 14px;
    font-size: 12px;
}
.alert > span { display: grid; width: 20px; height: 20px; flex: 0 0 20px; place-items: center; border-radius: 50%; background: #cfe9dc; font-weight: 900; }
.alert p { margin: 0; }
.alert.danger { border-color: #efd5d5; background: #fff1f1; color: #873535; }
.alert.danger > span { background: #f2cece; }

.filter-panel { margin-bottom: 17px; padding: 15px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.filters select { width: auto; min-width: 145px; min-height: 41px; }
.search-field {
    display: flex;
    min-width: min(100%, 330px);
    min-height: 42px;
    flex: 1;
    align-items: center;
    gap: 8px;
    border: 1px solid #d4ded9;
    border-radius: 11px;
    background: white;
    padding: 0 12px;
}
.search-field span { color: #7c8a84; font-size: 19px; }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--ink); }

.record-form { display: grid; gap: 17px; }
.quick-record-note { display: flex; align-items: center; gap: 12px; border: 1px solid #cce3d7; border-radius: 13px; background: #eef8f3; color: #496057; padding: 12px 15px; font-size: 10px; }
.quick-record-note strong { flex: 0 0 auto; border-radius: 999px; background: #d4ecdf; color: var(--forest); padding: 6px 9px; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.narrow-form { max-width: 900px; margin: 0 auto; }
.form-section { overflow: visible; padding: clamp(20px, 4vw, 33px); }
.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 26px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e8eeeb;
}
.section-heading > div { display: flex; align-items: center; gap: 12px; }
.section-heading h2 { margin: 0; font-size: 19px; letter-spacing: -.03em; }
.section-heading > p { max-width: 390px; margin: 2px 0 0; color: var(--muted); font-size: 11px; text-align: right; }
.step { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; margin: 0; border-radius: 10px; background: var(--mint); color: var(--forest); font-size: 10px; font-weight: 850; }
.compact-heading { margin: 23px 0 14px; padding: 0; border: 0; }
.compact-heading > div { display: block; }
.compact-heading h3 { margin: 3px 0 0; font-size: 14px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; align-content: start; gap: 7px; }
.field > span { color: #52605b; font-size: 10px; font-weight: 780; letter-spacing: .02em; }
.field > .field-label { color: #52605b; font-size: 10px; font-weight: 780; letter-spacing: .02em; }
.field > small { color: #84918c; font-size: 10px; }
.field input, .field select, .field textarea, .filters select {
    width: 100%;
    border: 1px solid #d4ded9;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
.field input, .field select { min-height: 44px; padding: 0 12px; }
.field textarea { padding: 11px 12px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover, .filters select:hover { border-color: #b9c8c1; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #598a73; box-shadow: 0 0 0 3px rgba(59, 118, 89, .09); outline: 0; }
.field input::placeholder, .field textarea::placeholder { color: #a9b3af; }
.field.has-suggestions { position: relative; }
.imei-input-wrap { position: relative; }
.imei-input-wrap input { padding-right: 53px; }
.imei-scan-button { position: absolute; top: 5px; right: 5px; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #c8d7d0; border-radius: 8px; background: #edf6f1; color: var(--forest); padding: 0; cursor: pointer; }
.imei-scan-button:hover { background: #dff0e7; }
.imei-scan-button svg { width: 18px; height: 18px; fill: currentColor; }
.smart-suggestions { position: absolute; z-index: 35; top: calc(100% + 4px); right: 0; left: 0; overflow: hidden; border: 1px solid #ccd9d2; border-radius: 11px; background: white; padding: 5px; box-shadow: 0 16px 38px rgba(18, 46, 35, .18); }
.smart-suggestions[hidden] { display: none; }
.smart-suggestions button { display: block; width: 100%; border: 0; border-radius: 7px; background: transparent; color: #405149; padding: 9px 10px; font-size: 11px; text-align: left; cursor: pointer; }
.smart-suggestions button:hover, .smart-suggestions button.is-active { background: #eaf5ef; color: var(--forest); }
.top-gap { margin-top: 17px; }

.segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; padding: 5px; border-radius: 12px; background: #edf2ef; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: grid; min-height: 39px; place-items: center; border-radius: 9px; color: #6a7772; font-size: 11px; font-weight: 760; transition: .15s; }
.segmented input:checked + span { background: white; color: var(--forest); box-shadow: 0 3px 10px rgba(31, 53, 45, .08); }

.identity-fields { margin-top: 20px; }
.identity-fields.is-hidden { display: none; }
.upload-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.identity-fields .upload-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.upload-card {
    position: relative;
    display: flex;
    min-height: 125px;
    align-items: center;
    gap: 12px;
    border: 1px dashed #aebfb7;
    border-radius: 14px;
    background: #f8fbf9;
    padding: 18px;
    cursor: pointer;
    transition: border .15s, background .15s;
}
.upload-card:hover { border-color: #5c8c75; background: #f0f8f4; }
.upload-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-card > span:not(.upload-symbol):not(.file-count) { min-width: 0; }
.upload-card strong, .upload-card small { display: block; }
.upload-card strong { font-size: 12px; }
.upload-card small { color: #7e8d87; font-size: 9px; margin-top: 3px; }
.upload-symbol { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 10px; background: var(--mint); color: var(--forest); font-size: 21px; }
.file-count { position: absolute; right: 12px; bottom: 10px; left: 12px; overflow: hidden; color: #779083; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.image-manager { min-width: 0; border: 1px dashed #aebfb7; border-radius: 14px; background: #f8fbf9; padding: 14px; }
.image-manager-head { display: flex; align-items: center; gap: 10px; }
.image-manager-head > span:last-child { min-width: 0; }
.image-manager-head strong, .image-manager-head small { display: block; }
.image-manager-head strong { font-size: 12px; }
.image-manager-head small { margin-top: 2px; color: #7e8d87; font-size: 9px; }
.image-manager-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 12px; }
.image-manager-actions .button { min-height: 36px; padding-inline: 8px; font-size: 10px; }
.image-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.image-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 11px; }
.image-preview { position: relative; overflow: hidden; margin: 0; border: 1px solid #d9e3de; border-radius: 10px; background: white; }
.image-preview img { width: 100%; aspect-ratio: 1; object-fit: cover; vertical-align: middle; }
.image-preview figcaption { overflow: hidden; padding: 6px 7px 29px; color: #718078; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.image-preview > input { position: absolute; opacity: 0; pointer-events: none; }
.image-preview > button { position: absolute; right: 6px; bottom: 5px; border: 0; border-radius: 6px; background: #ffeded; color: #a43636; padding: 4px 6px; font-size: 7px; font-weight: 850; cursor: pointer; }
.image-preview.is-removed img { filter: grayscale(1); opacity: .25; }
.image-preview.is-removed::after { position: absolute; inset: 0 0 28px; display: grid; place-items: center; background: rgba(255, 255, 255, .55); color: #a33333; content: "Silinecek"; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.image-preview.is-removed > button { z-index: 2; background: #e8f4ee; color: #285e45; }
.image-manager-status { margin: 9px 0 0; color: #71867b; font-size: 8px; }

.battery-row { max-width: 500px; margin-bottom: 17px; }
.range-wrap { display: flex; align-items: center; gap: 14px; min-height: 44px; border: 1px solid #d4ded9; border-radius: 11px; padding: 0 12px; }
.range-wrap input { min-height: auto; flex: 1; border: 0; padding: 0; accent-color: var(--forest-2); }
.range-wrap output { min-width: 45px; color: var(--forest); font-size: 13px; font-weight: 850; text-align: right; }

.check-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.check-card {
    display: flex;
    min-height: 76px;
    align-items: center;
    gap: 10px;
    border: 1px solid #dde5e1;
    border-radius: 12px;
    background: #fff;
    padding: 11px;
    cursor: pointer;
    transition: .15s;
}
.check-card input { position: absolute; opacity: 0; }
.check-icon { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; border: 1px solid #ccd8d2; border-radius: 9px; color: transparent; font-size: 12px; font-weight: 900; }
.check-card strong, .check-card small { display: block; }
.check-card strong { font-size: 11px; }
.check-card small { color: #8b9692; font-size: 8px; margin-top: 2px; }
.check-card:has(input:checked) { border-color: #86b29d; background: #eff8f3; }
.check-card input:checked + .check-icon { border-color: var(--forest-2); background: var(--forest-2); color: white; }

.toggle-row { display: flex; min-height: 65px; align-items: center; gap: 10px; border: 1px solid #dce5e1; border-radius: 11px; padding: 12px; cursor: pointer; }
.toggle-row input { width: 18px; height: 18px; accent-color: var(--forest-2); }
.toggle-row strong, .toggle-row small { display: block; }
.toggle-row strong { font-size: 11px; }
.toggle-row small { color: #84908b; font-size: 9px; }

.money-input { display: flex; align-items: center; border: 1px solid #d4ded9; border-radius: 10px; overflow: hidden; }
.money-input input { border: 0; }
.money-input span { padding: 0 13px; color: #70817a; font-weight: 800; }

.sticky-actions {
    position: sticky;
    z-index: 10;
    bottom: 15px;
    justify-content: flex-end;
    width: fit-content;
    margin-left: auto;
    border: 1px solid #dce4e0;
    border-radius: 15px;
    background: rgba(255, 255, 255, .92);
    padding: 9px;
    box-shadow: 0 12px 36px rgba(19, 44, 34, .15);
    backdrop-filter: blur(14px);
}

.record-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    padding: 4px 3px;
}
.record-heading h2 { margin: 10px 0 2px; font-size: clamp(27px, 4vw, 38px); line-height: 1; letter-spacing: -.045em; }
.record-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.record-heading .badge + .badge { margin-left: 5px; }
.simple-heading { max-width: 900px; margin-inline: auto; }

.detail-card { overflow: visible; padding-bottom: 10px; }
.detail-row { display: grid; grid-template-columns: minmax(110px, .65fr) minmax(0, 1.35fr); gap: 18px; padding: 12px 22px; border-bottom: 1px solid #edf1ef; }
.detail-row:last-child { border-bottom: 0; }
.detail-row span { color: #78847f; font-size: 10px; }
.detail-row strong { font-size: 12px; font-weight: 700; overflow-wrap: anywhere; text-align: right; }
.document-links, .call-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 22px; }
.document-links a { border-radius: 9px; background: #edf6f1; color: var(--forest); padding: 8px 11px; font-size: 10px; font-weight: 760; text-decoration: none; }
.sale-card { background: linear-gradient(155deg, #fff, #f4faf7); }

.result-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; padding: 20px 22px; }
.result-item { display: grid; min-height: 90px; align-content: center; justify-items: center; border: 1px solid #e1e7e4; border-radius: 12px; background: #fafcfb; text-align: center; }
.result-item > span { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; background: #edf0ef; color: #8b9692; font-size: 10px; }
.result-item strong { margin-top: 5px; font-size: 10px; }
.result-item small { color: #919c98; font-size: 8px; }
.result-item.passed { border-color: #cbe2d5; background: #f1f9f5; }
.result-item.passed > span { background: #d5eddf; color: #296245; }
.condition-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid #edf1ef; border-bottom: 1px solid #edf1ef; }
.condition-strip > span { padding: 15px 22px; border-right: 1px solid #edf1ef; }
.condition-strip > span:last-child { border: 0; }
.condition-strip small, .condition-strip strong { display: block; }
.condition-strip small { color: #8a9591; font-size: 8px; text-transform: uppercase; letter-spacing: .09em; }
.condition-strip strong { margin-top: 2px; font-size: 11px; }
.battery-badge { border-radius: 999px; background: var(--mint); color: var(--forest); padding: 8px 12px; font-size: 10px; font-weight: 850; }
.note-box { margin: 16px 22px; border-left: 3px solid #84ad99; border-radius: 0 9px 9px 0; background: #f5f9f7; color: #56645f; padding: 12px 14px; font-size: 11px; }

.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 20px 22px; }
.gallery a { position: relative; overflow: hidden; display: block; aspect-ratio: 1; border-radius: 11px; background: #eef2f0; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .18s; }
.gallery a:hover img { transform: scale(1.035); }
.gallery a span { position: absolute; inset: auto 0 0; overflow: hidden; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); color: white; padding: 22px 8px 7px; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.sub-gallery { border-top: 1px solid #edf1ef; }
.sub-gallery h3, .gallery-label { margin: 17px 22px 0; font-size: 11px; }
.empty-inline { margin: 0; padding: 22px; color: #89948f; font-size: 11px; }
.existing-files { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 15px; color: #6d7b75; font-size: 10px; }
.existing-files a { color: var(--forest); font-weight: 750; }

.empty-state { display: grid; min-height: 260px; place-items: center; align-content: center; padding: 30px; text-align: center; }
.empty-state > span { display: grid; min-width: 48px; height: 48px; place-items: center; border-radius: 15px; background: #edf5f1; color: var(--forest); font-size: 19px; font-weight: 800; }
.empty-state h2, .empty-state h3 { margin: 13px 0 4px; letter-spacing: -.025em; }
.empty-state p { margin: 0 0 15px; color: var(--muted); font-size: 11px; }
.compact-empty { min-height: 210px; }

.auth-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at 85% 15%, rgba(98, 156, 127, .23), transparent 30%),
        radial-gradient(circle at 10% 95%, rgba(106, 150, 133, .16), transparent 28%),
        #11251e;
}
.auth-main { display: grid; min-height: 100vh; place-items: center; padding: 25px; }
.auth-card { width: min(100%, 440px); border-radius: 24px; background: white; padding: clamp(27px, 6vw, 43px); box-shadow: 0 30px 90px rgba(0, 0, 0, .25); }
.auth-brand { margin-bottom: 36px; }
.auth-brand small { color: #7e8c86; }
.auth-card h1 { margin: 0 0 8px; font-size: 31px; letter-spacing: -.045em; }
.auth-intro { margin: 0 0 25px; color: #718079; font-size: 12px; }
.stack-form { display: grid; gap: 15px; }
.stack-form .button { margin-top: 6px; }
.security-note { margin: 20px 0 0; border-radius: 10px; background: #f1f7f4; color: #688076; padding: 11px 12px; font-size: 9px; text-align: center; }
.customer-query-link { display: block; margin-top: 17px; color: var(--forest); font-size: 11px; font-weight: 760; text-align: center; text-decoration: none; }
.customer-query-link:hover { text-decoration: underline; }
.startup-card { width: min(100%, 540px); }
.startup-code { display: inline-flex; margin-bottom: 12px; border-radius: 999px; background: #f8e8d0; color: #8c5a15; padding: 6px 10px; font-size: 9px; font-weight: 850; letter-spacing: .06em; }
.startup-steps { display: grid; gap: 8px; margin-top: 20px; border-radius: 13px; background: #f4f7f5; padding: 15px; }
.startup-steps p { margin: 0; color: #57645f; font-size: 11px; }
.startup-steps strong { color: var(--forest); }
.startup-steps code { border-radius: 4px; background: #e6ece9; padding: 1px 4px; color: #274f3f; }

.product-cell { display: flex; align-items: center; gap: 10px; }
.product-cell > span:last-child { min-width: 0; }
.product-thumb { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; overflow: hidden; border: 1px solid #dbe4df; border-radius: 11px; background: #edf5f1; color: var(--forest); font-size: 13px; font-weight: 850; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.repair-mini { grid-template-columns: 7px 40px minmax(0, 1fr) auto; }
.repair-mini .product-thumb { width: 38px; height: 38px; flex-basis: 38px; border-radius: 10px; }

.management-grid { display: grid; grid-template-columns: minmax(290px, .7fr) minmax(0, 1.5fr); gap: 17px; }
.user-list { display: grid; }
.user-row { display: grid; grid-template-columns: auto minmax(130px, 1fr) auto minmax(225px, .9fr) minmax(205px, .8fr) auto; align-items: center; gap: 13px; padding: 15px 20px; border-bottom: 1px solid #edf1ef; }
.user-row:last-child { border-bottom: 0; }
.large-avatar { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 12px; background: var(--mint); color: var(--forest); font-size: 13px; font-weight: 850; }
.user-main strong, .user-main small { display: block; }
.user-main strong { font-size: 12px; }
.user-main small { color: #84918c; font-size: 9px; }
.pin-reset { display: flex; gap: 7px; }
.pin-reset input { width: 90px; min-height: 39px; border: 1px solid #d4ded9; border-radius: 10px; padding: 0 10px; font-size: 11px; }
.user-role-form, .user-account-actions { display: flex; align-items: center; gap: 7px; }
.user-role-form select { min-height: 39px; border: 1px solid #d4ded9; border-radius: 10px; background: white; color: var(--ink); padding: 0 30px 0 10px; font-size: 10px; }
.user-account-actions { flex-direction: column; align-items: flex-start; }
.user-account-actions form { margin: 0; }
.dark-text { color: #586660; }

.accounting-stats .stat-card strong { font-size: clamp(18px, 2.2vw, 26px); }
.accounting-layout { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 17px; align-items: start; }
.manual-expense { position: sticky; top: 18px; }
.accounting-filters { padding: 15px; border-bottom: 1px solid #e8eeeb; }
.accounting-filters > input { min-height: 41px; border: 1px solid #d4ded9; border-radius: 10px; padding: 0 10px; color: var(--ink); }
.money-positive { color: #25724d; }
.money-negative { color: #a44646; }

.repair-cost-layout { display: grid; grid-template-columns: minmax(310px, .9fr) minmax(0, 1.35fr); }
.cost-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; align-content: start; padding: 22px; border-right: 1px solid #edf1ef; }
.cost-form .button { grid-column: span 2; }
.cost-list { padding: 8px 18px; }
.cost-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid #edf1ef; }
.cost-row:last-child { border-bottom: 0; }
.cost-row > div strong, .cost-row > div small { display: block; }
.cost-row > div strong { font-size: 11px; }
.cost-row > div small { margin-top: 2px; color: #82908a; font-size: 9px; }
.cost-row > strong { font-size: 12px; }

.timeline { position: relative; display: grid; gap: 0; padding: 20px 24px; }
.timeline::before { position: absolute; top: 27px; bottom: 27px; left: 31px; width: 1px; background: #d9e4df; content: ""; }
.timeline-item { position: relative; z-index: 1; display: grid; grid-template-columns: 15px minmax(0, 1fr); gap: 12px; padding: 0 0 18px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { width: 15px; height: 15px; margin-top: 2px; border: 4px solid #dff1e8; border-radius: 50%; background: var(--forest-2); }
.timeline-item strong, .timeline-item small { display: block; }
.timeline-item strong { font-size: 11px; }
.timeline-item p { margin: 2px 0; color: #61706a; font-size: 10px; }
.timeline-item small { color: #909b97; font-size: 8px; }
.compact-timeline { padding: 18px 4px 3px; }
.compact-timeline::before { left: 11px; }

.operations-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); }
.operations-layout > div:first-child { border-right: 1px solid #edf1ef; }
.return-box { padding: 22px; background: #fafcfb; }
.return-box h3 { margin: 0 0 4px; font-size: 14px; }
.return-box > p { margin: 0 0 16px; color: var(--muted); font-size: 10px; }
.return-history { margin-top: 18px; border-top: 1px solid #dfe7e3; padding-top: 12px; }
.return-history > strong { display: block; margin-bottom: 5px; font-size: 10px; }
.return-history p { margin: 2px 0; color: #76837e; font-size: 9px; }

.tracking-shell { min-height: 100vh; background: radial-gradient(circle at 90% 0%, rgba(105, 169, 138, .26), transparent 34%), #10241d; }
.tracking-main { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.tracking-card { width: min(100%, 740px); border-radius: 26px; background: white; padding: clamp(25px, 5vw, 48px); box-shadow: 0 30px 90px rgba(0, 0, 0, .28); }
.tracking-brand { margin-bottom: 36px; }
.tracking-brand { text-decoration: none; }
.tracking-copy h1 { max-width: 580px; margin: 10px 0; font-size: clamp(31px, 6vw, 48px); line-height: 1.02; letter-spacing: -.05em; }
.tracking-copy > p:not(.eyebrow) { margin: 0; color: #708079; font-size: 12px; }
.tracking-form { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(150px, .6fr) auto; align-items: end; gap: 10px; margin: 27px 0 0; border-radius: 16px; background: #f3f7f5; padding: 14px; }
.tracking-alert { margin-top: 15px; }
.tracking-result { overflow: hidden; margin-top: 18px; border: 1px solid #dce6e1; border-radius: 17px; }
.tracking-result-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 23px; background: linear-gradient(145deg, #fff, #f1f8f4); }
.tracking-result-head h2 { margin: 8px 0 1px; font-size: 23px; letter-spacing: -.04em; }
.tracking-result-head p { margin: 0; color: #78857f; font-size: 10px; }
.tracking-check { display: grid; width: 45px; height: 45px; place-items: center; border-radius: 50%; background: #dff1e8; color: #246246; font-size: 18px; font-weight: 900; }
.tracking-status-copy { margin: 0; padding: 20px 23px; color: #56645e; font-size: 12px; }
.tracking-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; color: #83908b; font-size: 9px; }
.tracking-foot a { color: var(--forest); font-weight: 760; text-decoration: none; }
.secondary-query-link { margin-top: 8px; color: #687a72; }

.showcase-shell { min-height: 100vh; background: #f2f6f4; }
.showcase-header { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid rgba(214, 225, 219, .9); background: rgba(255, 255, 255, .92); padding: 14px max(22px, calc((100vw - 1240px) / 2)); backdrop-filter: blur(16px); }
.showcase-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.showcase-brand strong, .showcase-brand small { display: block; }
.showcase-brand strong { font-size: 14px; }
.showcase-brand small { color: #7b8983; font-size: 9px; }
.showcase-header nav { display: flex; align-items: center; gap: 18px; }
.showcase-header nav a { color: #496057; font-size: 10px; font-weight: 750; text-decoration: none; }
.showcase-header nav a:hover { color: var(--forest); }
.showcase-main { width: min(1240px, calc(100% - 36px)); margin: 0 auto; padding: 38px 0 55px; }
.showcase-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; border-radius: 24px; background: radial-gradient(circle at 90% 20%, rgba(105, 171, 137, .25), transparent 36%), #10281f; color: white; padding: clamp(28px, 5vw, 54px); }
.showcase-hero h1 { max-width: 760px; margin: 9px 0 12px; font-size: clamp(32px, 5.6vw, 62px); line-height: .98; letter-spacing: -.055em; }
.showcase-hero p:not(.eyebrow) { max-width: 680px; margin: 0; color: #b9cbc3; font-size: 12px; }
.showcase-hero > strong { min-width: 130px; color: #bdd0c7; font-size: 10px; text-align: right; }
.showcase-hero > strong span { display: block; color: white; font-size: 36px; line-height: 1; }
.showcase-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0 23px; border: 1px solid #dfe8e3; border-radius: 16px; background: white; padding: 12px; box-shadow: var(--shadow); }
.showcase-filters .search-field { flex: 1 1 360px; }
.showcase-filters select { min-height: 42px; border: 1px solid #dce5e0; border-radius: 10px; background: white; padding: 0 35px 0 12px; color: var(--ink); font-size: 11px; }
.showcase-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.showcase-card { overflow: hidden; border: 1px solid #dce6e1; border-radius: 20px; background: white; box-shadow: 0 14px 38px rgba(22, 50, 40, .07); }
.showcase-carousel { position: relative; display: grid; height: 280px; place-items: center; overflow: hidden; background: linear-gradient(145deg, #e8f2ed, #f7faf8); touch-action: pan-y; }
.showcase-slides { width: 100%; height: 100%; }
.showcase-slide { display: none; width: 100%; height: 100%; border: 0; background: transparent; padding: 0; cursor: zoom-in; }
.showcase-slide.is-active { display: block; }
.showcase-slide img { width: 100%; height: 100%; object-fit: cover; vertical-align: middle; }
.showcase-image-placeholder { display: grid; place-items: center; color: #7ca08f; }
.showcase-image-placeholder span { font-size: 64px; font-weight: 900; }
.showcase-image-placeholder small { color: #82988d; font-size: 9px; }
.showcase-type { position: absolute; inset: 15px auto auto 15px; border: 1px solid rgba(255, 255, 255, .8); border-radius: 999px; background: rgba(255, 255, 255, .9); color: var(--forest); padding: 7px 10px; font-size: 9px; font-weight: 850; backdrop-filter: blur(8px); }
.carousel-arrow { position: absolute; z-index: 3; top: 50%; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(255, 255, 255, .75); border-radius: 50%; background: rgba(16, 36, 29, .58); color: white; padding: 0 0 3px; font-size: 25px; cursor: pointer; transform: translateY(-50%); backdrop-filter: blur(7px); }
.carousel-arrow.previous { left: 10px; }
.carousel-arrow.next { right: 10px; }
.carousel-dots { position: absolute; z-index: 3; right: 0; bottom: 10px; left: 0; display: flex; justify-content: center; gap: 5px; }
.carousel-dots button { width: 7px; height: 7px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .55); padding: 0; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.carousel-dots button.is-active { width: 18px; border-radius: 999px; background: white; }
.showcase-card-body { padding: 20px; }
.showcase-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.showcase-title h2 { margin: 0; font-size: 22px; line-height: 1.05; letter-spacing: -.04em; }
.showcase-title p { margin: 6px 0 0; color: #78857f; font-size: 10px; }
.showcase-title > strong { flex: 0 0 auto; color: var(--forest); font-size: 18px; letter-spacing: -.03em; }
.showcase-product-link { color: inherit; text-decoration: none; }
.showcase-product-link:hover { color: var(--forest); }
.showcase-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; border: 1px solid #e3eae6; border-radius: 12px; background: #f8faf9; }
.showcase-facts span { min-width: 0; padding: 11px; border-right: 1px solid #e3eae6; }
.showcase-facts span:last-child { border: 0; }
.showcase-facts small, .showcase-facts strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.showcase-facts small { color: #8b9691; font-size: 7px; text-transform: uppercase; letter-spacing: .07em; }
.showcase-facts strong { margin-top: 2px; font-size: 9px; }
.showcase-controls { margin-top: 14px; border: 1px solid #e1e9e5; border-radius: 12px; }
.showcase-controls summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; cursor: pointer; list-style: none; }
.showcase-controls summary::-webkit-details-marker { display: none; }
.showcase-controls summary strong, .showcase-controls summary small { display: block; }
.showcase-controls summary strong { font-size: 11px; }
.showcase-controls summary small { color: #83908a; font-size: 8px; }
.showcase-controls summary > span:last-child { color: var(--forest); font-size: 9px; font-weight: 800; }
.showcase-check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; border-top: 1px solid #e6ece9; padding: 13px; }
.showcase-check-grid > span { display: flex; align-items: center; gap: 6px; min-height: 34px; border-radius: 8px; background: #f4f6f5; color: #78847f; padding: 7px; font-size: 8px; }
.showcase-check-grid > span b { display: grid; width: 17px; height: 17px; flex: 0 0 17px; place-items: center; border-radius: 50%; background: #e7ebe9; font-size: 8px; }
.showcase-check-grid > span.passed { background: #eef8f3; color: #315f49; }
.showcase-check-grid > span.passed b { background: #d5eddf; color: #246044; }
.showcase-legend { margin: 0; border-top: 1px solid #e6ece9; color: #87928d; padding: 9px 13px 11px; font-size: 8px; }
.showcase-note { margin-top: 14px; border-left: 3px solid #78a68f; border-radius: 0 10px 10px 0; background: #f4f8f6; padding: 11px 13px; }
.showcase-note small { color: #7d8984; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.showcase-note p { margin: 4px 0 0; color: #51625a; font-size: 10px; }
.showcase-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.showcase-empty { display: grid; min-height: 330px; place-items: center; align-content: center; border: 1px dashed #cedbd5; border-radius: 20px; background: white; padding: 30px; text-align: center; }
.showcase-empty > span { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 15px; background: #e9f4ee; color: var(--forest); font-size: 22px; }
.showcase-empty h2 { margin: 15px 0 4px; }
.showcase-empty p { margin: 0; color: #7c8983; font-size: 11px; }
.showcase-footer { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid #dce6e1; background: white; color: #738079; padding: 22px max(22px, calc((100vw - 1240px) / 2)); font-size: 9px; }
.showcase-footer a { color: var(--forest); font-weight: 800; text-decoration: none; }
.lightbox-open { overflow: hidden; }
.image-lightbox { position: fixed; z-index: 100; inset: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 15px; background: rgba(4, 12, 9, .94); padding: 52px max(14px, 4vw) 24px; }
.image-lightbox[hidden] { display: none; }
.image-lightbox figure { display: grid; min-width: 0; max-width: min(1100px, 100%); max-height: 100%; justify-self: center; margin: 0; }
.image-lightbox img { max-width: 100%; max-height: calc(100vh - 105px); border-radius: 10px; object-fit: contain; box-shadow: 0 20px 70px rgba(0, 0, 0, .5); }
.image-lightbox figcaption { color: #c5d1cc; padding-top: 9px; font-size: 10px; text-align: center; }
.lightbox-close { position: absolute; z-index: 2; top: 13px; right: 16px; display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(255, 255, 255, .24); border-radius: 50%; background: rgba(255, 255, 255, .08); color: white; font-size: 25px; cursor: pointer; }
.lightbox-arrow { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%; background: rgba(255, 255, 255, .08); color: white; padding: 0 0 4px; font-size: 32px; cursor: pointer; }

.public-product-main { width: min(1180px, calc(100% - 36px)); min-height: calc(100vh - 150px); margin: 0 auto; padding: 24px 0 55px; }
.product-breadcrumb { display: flex; align-items: center; gap: 8px; overflow: hidden; color: #7a8882; padding: 5px 2px 18px; font-size: 10px; white-space: nowrap; }
.product-breadcrumb a { color: var(--forest); font-weight: 800; text-decoration: none; }
.product-breadcrumb strong { overflow: hidden; color: #53615b; text-overflow: ellipsis; }
.public-product-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(330px, .7fr); gap: 18px; }
.public-product-media, .public-product-summary, .public-product-details { overflow: hidden; border: 1px solid #dce6e1; border-radius: 20px; background: white; box-shadow: 0 14px 38px rgba(22, 50, 40, .07); }
.product-carousel { height: min(58vw, 610px); min-height: 430px; }
.product-carousel .showcase-slide img { object-fit: contain; background: #eef4f1; }
.public-product-summary { align-self: start; padding: clamp(24px, 4vw, 38px); }
.public-product-summary h1 { margin: 10px 0 5px; font-size: clamp(30px, 4vw, 45px); line-height: 1; letter-spacing: -.05em; }
.product-subtitle { margin: 0; color: #76847e; font-size: 12px; }
.public-product-price { display: block; margin-top: 24px; color: var(--forest); font-size: clamp(26px, 4vw, 38px); letter-spacing: -.04em; }
.public-product-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.product-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 24px; }
.product-facts span:nth-child(2) { border-right: 0; }
.product-facts span:nth-child(-n+2) { border-bottom: 1px solid #e3eae6; }
.public-product-details { grid-column: span 2; padding: 5px 22px 22px; }
.public-product-details .panel-head { padding-inline: 0; }
.product-check-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid #e6ece9; border-radius: 14px; }
.public-product-empty { margin-top: 30px; }

.share-qr-panel { display: grid; max-width: 720px; justify-items: center; gap: 20px; margin: 0 auto; padding: clamp(24px, 5vw, 42px); text-align: center; }
.share-qr-copy h2 { margin: 8px 0 6px; font-size: 28px; }
.share-qr-copy p:last-child { max-width: 550px; margin: 0; color: var(--muted); font-size: 11px; }
.qr-output { display: grid; width: min(350px, 100%); aspect-ratio: 1; place-items: center; border: 1px solid #d9e5df; border-radius: 20px; background: white; padding: 18px; box-shadow: 0 14px 40px rgba(19, 51, 39, .1); }
.qr-output svg { display: block; width: 100%; height: 100%; }
.qr-output > span { color: var(--muted); font-size: 11px; }
.share-link-field { width: 100%; text-align: left; }
.share-link-field input { font-size: 10px; }
.share-qr-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

.barcode-scanner { width: min(94vw, 610px); border: 0; border-radius: 20px; background: white; color: var(--ink); padding: 18px; box-shadow: 0 30px 90px rgba(0, 0, 0, .35); }
.barcode-scanner::backdrop { background: rgba(4, 14, 10, .78); backdrop-filter: blur(4px); }
.scanner-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 3px 3px 14px; }
.scanner-head h2 { margin: 5px 0 0; font-size: 21px; }
.scanner-head > button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #d6e0db; border-radius: 50%; background: #f3f6f4; color: #51615a; padding: 0 0 3px; font-size: 23px; cursor: pointer; }
.scanner-stage { position: relative; overflow: hidden; min-height: 310px; border-radius: 15px; background: #0b1511; }
.scanner-stage video { display: block; width: 100%; height: min(56vh, 420px); object-fit: cover; }
.scanner-frame { position: absolute; inset: 50% auto auto 50%; width: min(82%, 430px); height: 100px; border: 2px solid rgba(113, 234, 170, .9); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .28); transform: translate(-50%, -50%); }
.scanner-status { min-height: 34px; margin: 12px 2px 0; color: #62716a; font-size: 11px; text-align: center; }
.scanner-status[data-state="success"] { color: #167344; font-weight: 800; }
.scanner-status[data-state="warning"] { color: #98661e; }
.scanner-status[data-state="danger"] { color: #a33a3a; }
.scanner-actions { display: flex; justify-content: center; padding-top: 2px; }

.print-document { background: #e9eeeb; color: #171d1a; }
.print-toolbar { position: sticky; z-index: 5; top: 0; display: flex; justify-content: center; gap: 8px; padding: 12px; background: rgba(18, 33, 28, .92); backdrop-filter: blur(12px); }
.a4-sheet { width: 210mm; min-height: 297mm; margin: 20px auto; background: white; padding: 15mm 16mm; box-shadow: 0 20px 55px rgba(0, 0, 0, .16); }
.print-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8mm; border-bottom: 2px solid #173f32; }
.print-head > div { display: flex; align-items: center; gap: 10px; }
.print-head > div:last-child { display: block; text-align: right; }
.print-head strong, .print-head small { display: block; }
.print-head small { color: #68756f; font-size: 9px; }
.a4-sheet > h1 { margin: 8mm 0 6mm; font-size: 20px; text-align: center; text-transform: uppercase; letter-spacing: .02em; }
.print-section { margin-top: 5mm; }
.print-section h2 { margin: 0 0 3mm; border-bottom: 1px solid #cfd9d4; padding-bottom: 2mm; color: #173f32; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.print-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2mm 8mm; }
.print-grid p { margin: 0; border-bottom: 1px dotted #ccd5d0; padding: 2mm 0; }
.print-grid p.wide { grid-column: span 2; }
.print-grid span, .print-grid strong { display: block; }
.print-grid span { color: #6e7974; font-size: 8px; text-transform: uppercase; }
.print-grid strong { margin-top: 1mm; font-size: 10px; }
.identity-print > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5mm; }
.identity-print figure { margin: 0; }
.identity-print img { width: 100%; height: 44mm; border: 1px solid #cbd5d0; border-radius: 3mm; object-fit: contain; }
.identity-print figcaption { margin-top: 1mm; color: #6f7b75; font-size: 8px; text-align: center; }
.print-declaration { margin: 6mm 0; border: 1px solid #cdd8d2; background: #f7f9f8; padding: 4mm; font-size: 9px; line-height: 1.55; }
.signature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15mm; margin-top: 8mm; }
.signature-grid > div { min-height: 30mm; border-top: 1px solid #6b7771; padding-top: 2mm; text-align: center; }
.signature-grid span, .signature-grid strong, .signature-grid i { display: block; }
.signature-grid span { color: #6f7b75; font-size: 8px; text-transform: uppercase; }
.signature-grid strong { margin-top: 2mm; font-size: 10px; }
.signature-grid i { margin-top: 12mm; color: #89938f; font-size: 8px; font-style: normal; }

.mobile-menu, .menu-backdrop { display: none; }

@media (max-width: 1180px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .check-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .result-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .app-shell { padding-left: 0; }
    .sidebar { transform: translateX(-101%); transition: transform .22s ease; box-shadow: 15px 0 45px rgba(0, 0, 0, .2); }
    .sidebar.is-open { transform: translateX(0); }
    .mobile-menu {
        position: fixed;
        top: 18px;
        left: 17px;
        z-index: 32;
        display: grid;
        width: 42px;
        height: 42px;
        place-items: center;
        border: 1px solid #d9e2de;
        border-radius: 11px;
        background: white;
        color: var(--forest);
        box-shadow: var(--shadow);
        font-size: 19px;
    }
    .menu-backdrop { position: fixed; inset: 0; z-index: 35; background: rgba(9, 25, 19, .5); }
    .menu-backdrop.is-open { display: block; }
    .topbar { min-height: 79px; padding: 14px 17px 14px 73px; }
    .topbar .eyebrow { display: none; }
    .topbar h1 { font-size: 23px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-grid .span-2 { grid-column: auto; }
    .hero-panel { min-height: 250px; align-items: flex-start; flex-direction: column; }
    .management-grid, .accounting-layout { grid-template-columns: 1fr; }
    .manual-expense { position: static; }
    .user-row { grid-template-columns: auto minmax(0, 1fr) auto; }
    .user-row .user-role-form, .user-row .pin-reset, .user-row .user-account-actions { grid-column: 2 / -1; }
    .repair-cost-layout, .operations-layout { grid-template-columns: 1fr; }
    .cost-form, .operations-layout > div:first-child { border-right: 0; border-bottom: 1px solid #edf1ef; }
    .showcase-grid { grid-template-columns: 1fr; }
    .showcase-carousel { height: min(52vw, 360px); }
    .public-product-layout { grid-template-columns: 1fr; }
    .public-product-details { grid-column: auto; }
    .product-carousel { height: min(78vw, 560px); min-height: 360px; }
    .product-check-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .content { padding: 17px 12px 50px; }
    .top-actions .secondary { display: none; }
    .hero-panel { border-radius: 18px; padding: 25px 20px; }
    .hero-panel h2 { font-size: 31px; }
    .stat-grid { gap: 9px; margin-top: 10px; }
    .stat-card { min-height: 105px; padding: 14px; }
    .stat-icon { width: 37px; height: 37px; flex-basis: 37px; }
    .stat-card strong { font-size: 24px; }
    .panel { border-radius: 14px; }
    .panel-head { padding: 16px; }
    .form-section { padding: 20px 16px; }
    .section-heading { display: block; margin-bottom: 20px; }
    .section-heading > p { margin: 8px 0 0 44px; text-align: left; }
    .form-grid, .detail-grid { grid-template-columns: 1fr; }
    .span-2, .detail-grid .span-2 { grid-column: auto; }
    .upload-grid, .identity-fields .upload-grid { grid-template-columns: 1fr; }
    .upload-card { min-height: 95px; }
    .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .result-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 16px; }
    .condition-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .condition-strip > span:nth-child(2) { border-right: 0; }
    .condition-strip > span:nth-child(-n+2) { border-bottom: 1px solid #edf1ef; }
    .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 16px; }
    .record-heading { align-items: flex-start; flex-direction: column; padding: 3px 5px; }
    .record-actions { width: 100%; }
    .record-actions .button, .record-actions form { flex: 1; }
    .record-actions form .button { width: 100%; }
    .filters { align-items: stretch; }
    .filters .search-field, .filters select { width: 100%; }
    .filters .button { flex: 1; }
    .sticky-actions { bottom: 8px; width: calc(100% - 8px); margin: 0 4px; }
    .sticky-actions .button { flex: 1; }

    .responsive-table { overflow: visible; }
    table, thead, tbody, th, td, tr { display: block; }
    thead { display: none; }
    tbody { display: grid; gap: 10px; padding: 11px; }
    tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; border: 1px solid #e1e8e5; border-radius: 12px; padding: 13px; }
    td { display: block; border: 0; padding: 0; }
    td:first-child { grid-column: span 2; padding-bottom: 8px; border-bottom: 1px solid #edf1ef; }
    td::before { display: block; color: #929c98; content: attr(data-label); font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
    td:first-child::before, td:last-child::before { display: none; }
    td:last-child { display: flex; grid-column: span 2; justify-content: flex-end; padding-top: 3px; }
    .row-actions { width: 100%; }
    .row-actions > * { flex: 1; }
    .row-link, .row-share-link, .row-delete-link { display: grid; width: 100%; min-height: 36px; place-items: center; border-radius: 9px; background: #edf6f1; }
    .row-share-link { background: #e6f8ed; }
    .row-delete-link { background: #fff0f0; }
    .tracking-form { grid-template-columns: 1fr; }
    .tracking-result .condition-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cost-form { grid-template-columns: 1fr; }
    .cost-form .span-2, .cost-form .button { grid-column: auto; }
    .user-row { grid-template-columns: auto minmax(0, 1fr); }
    .user-row > .badge { justify-self: start; }
    .user-row .pin-reset { grid-column: 1 / -1; }
    .user-row .user-role-form, .user-row .user-account-actions { grid-column: 1 / -1; }
    .accounting-filters > input { width: 100%; }
    .showcase-header { padding: 12px 14px; }
    .showcase-header nav a:first-child { display: none; }
    .showcase-main { width: min(100% - 22px, 1240px); padding-top: 12px; }
    .showcase-hero { align-items: flex-start; flex-direction: column; border-radius: 18px; padding: 27px 21px; }
    .showcase-hero > strong { text-align: left; }
    .showcase-filters { align-items: stretch; }
    .showcase-filters .search-field, .showcase-filters select { width: 100%; }
    .showcase-filters .button { flex: 1; }
    .showcase-card { border-radius: 16px; }
    .showcase-card-body { padding: 16px; }
    .showcase-title { align-items: flex-start; flex-direction: column; gap: 10px; }
    .showcase-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .showcase-facts span:nth-child(2) { border-right: 0; }
    .showcase-facts span:nth-child(-n+2) { border-bottom: 1px solid #e3eae6; }
    .showcase-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .showcase-card-actions .button { flex: 1; }
    .public-product-main { width: min(100% - 22px, 1180px); padding-top: 10px; }
    .product-carousel { min-height: 310px; }
    .public-product-media, .public-product-summary, .public-product-details { border-radius: 16px; }
    .public-product-actions .button, .share-qr-actions .button { flex: 1 1 150px; }
    .product-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .barcode-scanner { width: calc(100% - 18px); margin: auto; padding: 12px; }
    .scanner-stage { min-height: 250px; }
}

@media (max-width: 430px) {
    .top-actions .button { padding-inline: 11px; }
    .hero-actions { width: 100%; }
    .hero-actions .button { flex: 1; padding-inline: 10px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .stat-card { align-items: flex-start; flex-direction: column; gap: 8px; }
    .stat-card span:not(.stat-icon) { display: none; }
    .segmented span { padding: 4px 7px; text-align: center; }
    .check-grid { grid-template-columns: 1fr; }
    .check-card { min-height: 67px; }
    .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-row { grid-template-columns: 1fr; gap: 3px; }
    .detail-row strong { text-align: left; }
    .quick-record-note { align-items: flex-start; flex-direction: column; }
    .showcase-carousel { height: 250px; }
    .showcase-check-grid { grid-template-columns: 1fr; }
    .showcase-footer { align-items: flex-start; flex-direction: column; }
    .image-lightbox { grid-template-columns: 1fr; padding: 55px 12px 20px; }
    .image-lightbox figure { grid-column: 1; grid-row: 1; }
    .lightbox-arrow { position: absolute; z-index: 2; top: 50%; width: 40px; height: 40px; transform: translateY(-50%); }
    .lightbox-arrow.previous { left: 10px; }
    .lightbox-arrow.next { right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media print {
    @page { size: A4; margin: 0; }
    body.print-document { background: white; }
    .print-toolbar { display: none !important; }
    .a4-sheet { width: 210mm; min-height: 297mm; margin: 0; padding: 12mm 15mm; box-shadow: none; break-after: page; }
    .identity-print img { height: 41mm; }
    body.qr-print-page { padding: 0; background: white; }
    body.qr-print-page .sidebar, body.qr-print-page .mobile-menu, body.qr-print-page .menu-backdrop, body.qr-print-page .topbar, body.qr-print-page .share-qr-copy, body.qr-print-page .share-link-field, body.qr-print-page .share-qr-actions { display: none !important; }
    body.qr-print-page.app-shell { padding-left: 0; }
    body.qr-print-page .content { padding: 0; }
    body.qr-print-page .share-qr-panel { border: 0; box-shadow: none; }
    body.qr-print-page .qr-output { width: 120mm; border: 0; box-shadow: none; }
}
