.admin-shell {
    width: min(980px, calc(100% - 32px));
    margin: 50px auto 70px;
}

.admin-shell-wide {
    width: min(1280px, calc(100% - 32px));
}

.admin-eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    font-weight: 700;
}

.admin-auth-page {
    min-height: calc(100vh - 260px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 16px 50px;
}

.admin-auth-card,
.admin-panel-card,
.admin-form-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.admin-auth-card {
    width: min(480px, 100%);
    padding: 34px;
}

.admin-panel-card {
    padding: 34px;
}

.admin-form-card {
    padding: 34px;
}

.admin-auth-header h1,
.admin-panel-header h1,
.admin-page-header h1,
.admin-images-section h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
    color: var(--primary-3);
}

.admin-auth-header h1 {
    font-size: 2.7rem;
    margin-bottom: 12px;
}

.admin-panel-header h1,
.admin-page-header h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
}

.admin-auth-text,
.admin-panel-header p {
    color: var(--muted);
    line-height: 1.9;
    margin-top: 14px;
}

.admin-form-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 26px;
}

.admin-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .admin-form-group label {
        font-weight: 700;
        color: var(--primary);
    }

.admin-input {
    width: 100%;
    border: 1px solid var(--line);
    background: white;
    border-radius: 16px;
    padding: 14px 16px;
    outline: none;
    font-size: 1rem;
    color: var(--text);
}

.admin-textarea {
    resize: vertical;
    min-height: 140px;
}

.admin-file {
    padding: 12px;
}

.admin-help-text {
    color: var(--muted);
    font-size: 0.92rem;
}

.admin-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.admin-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    font-weight: 700;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    border-radius: 16px;
    padding: 14px 18px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.18s ease;
}

    .admin-btn:hover {
        transform: translateY(-1px);
    }

.admin-btn-primary {
    background: var(--primary);
    color: white;
}

.admin-btn-secondary {
    background: var(--surface-2);
    color: var(--primary-3);
}

.admin-btn-danger {
    background: #f2dede;
    color: var(--danger);
}

.admin-btn-success {
    background: #dceade;
    color: var(--success);
}

.admin-btn-small {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.94rem;
}

.admin-panel-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    margin-bottom: 24px;
}

.admin-page-header-no-margin {
    margin-bottom: 0;
}

.admin-page-header-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-empty-box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 26px;
    color: var(--muted);
}

.admin-table-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

    .admin-table th,
    .admin-table td {
        padding: 16px 14px;
        border-bottom: 1px solid #eadfd3;
        text-align: left;
        vertical-align: middle;
    }

    .admin-table th {
        background: #f1e8dd;
        color: var(--primary);
        font-weight: 700;
    }

.admin-td-name {
    min-width: 220px;
    color: var(--primary-3);
    font-weight: 700;
}

.admin-thumb-wrap {
    width: 84px;
    height: 84px;
    border-radius: 16px;
    overflow: hidden;
    background: #f4ecdf;
}

.admin-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

.admin-status-active {
    background: #dceade;
    color: var(--success);
}

.admin-status-inactive {
    background: #f2dede;
    color: var(--danger);
}

.admin-action-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .admin-action-list form {
        margin: 0;
    }

.admin-divider {
    margin: 32px 0;
    border: none;
    border-top: 1px solid #e6d9cb;
}

.admin-images-section h2 {
    font-size: 2rem;
    margin-bottom: 18px;
}

.admin-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
}

.admin-image-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    text-align: center;
}

.admin-image-preview {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 10px;
}

.admin-image-card p {
    color: var(--muted);
    margin-bottom: 12px;
}

.validation-box,
.text-danger,
.validation-summary-errors {
    color: var(--danger);
}

.admin-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
}

@media (max-width: 900px) {
    .admin-form-row {
        grid-template-columns: 1fr;
    }

    .admin-page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-page-header-actions {
        justify-content: stretch;
    }
}

@media (max-width: 768px) {
    .admin-shell,
    .admin-shell-wide {
        width: calc(100% - 20px);
        margin: 20px auto 40px;
    }

    .admin-auth-card,
    .admin-panel-card,
    .admin-form-card {
        padding: 22px;
        border-radius: 20px;
    }

    .admin-auth-header h1 {
        font-size: 2.1rem;
    }

    .admin-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .admin-page-header-actions {
        width: 100%;
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

        .admin-page-header-actions .admin-btn {
            flex: 1 1 auto;
        }

    .admin-table-wrap {
        background: transparent;
        border: none;
        box-shadow: none;
        overflow: visible;
    }

    .admin-table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 14px;
    }

        .admin-table thead {
            display: none;
        }

        .admin-table tbody,
        .admin-table tr,
        .admin-table td {
            display: block;
            width: 100%;
        }

        .admin-table tr {
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 18px;
            box-shadow: var(--shadow);
            padding: 14px;
        }

        .admin-table td {
            border: none;
            padding: 8px 0;
            text-align: left;
            white-space: normal;
        }

            .admin-table td::before {
                content: attr(data-label);
                display: block;
                font-size: 0.84rem;
                font-weight: 700;
                color: var(--accent);
                margin-bottom: 4px;
                text-transform: uppercase;
                letter-spacing: 0.4px;
            }

    .admin-thumb-wrap {
        width: 72px;
        height: 72px;
        border-radius: 14px;
    }

    .admin-thumb {
        object-fit: cover;
    }

    .admin-td-name {
        min-width: 0;
        font-size: 1rem;
        line-height: 1.4;
    }

    .admin-action-list {
        flex-direction: column;
        gap: 8px;
    }

        .admin-action-list .admin-btn,
        .admin-action-list form,
        .admin-action-list form button {
            width: 100%;
        }

    .admin-status {
        width: fit-content;
    }
}
