/* BT Yönetimi screens: inventory list, asset card, settings and dashboard widgets.
   Colours come only from dex-theme.css variables. */

.dx-form-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.dx-status--info { background: color-mix(in srgb, var(--dx-info) 14%, var(--dx-surface)); color: var(--dx-info); }
.dx-mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .95em; letter-spacing: -.01em; }
.dx-num { text-align: right; font-variant-numeric: tabular-nums; }
.dx-block { display: block; }

/* Type icon tile (list rows, summary card, dashboard). */
.dx-asset-icon {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--dx-accent-soft);
    color: var(--dx-accent-text);
}
.dx-asset-icon .dx-ico { width: 18px; height: 18px; }
.dx-asset-icon--sm { width: 28px; height: 28px; border-radius: 8px; }
.dx-asset-icon--sm .dx-ico { width: 15px; height: 15px; }
.dx-asset-icon--xl {
    width: 76px;
    height: 76px;
    border-radius: 22px;
    background: var(--dx-accent-gradient, var(--dx-accent));
    color: var(--dx-on-accent);
    box-shadow: 0 14px 30px -14px var(--dx-accent);
}
.dx-asset-icon--xl .dx-ico { width: 34px; height: 34px; }

/* Warranty: date with a warning tone inside the window, danger when expired. */
.dx-warranty { display: inline-flex; flex-direction: column; line-height: 1.3; font-variant-numeric: tabular-nums; }
.dx-warranty small { font-size: var(--dx-text-xs); font-weight: 600; }
.dx-warranty.is-soon, .dx-warranty.is-soon small { color: var(--dx-warning); }
.dx-warranty.is-expired, .dx-warranty.is-expired small { color: var(--dx-danger); }
dd.dx-warranty { display: block; }
.dx-input.is-soon { border-color: color-mix(in srgb, var(--dx-warning) 60%, var(--dx-line)); }
.dx-input.is-expired { border-color: color-mix(in srgb, var(--dx-danger) 60%, var(--dx-line)); }

/* Filter chip set from the address (e.g. ?garanti=1). */
.dx-chip-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 10px 0 12px;
    border: 1px solid color-mix(in srgb, var(--dx-warning) 45%, var(--dx-line));
    border-radius: 999px;
    background: color-mix(in srgb, var(--dx-warning) 10%, var(--dx-surface));
    color: var(--dx-text);
    font: inherit;
    font-size: var(--dx-text-sm);
    font-weight: 600;
    cursor: pointer;
}
.dx-chip-filter .dx-ico { width: 15px; height: 15px; }
.dx-chip-filter .dx-ico:last-child { color: var(--dx-muted); }

.dx-assets td:first-child { min-width: 210px; }
.dx-assets .dx-person__text small,
.dx-grid--compact .dx-person__text strong { white-space: nowrap; }

/* Assignment history inside the card. */
.dx-grid--compact td { padding-top: 9px; padding-bottom: 9px; }
.dx-grid--compact tr.is-open td { background: color-mix(in srgb, var(--dx-success) 6%, transparent); }
.dx-grid__wrap { white-space: normal; min-width: 180px; }
.dx-grid__wrap small { color: var(--dx-muted); margin-top: 2px; }

/* Assign / return dialogs. */
.dx-dialog--form .dx-form-field { margin-top: 10px; }
.dx-dialog__lead { margin: 2px 0 4px; color: var(--dx-muted); font-size: var(--dx-text-sm); }
.dx-dialog__lead strong { color: var(--dx-text); }
.dx-segmented--fill { display: flex; width: 100%; }
.dx-segmented--fill button { flex: 1; justify-content: center; }

/* Ayarlar: the uyarlama steps as sections. */
.dx-settings { display: grid; align-content: start; gap: 14px; padding: 2px 0 20px; }
.dx-settings__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.dx-settings__section.is-wide { grid-column: 1 / -1; }
.dx-settings__lead { margin: 0 0 12px; color: var(--dx-muted); font-size: var(--dx-text-sm); }
.dx-settings .dx-wizard__preview { margin-top: 12px; }
.dx-settings__note { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--dx-surface-2); color: var(--dx-muted); font-size: var(--dx-text-sm); }
.dx-settings__note .dx-ico { flex: none; width: 17px; height: 17px; margin-top: 1px; color: var(--dx-accent-text); }
.dx-settings__note a { color: var(--dx-accent-text); font-weight: 600; }

