.admin-body {
    background: #f1f3f9;
    min-height: 100vh;
}

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
}

.admin-header {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    padding: 2.5rem 0;
    margin-bottom: 2rem;
}

.admin-header__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.admin-header__actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.admin-header__actions form {
    margin: 0;
}

.admin-main {
    display: grid;
    gap: 2rem;
    padding-bottom: 4rem;
}

.admin-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-nav__link {
    padding: 0.75rem 1.2rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--color-primary);
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.admin-nav__link.is-active,
.admin-nav__link:hover {
    background: var(--color-primary);
    color: #fff;
}

.admin-section {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 16px 32px rgba(31, 45, 61, 0.1);
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: #fff;
    border-radius: 18px;
    padding: 2.5rem 2.25rem;
    box-shadow: 0 24px 48px rgba(31, 45, 61, 0.18);
}

.login-card__header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-card__logo {
    max-width: 120px;
    margin-bottom: 1.5rem;
}

.login-card h1 {
    margin-bottom: 0.5rem;
}

.login-form .form-group + .form-group {
    margin-top: 1.25rem;
}

.login-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.admin-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.admin-form {
    max-width: 760px;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

table thead {
    background: rgba(29, 53, 87, 0.08);
}

table th,
table td {
    text-align: left;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e5e9f2;
}

table tr:last-child td {
    border-bottom: none;
}

.table-actions {
    display: flex;
    gap: 0.75rem;
}

.table-actions a {
    color: var(--color-secondary);
    font-weight: 600;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.overview-card {
    background: rgba(69, 123, 157, 0.12);
    color: var(--color-primary);
    border-radius: 14px;
    padding: 1.5rem;
    text-align: center;
}

.overview-card h2 {
    margin: 0;
    font-size: 2.2rem;
}

.overview-card p {
    margin-top: 0.5rem;
    font-weight: 600;
}

.overview-table h3 {
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.inline-form {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 0.75rem;
    align-items: center;
}

.inline-form textarea {
    resize: vertical;
}

.inline-form select {
    width: 100%;
}

.inline-actions {
    grid-column: span 2;
    display: flex;
    gap: 0.5rem;
}

.button--ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.button--ghost:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.button--small {
    padding: 0.6rem 1.1rem;
    font-size: 0.9rem;
}

.admin-alert {
    margin: -0.5rem 0 1rem;
}

.form__actions {
    display: flex;
    gap: 1rem;
}

.form__hint {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.table-subtext {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.35rem;
}

.image-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.image-picker__option {
    border: 2px solid transparent;
    border-radius: 14px;
    padding: 0;
    background: #f1f5f9;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.image-picker__option img {
    display: block;
    width: 100%;
    height: 110px;
    object-fit: cover;
}

.image-picker__option:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px rgba(20, 33, 61, 0.12);
}

.image-picker__option.is-selected {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(69, 123, 157, 0.25);
}

.image-picker__option:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(20, 33, 61, 0.3);
}

.image-grid {
    margin-top: 2rem;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.image-card {
    background: #f8faff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 30px rgba(17, 24, 39, 0.12);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 1rem;
}

.image-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.image-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0 1.25rem;
    color: var(--color-primary);
}

.image-card__name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-card__size,
.image-card__date {
    font-size: 0.85rem;
    color: #64748b;
}

.image-card__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0 1.25rem;
}

.image-card__actions .button {
    width: 100%;
}

.admin-form--inline {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: flex-end;
    gap: 1rem;
}

@media (max-width: 880px) {
    .inline-form {
        grid-template-columns: 1fr;
    }

    .inline-actions {
        grid-column: span 1;
    }

    table {
        min-width: 100%;
    }
}