:root {
    font-family: Inter, Arial, sans-serif;
    color: #171717;
    background: #f7f7f8;
    --accent: #ed163c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

button,
input,
select,
textarea {
    font: inherit;
}

.admin-shell {
    width: min(100% - 32px, 980px);
    margin: 30px auto;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 35px;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-brand {
    color: #171717;
    font-size: 20px;
    font-weight: 900;
    text-decoration: none;
}

.admin-brand span,
.step-label,
.step-panel h2 span,
.step span {
    color: var(--accent);
}

.admin-brand span {
    margin-left: 8px;
    font-size: 12px;
    letter-spacing: 1px;
}

h1 {
    margin: 0 0 9px;
    font-size: clamp(28px, 5vw, 40px);
}

.step-label {
    margin: 0 0 9px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.5px;
}

.intro,
.step-help {
    color: #6d6d73;
    line-height: 1.6;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.overview-card {
    display: grid;
    gap: 6px;
    min-height: 112px;
    padding: 16px;
    border: 1px solid #e5e5e8;
    border-radius: 12px;
    background: white;
}

.overview-card span {
    color: #5a5a61;
    font-size: 13px;
    font-weight: 700;
}

.overview-card strong {
    font-size: 28px;
    line-height: 1;
}

.overview-card small {
    color: #818189;
    font-size: 12px;
}

.stepper {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 26px 0 18px;
}

.step {
    min-height: 58px;
    padding: 10px;
    border: 1px solid #e5e5e8;
    border-radius: 12px;
    background: white;
    color: #555;
    font-weight: 700;
    cursor: pointer;
}

.step span {
    margin-right: 5px;
    font-weight: 900;
}

.step.active {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 4px 14px #ed163c18;
}

.step-panel,
.login-panel {
    padding: clamp(20px, 5vw, 34px);
    border: 1px solid #e7e7e9;
    border-radius: 16px;
    background: white;
    box-shadow: 0 10px 35px #1717170a;
}

.login-panel {
    max-width: 480px;
}

.login-panel h1 {
    margin-bottom: 24px;
    font-size: 28px;
}

.password-panel {
    max-width: 620px;
    margin: 24px 0;
    padding: clamp(20px, 5vw, 34px);
    border: 1px solid #e7e7e9;
    border-radius: 16px;
    background: white;
    box-shadow: 0 10px 35px #1717170a;
}

.password-panel h2 {
    margin: 0 0 8px;
}

.password-panel p {
    margin: 0 0 22px;
    color: #6d6d73;
}

.password-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.password-form label {
    margin-top: 4px;
    color: #46464c;
    font-size: 13px;
    font-weight: 700;
}

.password-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.password-input input {
    min-width: 0;
}

.show-password {
    align-self: stretch;
    min-width: 58px;
    padding: 8px 10px;
    border: 1px solid #dcdce0;
    border-radius: 8px;
    background: #f7f7f8;
    color: #4a4a50;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.show-password:hover {
    border-color: #ed163c;
    color: #ed163c;
}

.password-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.login-panel form,
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.login-panel form {
    grid-template-columns: 1fr;
}

.step-panel h2 {
    margin: 0;
}

.admin-subsection {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e7e7e9;
}

.admin-subsection h3 {
    margin: 0 0 16px;
    font-size: 16px;
}

.form-grid label,
.product-editor-toolbar label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #46464c;
    font-size: 13px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 11px;
    border: 1px solid #dcdce0;
    border-radius: 8px;
    background: white;
    color: #171717;
}

input[type="file"] {
    min-height: 38px;
    padding: 7px;
    font-size: 12px;
}

input[type="checkbox"] {
    width: 18px;
    min-height: 18px;
}

.editor-list {
    display: grid;
    gap: 12px;
    margin: 20px 0;
}

.editor-row {
    padding: 16px;
    border: 1px solid #e7e7e9;
    border-radius: 12px;
    background: #fcfcfc;
}

.editor-row-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
}

.category-row,
.quick-link-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.quick-link-row textarea {
    min-height: 84px;
    resize: vertical;
}

.product-editor-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
    margin: 20px 0;
}

.product-editor-toolbar label {
    grid-column: 1 / -1;
}

.product-editor-toolbar select {
    grid-column: 1;
}

.product-editor-toolbar .button {
    grid-column: 2;
    grid-row: 2;
}

.check-field {
    flex-direction: row !important;
    align-items: center;
    gap: 10px !important;
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
}

.button {
    min-height: 42px;
    padding: 10px 15px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-weight: 800;
    cursor: pointer;
}

.button-primary {
    background: var(--accent);
    color: white;
}

.button-outline {
    border-color: #dedee2;
    background: white;
    color: #333;
}

.button-danger {
    margin-top: 18px;
    border-color: #ffd5db;
    background: #fff2f4;
    color: #c51231;
}

.button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.status-message {
    min-height: 24px;
    margin: 16px 0;
    color: #327b3f;
    font-size: 14px;
    font-weight: 700;
}

.status-message.error {
    color: #c51231;
}

[hidden] {
    display: none !important;
}

@media (max-width: 640px) {
    .admin-shell {
        margin-top: 18px;
    }

    .stepper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-grid,
    .category-row,
    .quick-link-row {
        grid-template-columns: 1fr;
    }

    .product-editor-toolbar {
        grid-template-columns: 1fr;
    }

    .product-editor-toolbar label,
    .product-editor-toolbar select,
    .product-editor-toolbar .button {
        grid-column: 1;
        grid-row: auto;
    }

    .admin-header {
        align-items: flex-start;
        gap: 12px;
    }

    .admin-header-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}