/* Dashboard: assets by type; the light bar is the type's share, the strong part is in use. */
.dx-typebars { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.dx-typebars a {
    display: grid;
    grid-template-columns: auto 86px minmax(0, 1fr) 104px;
    align-items: center;
    gap: 10px;
    padding: 5px 6px;
    border-radius: 9px;
    color: inherit;
    text-decoration: none;
}
.dx-typebars a:hover { background: var(--dx-surface-2); }
.dx-typebars__name { font-size: var(--dx-text-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-typebars__count { display: flex; justify-content: flex-end; align-items: baseline; gap: 5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dx-typebars__count small { color: var(--dx-muted); font-size: var(--dx-text-xs); }
.dx-typebars__bar { display: block; height: 8px; border-radius: 999px; background: var(--dx-surface-2); overflow: hidden; }
.dx-typebars__bar > span { display: block; height: 100%; border-radius: inherit; background: color-mix(in srgb, var(--dx-accent) 26%, var(--dx-surface-2)); }
.dx-typebars__bar i { display: block; height: 100%; border-radius: inherit; background: var(--dx-accent); }

.dx-widget__body--flush .dx-mini-table td { padding: 8px 16px; }
.dx-widget__body--flush .dx-mini-table td + td { padding-left: 0; }
.dx-mini-table--links a { color: inherit; text-decoration: none; }
.dx-mini-table--links a:hover strong { color: var(--dx-accent-text); }
.dx-mini-table--links td { vertical-align: middle; }

/* Dashboard: latest assignment movements. */
.dx-moves { margin: 0; padding: 4px 0; list-style: none; }
.dx-moves li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--dx-line); }
.dx-moves li:last-child { border-bottom: 0; }
.dx-moves__icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: color-mix(in srgb, var(--dx-success) 14%, var(--dx-surface)); color: var(--dx-success); }
.dx-moves__icon.is-return { background: var(--dx-surface-2); color: var(--dx-muted); }
.dx-moves__icon .dx-ico { width: 16px; height: 16px; }
.dx-moves a { color: inherit; text-decoration: none; }
.dx-moves a small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-moves time { color: var(--dx-muted); font-size: var(--dx-text-xs); font-variant-numeric: tabular-nums; }

@container records (max-width: 900px) {
    .dx-form-grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@container records (max-width: 760px) {
    .dx-form-grid--4,
    .dx-settings__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container records (max-width: 640px) {
    .dx-form-grid--4,
    .dx-settings__grid { grid-template-columns: 1fr; }

    /* Phone: an asset is a compact card — name, then holder, warranty and status on one line. */
    .dx-assets td[data-label="Seri no"],
    .dx-assets td[data-label="Lokasyon"],
    .dx-assets td[data-label="Marka / model"] { display: none; }
    .dx-assets td[data-label="Zimmet"],
    .dx-assets td[data-label="Garanti"],
    .dx-assets td[data-label="Durum"] { display: inline-flex; margin: 8px 12px 0 0; vertical-align: middle; }
    .dx-assets td[data-label="Zimmet"]:has(> .dx-grid__muted),
    .dx-assets td[data-label="Garanti"]:has(> .dx-grid__muted) { display: none; }
    .dx-assets .dx-warranty { flex-direction: row; gap: 6px; }
    .dx-formbar__button span { white-space: nowrap; }
}

/* Dashboard: the uyarlama was never saved (installed before the wizard). */
.dx-setup-callout {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--dx-warning) 40%, var(--dx-line));
    border-radius: 16px;
    background: color-mix(in srgb, var(--dx-warning) 8%, var(--dx-surface));
}
.dx-setup-callout__icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 11px; background: color-mix(in srgb, var(--dx-warning) 18%, var(--dx-surface)); color: var(--dx-warning); }
.dx-setup-callout__icon .dx-ico { width: 19px; height: 19px; }
.dx-setup-callout__text { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.dx-setup-callout__text small { color: var(--dx-muted); font-size: var(--dx-text-sm); }
.dx-setup-callout .dx-button { flex: none; }
@media (max-width: 640px) {
    .dx-setup-callout { flex-wrap: wrap; }
    .dx-setup-callout .dx-button { width: 100%; justify-content: center; }
}

/* Ayarlar: locations and departments side by side. */
.dx-settings .dx-wizard__field.is-wide:has(.dx-chipinput) { grid-column: auto; }
@container records (max-width: 760px) {
    .dx-settings .dx-wizard__field.is-wide:has(.dx-chipinput) { grid-column: 1 / -1; }
}
