.dsmt-app,
.dsmt-admin-wrap {
    --dsmt-navy: #10233f;
    --dsmt-navy-2: #183a64;
    --dsmt-gold: #c99a36;
    --dsmt-green: #16775a;
    --dsmt-red: #b42318;
    --dsmt-border: #d8dee8;
    --dsmt-muted: #667085;
    --dsmt-bg: #f7f9fc;
    color: #182230;
    font-family: Vazirmatn, Tahoma, Arial, sans-serif;
    box-sizing: border-box;
}

.dsmt-app *,
.dsmt-admin-wrap * { box-sizing: border-box; }

.dsmt-brand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 18px 0 22px;
    padding: 18px 22px;
    border: 1px solid #dce3ec;
    border-right: 5px solid var(--dsmt-gold);
    border-radius: 14px;
    background: linear-gradient(135deg, #fff 0%, #f7f9fc 100%);
    box-shadow: 0 8px 24px rgba(16, 35, 63, .07);
}

.dsmt-brand-main,
.dsmt-brand-title-row,
.dsmt-developer,
.dsmt-detail-title,
.dsmt-section-heading,
.dsmt-media-heading,
.dsmt-action-row { display: flex; align-items: center; gap: 14px; }

.dsmt-brand-logo-image { display: block; width: auto; max-width: 112px; max-height: 66px; object-fit: contain; }
.dsmt-brand-logo-fallback { display: grid; place-items: center; min-width: 90px; min-height: 56px; border-radius: 10px; background: var(--dsmt-navy); color: #fff; font-weight: 800; }
.dsmt-brand-title-row h1 { margin: 0; color: var(--dsmt-navy); font-size: 24px; line-height: 1.45; }
.dsmt-brand-header p { margin: 5px 0 0; color: var(--dsmt-muted); }
.dsmt-version { padding: 4px 9px; border-radius: 20px; background: #fff5d7; color: #815d0a; font-size: 12px; white-space: nowrap; }
.dsmt-developer { flex-direction: column; align-items: flex-start; gap: 4px; white-space: nowrap; }
.dsmt-developer a { color: var(--dsmt-navy-2); text-decoration: none; font-weight: 700; }

.dsmt-panel,
.dsmt-login-card {
    width: 100%;
    margin: 20px 0;
    padding: 24px;
    border: 1px solid var(--dsmt-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(16, 35, 63, .05);
}

.dsmt-login-card { text-align: center; padding: 44px 24px; }
.dsmt-login-card h2 { margin: 0 0 12px; color: var(--dsmt-navy); }
.dsmt-login-card p { margin: 0 auto 22px; max-width: 660px; color: var(--dsmt-muted); }
.dsmt-section-heading { justify-content: space-between; margin-bottom: 20px; }
.dsmt-section-heading h2,
.dsmt-detail-title h2,
.dsmt-panel h2,
.dsmt-panel h3 { margin: 0; color: var(--dsmt-navy); }
.dsmt-section-heading p,
.dsmt-detail-title p { margin: 4px 0 0; color: var(--dsmt-muted); }

.dsmt-form { width: 100%; }
.dsmt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dsmt-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.dsmt-field-full { grid-column: 1 / -1; width: 100%; }
.dsmt-field > span,
.dsmt-label { color: #344054; font-weight: 650; }
.dsmt-field em,
.dsmt-label em,
.dsmt-upload-box em { color: #d92d20; font-style: normal; font-size: 12px; }
.dsmt-field input,
.dsmt-field select,
.dsmt-field textarea,
.dsmt-filter-form input,
.dsmt-filter-form select {
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 9px 12px;
    border: 1px solid #b8c2d0;
    border-radius: 8px;
    background: #fff;
    color: #182230;
    font: inherit;
    box-shadow: none;
}
.dsmt-field textarea { min-height: 90px; resize: vertical; }
.dsmt-field input:focus,
.dsmt-field select:focus,
.dsmt-field textarea:focus { border-color: var(--dsmt-navy-2); outline: 2px solid rgba(24, 58, 100, .12); }
.dsmt-choice-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 18px; }
.dsmt-choice-row label,
.dsmt-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.dsmt-choice-row label { padding: 12px 16px; border: 1px solid var(--dsmt-border); border-radius: 9px; background: var(--dsmt-bg); }
.dsmt-choice-row input,
.dsmt-check input { width: 18px; height: 18px; margin: 0; }

.dsmt-onsite-box,
.dsmt-optional,
.dsmt-upload-box,
.dsmt-phone-response-box,
.dsmt-manager-message,
.dsmt-text-block {
    margin: 20px 0;
    padding: 18px;
    border: 1px solid var(--dsmt-border);
    border-radius: 10px;
    background: var(--dsmt-bg);
}
.dsmt-onsite-box p,
.dsmt-upload-box p { color: var(--dsmt-muted); }
.dsmt-area-field { max-width: 520px; margin-top: 12px; }
.dsmt-optional summary { color: var(--dsmt-navy); cursor: pointer; font-weight: 700; }
.dsmt-optional[open] summary { margin-bottom: 18px; }
.dsmt-upload-box { border-style: dashed; background: #fbfcfe; }
.dsmt-upload-box input[type="file"] { display: block; width: 100%; margin: 14px 0; padding: 16px; border: 1px dashed #98a2b3; border-radius: 8px; background: #fff; }
.dsmt-upload-box small { display: block; color: var(--dsmt-muted); }
.dsmt-image-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin: 14px 0; }
.dsmt-preview-item { position: relative; overflow: hidden; border: 1px solid var(--dsmt-border); border-radius: 8px; background: #fff; }
.dsmt-preview-item img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.dsmt-preview-item span { display: block; overflow: hidden; padding: 6px; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.dsmt-preview-item button { position: absolute; top: 5px; left: 5px; padding: 3px 7px; border: 0; border-radius: 5px; background: rgba(180, 35, 24, .92); color: #fff; cursor: pointer; }
.dsmt-consent { margin: 18px 0; align-items: flex-start; }

.dsmt-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none !important;
    cursor: pointer;
    transition: .15s ease;
}
.dsmt-button:hover { transform: translateY(-1px); }
.dsmt-button:disabled { opacity: .55; cursor: wait; transform: none; }
.dsmt-button-primary { background: var(--dsmt-navy); color: #fff !important; }
.dsmt-button-secondary { border-color: #98a2b3; background: #fff; color: #344054 !important; }
.dsmt-button-gold { background: var(--dsmt-gold); color: #16120a !important; }
.dsmt-button-danger { background: var(--dsmt-red); color: #fff !important; }
.dsmt-button-danger-outline { border-color: var(--dsmt-red); background: #fff; color: var(--dsmt-red) !important; }
.dsmt-link { color: #175cd3; font-weight: 700; text-decoration: none; }
.dsmt-back-link { display: inline-block; margin-bottom: 8px; color: #475467; text-decoration: none; }

.dsmt-ajax-message { margin: 12px 0; padding: 0; }
.dsmt-ajax-message.is-info,
.dsmt-ajax-message.is-success,
.dsmt-ajax-message.is-error { padding: 11px 14px; border-radius: 8px; }
.dsmt-ajax-message.is-info { background: #eef4ff; color: #1849a9; }
.dsmt-ajax-message.is-success { background: #ecfdf3; color: #067647; }
.dsmt-ajax-message.is-error { background: #fef3f2; color: #b42318; }
.dsmt-notice { margin: 14px 0; padding: 12px 15px; border-right: 4px solid #667085; border-radius: 7px; background: #f2f4f7; }
.dsmt-notice-success { border-color: #079455; background: #ecfdf3; }
.dsmt-notice-error { border-color: #d92d20; background: #fef3f2; }
.dsmt-notice-warning { border-color: #dc6803; background: #fffaeb; }
.dsmt-notice-info { border-color: #1570ef; background: #eff8ff; }

.dsmt-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dsmt-table { width: 100%; min-width: 880px; border-collapse: collapse; background: #fff; }
.dsmt-table th,
.dsmt-table td { padding: 12px 10px; border-bottom: 1px solid #e4e7ec; text-align: right; vertical-align: middle; white-space: nowrap; }
.dsmt-table th { background: #f8fafc; color: #344054; font-weight: 750; }
.dsmt-table tbody tr:hover { background: #fbfcfe; }
.dsmt-filter-form { display: grid; grid-template-columns: repeat(3, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.dsmt-filter-date { display: flex; align-items: center; gap: 8px; color: var(--dsmt-muted); white-space: nowrap; }
.dsmt-filter-date input { min-width: 0; }
.dsmt-pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.dsmt-pagination a,
.dsmt-pagination .current { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid var(--dsmt-border); border-radius: 7px; color: var(--dsmt-navy); text-decoration: none; }
.dsmt-pagination .current { background: var(--dsmt-navy); color: #fff; }

.dsmt-status { display: inline-flex; padding: 4px 9px; border-radius: 20px; background: #f2f4f7; color: #344054; font-size: 12px; font-weight: 700; }
.dsmt-status-new { background: #fff4ed; color: #b93815; }
.dsmt-status-reviewing,
.dsmt-status-needs_info { background: #eff8ff; color: #175cd3; }
.dsmt-status-offer_sent,
.dsmt-status-final_offer { background: #fffaeb; color: #b54708; }
.dsmt-status-accepted,
.dsmt-status-approved,
.dsmt-status-completed { background: #ecfdf3; color: #067647; }
.dsmt-status-rejected_customer,
.dsmt-status-rejected_store,
.dsmt-status-cancelled { background: #fef3f2; color: #b42318; }

.dsmt-detail-title { justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.dsmt-data-grid,
.dsmt-offer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.dsmt-data-grid > div,
.dsmt-offer-grid > div { min-width: 0; padding: 13px; border: 1px solid #e4e7ec; border-radius: 8px; background: #fafbfc; }
.dsmt-data-grid span,
.dsmt-offer-grid span { display: block; margin-bottom: 6px; color: var(--dsmt-muted); font-size: 12px; }
.dsmt-data-grid strong,
.dsmt-offer-grid strong { display: block; overflow-wrap: anywhere; }
.dsmt-data-grid-wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dsmt-manager-message { border-right: 4px solid var(--dsmt-gold); background: #fffcf3; }
.dsmt-manager-message p,
.dsmt-text-block p { margin: 8px 0 0; }
.dsmt-media-heading { justify-content: space-between; margin: 24px 0 12px; }

.dsmt-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin: 16px 0; }
.dsmt-gallery a { display: block; overflow: hidden; border: 1px solid var(--dsmt-border); border-radius: 9px; background: #f2f4f7; }
.dsmt-gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.dsmt-review-gallery figure { margin: 0; overflow: hidden; border: 1px solid var(--dsmt-border); border-radius: 9px; background: #fff; }
.dsmt-review-gallery figure a { border: 0; border-radius: 0; }
.dsmt-review-gallery figcaption { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; font-size: 12px; }
.dsmt-delete-image { padding: 3px 7px; border: 0; background: transparent; color: var(--dsmt-red); cursor: pointer; }
.dsmt-customer-response,
.dsmt-review-form { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--dsmt-border); }
.dsmt-action-row { flex-wrap: wrap; margin-top: 16px; }

.dsmt-history-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.dsmt-history-grid > section { padding: 18px; border: 1px solid var(--dsmt-border); border-radius: 10px; }
.dsmt-timeline { margin: 15px 0 0; padding: 0; list-style: none; }
.dsmt-timeline li { position: relative; margin: 0; padding: 0 18px 16px 0; border-right: 2px solid #e4e7ec; }
.dsmt-timeline li::before { position: absolute; top: 3px; right: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--dsmt-gold); content: ''; }
.dsmt-timeline time { display: block; margin-top: 3px; color: var(--dsmt-muted); font-size: 11px; }
.dsmt-timeline p { margin: 7px 0 0; }
.dsmt-muted { color: var(--dsmt-muted); }

.dsmt-admin-wrap { margin-left: 20px; }
.dsmt-admin-tabs { margin-bottom: 18px; }
.dsmt-dashboard-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.dsmt-dashboard-cards a { display: flex; flex-direction: column; gap: 10px; padding: 18px; border: 1px solid var(--dsmt-border); border-radius: 10px; background: #fff; color: var(--dsmt-navy); text-decoration: none; box-shadow: 0 3px 12px rgba(16,35,63,.04); }
.dsmt-dashboard-cards strong { font-size: 28px; }
.dsmt-dashboard-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: -6px 0 18px; }
.dsmt-dashboard-metrics > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border: 1px solid var(--dsmt-border); border-radius: 10px; background: #fff; }
.dsmt-dashboard-metrics strong { color: var(--dsmt-navy); font-size: 20px; }
.dsmt-customer-updates { margin-top: 24px; padding: 18px; border: 1px solid var(--dsmt-border); border-radius: 10px; background: #fff; }
.dsmt-settings-panel { max-width: 900px; }
.dsmt-health-ok { color: #067647; font-weight: 700; }
.dsmt-health-bad { color: #b42318; font-weight: 700; }

[hidden] { display: none !important; }

@media (max-width: 1100px) {
    .dsmt-dashboard-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dsmt-data-grid,
    .dsmt-offer-grid,
    .dsmt-data-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .dsmt-panel { padding: 17px; }
    .dsmt-brand-header,
    .dsmt-brand-main,
    .dsmt-detail-title,
    .dsmt-section-heading { align-items: flex-start; flex-direction: column; }
    .dsmt-developer { white-space: normal; }
    .dsmt-grid,
    .dsmt-history-grid,
    .dsmt-data-grid,
    .dsmt-offer-grid,
    .dsmt-data-grid-wide,
    .dsmt-filter-form { grid-template-columns: 1fr; }
    .dsmt-dashboard-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dsmt-dashboard-metrics { grid-template-columns: 1fr; }
    .dsmt-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dsmt-choice-row { flex-direction: column; }
}
