:root {
    --bg: #f6f3ef;
    --bg-soft: #ffffff;
    --text: #1f1f1f;
    --muted: #777;
    --primary: #111;
    --primary-soft: #2d2d2d;
    --accent: #c8a96a;
    --accent-soft: #f1e6ce;
    --border: #e6e0d6;
    --danger: #c0392b;
    --success: #1e8e5a;
    --radius: 18px;
    --shadow: 0 18px 50px rgba(0, 0, 0, .08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(200, 169, 106, .18), transparent 32%),
        linear-gradient(135deg, #f8f5ef, #ffffff);
    color: var(--text);
    min-height: 100vh;
}


.photo-admin-preview {

    width: 120px;

    height: 200px;

    background-size: cover;

    background-position: center;

    background-repeat: no-repeat;

}



.card.photo-admin-card {
    width: 30%;
    float: left;
    margin: 1%;
}


.sortable-item {
    width: 30%;
    float: left;
    border: 1px solid #000;
    text-align: center;
}




a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

header,
.navbar {
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    padding: 18px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.logo,
.brand {
    font-weight: 800;
    letter-spacing: -.04em;
    font-size: 22px;
}

nav a {
    margin-left: 18px;
    color: #444;
    font-weight: 600;
    font-size: 14px;
    transition: .2s ease;
}

nav a:hover {
    color: var(--accent);
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto;
}

.card {
    background: rgba(255, 255, 255, .9);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    margin-bottom: 24px;
    animation: fadeUp .35s ease both;
}

h1 {
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.05;
    margin: 0 0 22px;
    letter-spacing: -.05em;
}

h2 {
    font-size: 22px;
    margin: 22px 0 14px;
    letter-spacing: -.03em;
}

p {
    color: var(--muted);
    line-height: 1.6;
}

label {
    display: block;
    font-weight: 700;
    margin: 15px 0 7px;
    font-size: 14px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 13px 15px;
    font-size: 15px;
    background: #fff;
    outline: none;
    transition: .2s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(200, 169, 106, .18);
}

input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.btn,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 13px 22px;
    background: linear-gradient(135deg, var(--primary), var(--primary-soft));
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .12);
    transition: .22s ease;
    width: auto;
}

.btn:hover,
button:hover,
input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 35px rgba(0, 0, 0, .18);
}

.btn.secondary {
    background: var(--accent-soft);
    color: #4f3b12;
    box-shadow: none;
}

.btn.danger {
    background: var(--danger);
}

.table,
table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
}

th {
    background: #161616;
    color: #fff;
    text-align: left;
    padding: 14px;
    font-size: 13px;
}

td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tr:hover td {
    background: #faf7ef;
}

.flash,
.alert {
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-weight: 700;
}

.flash.success,
.alert-success {
    background: rgba(30, 142, 90, .12);
    color: var(--success);
}

.flash.error,
.alert-error {
    background: rgba(192, 57, 43, .12);
    color: var(--danger);
}

.gallery-grid,
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.gallery-card,
.photo-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 14px 35px rgba(0, 0, 0, .07);
    transition: .25s ease;
}

.gallery-card:hover,
.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 50px rgba(0, 0, 0, .12);
}

.gallery-card img,
.photo-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    background: #eee;
}

.gallery-card .content,
.photo-card .content {
    padding: 16px;
}

.gallery-card h3,
.photo-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .72);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 24px;
    width: min(960px, 100%);
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .35);
    animation: zoomIn .25s ease both;
}

.modal-header,
.modal-body,
.modal-footer {
    padding: 20px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.close-modal {
    border: 0;
    background: #f1f1f1;
    color: #111;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    box-shadow: none;
    padding: 0;
}

.comment {
    background: #faf7ef;
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: 14px;
    margin-bottom: 10px;
}

.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.checkbox-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    transition: .2s ease;
}

.checkbox-card:hover {
    border-color: var(--accent);
    background: #fffaf0;
}

footer {
    text-align: center;
    color: var(--muted);
    padding: 30px;
    font-size: 14px;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 700px) {

    header,
    .navbar {
        padding: 14px 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    nav a {
        margin-left: 0;
        margin-right: 12px;
        display: inline-block;
        margin-bottom: 6px;
    }

    .container {
        width: calc(100% - 22px);
        margin: 20px auto;
    }

    .card {
        padding: 20px;
        border-radius: 16px;
    }

    .gallery-grid,
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 14px;
    }

    .gallery-card img,
    .photo-card img {
        height: 200px;
    }

    table {
        display: block;
        overflow-x: auto;
    }
}