:root {
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: #192337;
    background: #f3f5f9;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    --admin-blue: #00745f;
    --admin-primary: #009f80;
    --admin-primary-soft: #e6f5f2;
    --admin-muted: #748096;
    --admin-border: #e4e8ef;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: #f3f5f9; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

.admin-auth-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background: radial-gradient(ellipse at 50% 20%, #fff 0, #f1f4fa 58%, #e9edf5 100%);
}

.auth-card {
    width: min(440px, 100%);
    padding: 38px;
    border: 1px solid rgba(255,255,255,.92);
    border-radius: 24px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 24px 80px rgba(30,41,59,.13);
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #263247;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
}

.admin-brand > span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: var(--admin-primary);
    color: #172033;
    font-size: 11px;
}

.admin-brand small {
    margin-left: 2px;
    color: #8b96a7;
    font-size: 9px;
    letter-spacing: .12em;
}

.auth-kicker {
    margin: 28px 0 9px;
    color: var(--admin-blue);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
}

.auth-card h1, .page-heading h1 {
    margin: 0;
    color: #172033;
    font-size: 30px;
    letter-spacing: -.045em;
}

.auth-card > p, .page-heading p {
    margin: 9px 0 24px;
    color: var(--admin-muted);
    font-size: 13px;
    line-height: 1.6;
}

.auth-note {
    margin-top: 20px;
    color: #8190a4;
    font-size: 11px;
    line-height: 1.55;
}

.admin-topbar {
    position: sticky;
    z-index: 10;
    top: 0;
    display: flex;
    height: 70px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 clamp(20px, 4vw, 58px);
    border-bottom: 1px solid var(--admin-border);
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(16px);
}

