.auth-logo {
    display: block;
    width: min(190px, 70%);
    max-height: 90px;
    object-fit: contain;
    margin: 0 auto 18px;
}

.brand-logo {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    padding: 3px;
}

.alert-success {
    color: #176b34;
    background: #eaf8ee;
    border: 1px solid #a9d8b6;
}

.alert-info {
    color: #0b4f7a;
    background: #edf7ff;
    border: 1px solid #a8d5f2;
}

.ht-module {
    width: min(1440px, 100%);
    margin: 0 auto;
}

.ht-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.ht-page-head h1 {
    margin: 0 0 5px;
    font-size: clamp(25px, 3vw, 34px);
    color: #0b2740;
}

.ht-page-head p {
    margin: 0;
    color: #617080;
}

.ht-card {
    margin-bottom: 20px;
    padding: 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 5px 20px rgba(8, 38, 62, .05);
}

.ht-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 17px;
    border: 1px solid var(--blue);
    border-radius: 9px;
    color: #fff;
    background: var(--blue);
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}

.ht-button:hover { filter: brightness(.95); color: #fff; }
.ht-button-secondary { color: var(--blue); background: #fff; }
.ht-button-secondary:hover { color: #fff; background: var(--blue); }

.ht-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.ht-toolbar input { min-width: min(360px, 100%); }
.ht-toolbar input, .ht-toolbar select, .ht-form-grid input, .ht-form-grid select, .ht-form-grid textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 11px;
    border: 1px solid #c5d0da;
    border-radius: 8px;
    background: #fff;
}

.ht-toolbar input, .ht-toolbar select { width: auto; }

.ht-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px 20px;
}

.ht-form-grid label { display: block; color: #263b4d; font-weight: 700; }
.ht-form-grid label > input, .ht-form-grid label > select, .ht-form-grid label > textarea { display: block; margin-top: 7px; font-weight: 400; }
.ht-full { grid-column: 1 / -1; }
.ht-form-grid .ht-check input { display: inline-block; width: auto; min-height: 0; margin: 0 7px 0 0; }

.ht-table-wrap { overflow-x: auto; padding: 0; }
.ht-table { width: 100%; border-collapse: collapse; min-width: 780px; }
.ht-table th, .ht-table td { padding: 14px 16px; border-bottom: 1px solid #e5ebf0; text-align: left; vertical-align: top; }
.ht-table th { color: #526576; background: #f8fafc; font-size: 12px; letter-spacing: .03em; text-transform: uppercase; }
.ht-table tbody tr:last-child td { border-bottom: 0; }
.ht-table tbody tr:hover { background: #fafdff; }
.ht-empty { padding: 35px !important; color: #738293; text-align: center !important; }
.ht-actions, .ht-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ht-inline-form { display: inline-flex; margin: 0; }
.ht-link-danger { padding: 0; border: 0; color: #b42318; background: transparent; font: inherit; text-decoration: underline; cursor: pointer; }
.ht-button-danger { border-color: #b42318; background: #b42318; }

.ht-status {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

.ht-status.is-active { color: #176b34; background: #e7f7ec; }
.ht-status.is-inactive { color: #8e2020; background: #fff0f0; }

.ht-role-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.ht-role-grid article { padding: 15px; border: 1px solid #e0e7ed; border-radius: 10px; }
.ht-role-grid h3 { margin: 0 0 6px; color: #0b416d; }
.ht-role-grid p { margin: 0; color: #617080; font-size: 13px; line-height: 1.5; }

.ht-logo-settings { display: flex; align-items: center; gap: 20px; padding: 15px; background: #f8fafc; border-radius: 10px; }
.ht-logo-settings img { width: 130px; height: 80px; object-fit: contain; background: #fff; border: 1px solid #dfe7ed; border-radius: 8px; }
.ht-logo-settings small { display: block; margin-top: 6px; color: #718091; }

.ht-order-items { display: grid; gap: 12px; margin-bottom: 12px; min-width: 0; }
.ht-order-row { display: grid; grid-template-columns: minmax(200px,1.1fr) minmax(220px,1.4fr) minmax(90px,.45fr) minmax(125px,.55fr) 42px; gap: 12px; align-items: end; min-width: 0; padding: 15px; border: 1px solid #dbe4ef; border-radius: 12px; background: #fbfdff; overflow: hidden; }
.ht-order-row > *, .ht-order-row input, .ht-order-row select, .ht-order-row button { min-width: 0; max-width: 100%; box-sizing: border-box; }
.ht-line-field { display: grid !important; gap: 6px; min-width: 0; color: #334155; font-size: 12px; font-weight: 750; }
.ht-line-field input, .ht-line-field select, .ht-order-file input { width: 100% !important; min-height: 42px; margin: 0 !important; padding: 9px 10px; border: 1px solid #c5d0da; border-radius: 8px; background: #fff; font-size: 14px; font-weight: 400; }
.ht-remove-item { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid #fecaca; border-radius: 8px; color: #962323; background: #fff1f2; font-size: 24px; line-height: 1; cursor: pointer; }
.ht-remove-item:hover { color: #fff; background: #b42318; }
body.admin-app .ht-table img.ht-catalog-thumb { display: block !important; width: 72px !important; min-width: 72px !important; max-width: 72px !important; height: 72px !important; min-height: 72px !important; max-height: 72px !important; object-fit: contain !important; border: 1px solid #dbe4ef; border-radius: 9px; background: #fff; }
.ht-product-image-editor { display: grid; grid-template-columns: 160px 1fr; gap: 18px; align-items: center; padding: 16px; border: 1px solid #dbe4ef; border-radius: 12px; background: #f8fafc; }
.ht-product-image-editor img { width: 160px; height: 130px; object-fit: contain; background: #fff; border-radius: 10px; border: 1px solid #dbe4ef; }
.ht-paste-zone { display: block; width: 100%; margin-top: 10px; padding: 18px; border: 2px dashed #93c5fd; border-radius: 10px; background: #eff6ff; color: #0756a5; font-weight: 700; cursor: pointer; }
.ht-paste-zone:focus { outline: 3px solid rgba(37,99,235,.22); }
[data-upload-status] { display: block; margin-top: 8px; color: #475569; }
.ht-image-remove { margin-top: 10px; padding: 8px 12px; border: 0; color: #b42318; background: transparent; text-decoration: underline; cursor: pointer; }
.ht-order-image { display: block; width: 72px !important; height: 72px !important; object-fit: contain !important; border: 1px solid #dbe4ef; border-radius: 8px; background: #fff; }
.ht-order-image[hidden], .ht-product-image-editor img[hidden] { display: none !important; }
.ht-order-preview { display: grid; place-items: center; width: 74px; min-height: 74px; }
.ht-order-upload { grid-column: 1 / -1; display: grid; grid-template-columns: 80px minmax(220px,1fr) minmax(190px,.8fr); gap: 10px; align-items: end; min-width: 0; padding-top: 3px; }
.ht-order-file { display: grid; gap: 6px; min-width: 0; color: #334155; font-size: 12px; font-weight: 750; }
.ht-order-upload .ht-paste-zone { min-height: 42px; margin: 0; padding: 9px 12px; font-size: 12px; }
.ht-order-upload [data-upload-status] { grid-column: 2 / -1; margin: 0; }
.ht-catalog-picker { display: grid; gap: 6px; }
.ht-catalog-picker input, .ht-catalog-picker select { width: 100%; }

.ht-feature-list { display: grid; gap: 10px; }
.ht-feature-row { display: grid; grid-template-columns: 110px minmax(240px, .8fr) minmax(260px, 1fr); gap: 18px; align-items: center; padding: 14px; border: 1px solid #dbe4ef; border-radius: 10px; background: #fbfdff; }
.ht-feature-row p { margin: 0; color: #64748b; font-size: 13px; }
.ht-feature-toggle { display: flex; align-items: center; gap: 8px; font-weight: 750; }
.ht-feature-toggle input { width: 20px; height: 20px; }
.ht-feature-name { display: grid; gap: 5px; color: #475569; font-size: 12px; font-weight: 750; }
.ht-feature-name input { width: 100%; min-height: 42px; padding: 9px 10px; border: 1px solid #c5d0da; border-radius: 8px; background: #fff; font-size: 14px; }
.ht-form-actions { margin-top: 18px; }
.ht-reset-form { margin: -8px 0 20px; }

.ht-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ht-summary-grid article { display: grid; gap: 7px; }
.ht-summary-grid span, .ht-summary-grid small { color: #667788; }
.ht-summary-grid strong { color: #0b2740; font-size: 20px; }

@media (max-width: 1000px) {
    .ht-role-grid, .ht-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ht-order-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 42px; }
    .ht-catalog-picker { grid-column: 1 / 2; }
    .ht-line-description { grid-column: 2 / 3; }
    .ht-line-quantity { grid-column: 1 / 2; }
    .ht-line-price { grid-column: 2 / 3; }
    .ht-remove-item { grid-column: 3; grid-row: 1; }
    .ht-order-upload { grid-column: 1 / -1; }
    .ht-feature-row { grid-template-columns: 100px minmax(220px, 1fr); }
    .ht-feature-row p { grid-column: 1 / -1; }
}

@media (max-width: 650px) {
    .ht-page-head { align-items: stretch; flex-direction: column; }
    .ht-form-grid, .ht-role-grid, .ht-summary-grid { grid-template-columns: 1fr; }
    .ht-full { grid-column: auto; }
    .ht-order-row { grid-template-columns: minmax(0,1fr) 42px; }
    .ht-catalog-picker, .ht-line-description, .ht-line-quantity, .ht-line-price { grid-column: 1 / -1; }
    .ht-catalog-picker { grid-row: 2; }
    .ht-remove-item { grid-column: 2; grid-row: 1; }
    .ht-logo-settings { align-items: flex-start; flex-direction: column; }
    .ht-product-image-editor, .ht-order-upload { grid-template-columns: 1fr; }
    .ht-order-upload [data-upload-status] { grid-column: 1; }
    .ht-feature-row { grid-template-columns: 1fr; }
    .ht-feature-row p { grid-column: 1; }
}