.admin-topbar .admin-brand > span { width: 34px; height: 34px; border-radius: 11px; }
.admin-nav { display: flex; height: 100%; align-items: center; gap: 8px; }
.admin-nav a { display: inline-flex; height: 100%; align-items: center; gap: 7px; padding: 0 16px; border-bottom: 2px solid transparent; color: #6f7b8e; font-size: 12px; font-weight: 650; }
.admin-nav a.active { border-color: var(--admin-blue); color: var(--admin-blue); }
.approval-count { display: inline-grid; min-width: 20px; height: 20px; align-items: center; justify-items: center; padding: 0 5px; border-radius: 99px; background: #c2413a; color: #fff; font-size: 10px; font-weight: 800; line-height: 1; }
.approval-count--changes { background: #b7791f; }
.admin-account { display: flex; align-items: center; gap: 14px; color: #647187; font-size: 12px; }
.admin-account form, .inline-form { margin: 0; }

.admin-main { width: min(1200px, 100%); margin: 0 auto; padding: 42px 24px 70px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.page-heading .auth-kicker { margin-top: 0; }
.page-heading p { margin-bottom: 0; }

.button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
    border: 1px solid transparent;
    border-radius: 11px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { background: linear-gradient(135deg,#009f80,#00856b); box-shadow: 0 7px 17px rgba(0,116,95,.2); color: #172033; }
.button-secondary { border-color: #dfe5ee; background: #fff; color: #354257; }
.button-quiet { min-height: 34px; padding: 0 9px; background: transparent; color: #647187; }
.button-small { min-height: 32px; padding: 0 10px; border-radius: 9px; font-size: 11px; }
.button-wide { width: 100%; margin-top: 12px; }

.admin-form { display: grid; gap: 12px; }
.admin-form > label, .admin-editor-field, .form-pair label {
    display: grid;
    gap: 6px;
    color: #4e5c71;
    font-size: 11px;
    font-weight: 700;
}
.admin-form input:not([type=hidden]), .admin-form select, .admin-form textarea,
.admin-editor-field input, .admin-editor-field select, .admin-editor-field textarea,
.form-pair input, .form-pair select {
    width: 100%;
    min-height: 40px;
    padding: 9px 11px;
    border: 1px solid #dfe5ee;
    border-radius: 10px;
    outline: none;
    background: #fff;
    color: #243148;
    font-size: 12px;
    font-weight: 500;
}
.admin-form textarea, .admin-editor-field textarea { resize: vertical; }
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus,
.admin-editor-field input:focus, .admin-editor-field select:focus, .admin-editor-field textarea:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(0,159,128,.22);
}
.admin-form small, .admin-editor-field small { color: #8490a1; font-size: 10px; font-weight: 400; line-height: 1.45; }
.form-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }

.flash { margin: 12px 0; padding: 12px 15px; border-radius: 11px; font-size: 12px; }
.flash-success { border: 1px solid #b8e6cf; background: #effbf4; color: #28734b; }
.flash-error { border: 1px solid #f1c8c8; background: #fff5f5; color: #a83c3c; }

.status-tabs { display: flex; gap: 6px; margin: 26px 0 14px; overflow-x: auto; }
.status-tabs a { flex: 0 0 auto; padding: 10px 14px; border: 1px solid transparent; border-radius: 10px; color: #6d788b; font-size: 12px; font-weight: 650; }
.status-tabs .approval-count { margin-left: 5px; vertical-align: middle; }
.status-tabs a.selected { border-color: #b8d8c7; background: var(--admin-primary-soft); color: var(--admin-blue); }
.filters-card, .table-card, .admin-card, .share-card { border: 1px solid var(--admin-border); border-radius: 16px; background: #fff; box-shadow: 0 4px 18px rgba(24,39,75,.035); }
.filters-card { display: flex; align-items: center; gap: 12px; padding: 13px; }
.search-field { display: flex; min-width: 160px; height: 40px; flex: 1; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid #e2e7ef; border-radius: 10px; color: #8490a1; }
.search-field > span { font-size: 19px; }
.search-field input { width: 100%; border: 0; outline: 0; color: #263247; font-size: 12px; }
.filter-select { display: flex; align-items: center; gap: 9px; color: #8190a2; font-size: 11px; }
.filter-select select, .row-actions select { min-height: 38px; padding: 0 10px; border: 1px solid #e2e7ef; border-radius: 9px; background: #fff; color: #45536a; font-size: 11px; }

.table-card { margin-top: 18px; overflow: hidden; }
.table-heading { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid #edf0f4; }
.table-heading h2 { margin: 0; font-size: 14px; }
.table-heading > span { color: #8290a3; font-size: 11px; }
.approval-row { display: grid; grid-template-columns: 42px minmax(180px,1fr) minmax(130px,.7fr) auto minmax(250px,auto); align-items: center; gap: 14px; min-height: 78px; padding: 12px 18px; border-bottom: 1px solid #f0f2f6; }
.approval-row:last-child { border-bottom: 0; }
.approval-icon, .card-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: var(--admin-primary-soft); color: var(--admin-blue); font-size: 11px; font-weight: 800; }
.approval-info { display: grid; gap: 5px; min-width: 0; }
.approval-info strong { overflow: hidden; color: #253249; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.approval-info > span, .approval-model { color: #8190a2; font-size: 11px; }
.status-pill { padding: 6px 9px; border-radius: 99px; background: #fff7e7; color: #9a7025; font-size: 10px; font-weight: 700; white-space: nowrap; }
.status-pill.approved { background: #eaf8ef; color: #318054; }
.status-pill.changes { background: #fff0f0; color: #b44c4c; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.row-actions form { margin: 0; }
.empty-state { padding: 56px 20px; text-align: center; }
.empty-state > span { color: #6b91e5; font-size: 25px; }
.empty-state h3 { margin: 12px 0 6px; font-size: 15px; }
.empty-state p { margin: 0; color: #8390a2; font-size: 12px; }
.share-card { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; padding: 16px 18px; }
.share-card > div { display: grid; gap: 5px; }
.share-card strong { font-size: 12px; }
.share-card span { color: #7e8a9d; font-size: 11px; }
.share-link { grid-column: 1/-1; width: 100%; min-height: 37px; padding: 8px 10px; border: 1px solid #e2e7ef; border-radius: 9px; color: #42516a; font-size: 11px; }

.catalog-tabs { display: grid; gap: 14px; }
.catalog-tab-list { display: flex; gap: 6px; padding: 5px; overflow-x: auto; border: 1px solid var(--admin-border); border-radius: 13px; background: #fff; }
.catalog-tab { flex: 0 0 auto; min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #6d788b; font-size: 12px; font-weight: 650; cursor: pointer; }
.catalog-tab:hover { background: #f6f8fb; color: #354258; }
.catalog-tab.is-active { border-color: #b8d8c7; background: var(--admin-primary-soft); color: var(--admin-blue); }
.catalog-tab:focus-visible { outline: 3px solid rgba(0,159,128,.25); outline-offset: 2px; }
.catalog-panel[hidden] { display: none; }
.catalog-panel { min-width: 0; }
.catalog-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.admin-card { min-width: 0; padding: 20px; }
.catalog-entry-section { padding: 16px 0 4px; border-top: 1px solid #edf0f5; }
.catalog-entry-section + .catalog-entry-section { margin-top: 18px; }
.catalog-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.catalog-section-heading h3 { margin: 0; color: #354258; font-size: 12px; font-weight: 750; }
.catalog-section-heading span { color: #8b96a7; font-size: 10px; text-align: right; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.card-heading > div { display: flex; align-items: center; gap: 10px; }
.card-heading h2 { margin: 0; font-size: 14px; }
.card-heading > span { color: #8793a4; font-size: 10px; }
.admin-card > p { margin: 0 0 17px; color: #8190a3; font-size: 11px; line-height: 1.5; }
.catalog-list { display: grid; gap: 2px; max-height: 260px; margin-top: 18px; overflow: auto; }
.catalog-list > div { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid #f0f2f6; }
.catalog-list > div strong { color: #354258; font-size: 11px; }
.catalog-list > div span { color: #8b96a7; font-size: 10px; overflow-wrap: anywhere; }
.model-list { gap: 8px; }
.model-edit-row { display: grid; gap: 9px; padding: 11px 0; border-bottom: 1px solid #f0f2f6; }
.model-edit-row > label { display: grid; gap: 5px; color: #748096; font-size: 10px; font-weight: 700; }
.model-edit-row input[type=file] { width: 100%; min-height: auto; padding: 7px; border: 1px solid #e0e6ee; border-radius: 8px; color: #748096; font-size: 10px; }
.model-edit-row input { width: 100%; min-height: 35px; padding: 7px 9px; border: 1px solid #e0e6ee; border-radius: 8px; color: #243148; font-size: 11px; }
.model-edit-row input:focus { border-color: var(--admin-primary); outline: 3px solid rgba(0,159,128,.18); }
.model-edit-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.model-edit-footer > span { min-width: 0; color: #8b96a7; font-size: 10px; overflow-wrap: anywhere; }
.color-list { gap: 6px; }
.color-edit-row { display: grid; grid-template-columns: 20px 1fr minmax(90px,1.2fr) 44px auto; align-items: center; gap: 7px; padding: 7px 0; border-bottom: 1px solid #f0f2f6; }
.color-edit-row input[name=nome] { min-height: 33px; padding: 5px 8px; border: 1px solid #e0e6ee; border-radius: 7px; font-size: 10px; }
.color-edit-row input[type=color] { width: 38px; height: 33px; padding: 2px; border: 1px solid #e0e6ee; border-radius: 7px; }
.color-swatch { width: 16px; height: 16px; border: 1px solid #dbe1e9; border-radius: 50%; background: var(--swatch); }
.color-owner { color: #8793a4; font-size: 9px; }
.current-file { margin-bottom: 13px; padding: 10px; border-radius: 9px; background: #eff8f2; color: #367c53; font-size: 11px; }
.inline-form { margin-top: 11px; }

.admin-editor-page { overflow: auto; }
.editor-header { justify-content: space-between; }
.admin-editor-page .app { height: auto; min-height: 100vh; }
.admin-editor { flex: initial; min-height: auto; grid-template-columns: minmax(0, 1.35fr) minmax(360px, .9fr); align-items: start; padding-top: 14px; }
.admin-editor-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .85fr); align-items: start; gap: 12px; min-width: 0; }
.admin-editor-workspace .visualizador { height: 68vh; min-height: 420px; max-height: 680px; }
.admin-editor-panel { display: grid; align-content: start; gap: 2px; height: auto; overflow: visible; padding-right: 0; }
.admin-editor-field { margin-bottom: 9px; }
.admin-editor-general { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.admin-editor-general h2, .admin-editor-product, .admin-editor-addresses { grid-column: 1 / -1; }
.admin-editor-general .admin-editor-field { min-width: 0; }
.editor-finish-select.is-none { color: #dc2626; }
.product-finish-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.product-finish-fields .admin-editor-field { min-width: 0; }
.product-finish-fields .editor-options-empty { grid-column: 1 / -1; }
.product-type-list { display: grid; gap: 10px; max-height: 380px; margin-top: 16px; overflow: auto; }
.product-type-edit { display: grid; gap: 9px; padding: 12px; border: 1px solid #edf0f5; border-radius: 10px; }
.product-type-edit > label { display: grid; gap: 6px; color: #4e5c71; font-size: 11px; font-weight: 700; }
.product-type-edit input, .product-type-edit textarea { width: 100%; min-height: 38px; padding: 9px 11px; border: 1px solid #dfe5ed; border-radius: 9px; color: #243148; font-size: 12px; }
.product-type-edit textarea { resize: vertical; }
.editor-preview-badge { position: absolute; bottom: 12px; left: 12px; padding: 7px 10px; border-radius: 9px; background: rgba(255,255,255,.85); color: #59677b; font-size: 10px; }
.editor-model-status { position: absolute; top: 12px; left: 12px; z-index: 2; max-width: calc(100% - 24px); padding: 8px 11px; border: 1px solid #dfe5ee; border-radius: 9px; background: rgba(255,255,255,.9); color: #59677b; font-size: 11px; }
.editor-model-status:empty { display: none; }
.radio-icons-cordao #tiposCordao { display: contents; }
.editor-options-empty { grid-column: 1/-1; padding: 8px 2px; color: #8490a1; font-size: 11px; }
.editor-options [hidden] { display: none !important; }
.editor-options .grupo { min-width: 0; }
.editor-options .configuracao { margin-bottom: 0; }
.editor-options .radio-icons-cordao { grid-template-columns: repeat(2,minmax(0,1fr)); }
.editor-options .cores-cordao { grid-template-columns: repeat(4,minmax(0,1fr)); }
.editor-options .cor-cordao-nome { opacity: 1; }
.editor-options .cor-cordao-visual { min-height: 42px; }
.arte-preview { min-height: 68px; display: grid; place-items: center; margin: 10px 0; border: 1px dashed #d6deea; border-radius: 9px; background: #f7f9fc; color: #8996a8; font-size: 10px; }
.arte-preview img { max-width: 100%; max-height: 120px; object-fit: contain; }
.arte-card .controle { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; align-items: center; margin: 12px 0; color: #536176; font-size: 10px; }
.arte-card .controle input[type=range] { grid-column: 1/-1; width: 100%; accent-color: var(--admin-blue); }
.editor-save-card { position: sticky; bottom: 10px; z-index: 3; border-color: #dce5f4; box-shadow: 0 8px 25px rgba(24,39,75,.08); }
.editor-save-card p { margin: 0 0 10px; color: #7d899c; font-size: 10px; line-height: 1.5; }

@media (max-width: 1100px) {
    .admin-editor { grid-template-columns: minmax(0, 1fr); }
    .admin-editor-workspace .visualizador { height: 56vh; min-height: 400px; }
}

@media (max-width: 800px) {
    .admin-editor { display: grid; }
    .admin-editor-workspace { grid-template-columns: minmax(0, 1fr); }
    .admin-editor-workspace .visualizador { height: 55vh; min-height: 360px; }
    .admin-editor-panel { height: auto; overflow: visible; }
    .admin-editor-general { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 500px) {
    .admin-editor-general { grid-template-columns: minmax(0, 1fr); }
    .admin-editor-general h2, .admin-editor-product { grid-column: 1; }
    .product-finish-fields { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
    .approval-row { grid-template-columns: 38px minmax(140px,1fr) auto; }
    .approval-model { grid-column: 2; }
    .status-pill { grid-column: 3; grid-row: 1; }
    .row-actions { grid-column: 2/-1; justify-content: flex-start; flex-wrap: wrap; }
}

@media (max-width: 680px) {
    .admin-topbar { height: auto; min-height: 64px; flex-wrap: wrap; gap: 4px 12px; padding: 10px 16px; }
    .admin-brand small { display: none; }
    .admin-nav { order: 3; width: 100%; height: 38px; }
    .admin-nav a { padding: 0 10px; }
    .admin-account { gap: 6px; font-size: 10px; }
    .admin-main { padding: 28px 14px 50px; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .page-heading h1 { font-size: 25px; }
    .filters-card { align-items: stretch; flex-direction: column; }
    .filter-select { justify-content: space-between; }
    .filter-select select { flex: 1; }
    .approval-row { grid-template-columns: 36px minmax(0,1fr) auto; gap: 8px; padding: 13px 11px; }
    .approval-model { font-size: 10px; }
    .row-actions { gap: 3px; }
    .row-actions .button { padding: 0 8px; }
    .catalog-grid { grid-template-columns: 1fr; }
    .catalog-tab-list { margin-right: -2px; }
    .catalog-tab { padding: 0 12px; font-size: 11px; }
    .auth-card { padding: 28px 22px; }
    .form-pair { grid-template-columns: 1fr; }
    .share-card { grid-template-columns: 1fr; }
    .share-link { grid-column: 1; }
}
.editor-change-request p {
    margin: 0;
    padding: 12px;
    border: 1px solid #f2d28f;
    border-radius: 10px;
    background: #fff9e9;
    color: #59461e;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
