*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f6fa;
    color: #232832;
}

.container {
    width: min(1100px, 90vw);
    margin: 0 auto;
    padding: 2rem 0;
}

.container.narrow {
    width: min(640px, 94vw);
}

.site-header {
    background: #10182f;
    color: #fff;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5vw;
    width: 100%;
}

.site-header h1 {
    margin: 0;
    font-size: 1.3rem;
    letter-spacing: 0.02em;
}

.site-nav a {
    color: #dfe6ff;
    text-decoration: none;
    margin-left: 1rem;
    font-weight: 600;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a.active {
    color: #fff;
    border-color: #00c6ff;
}

.card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.gallery-card {
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 25px rgba(16, 24, 47, 0.15);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(16, 24, 47, 0.2);
}

.card-img {
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0f172a;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0f172a;
}

.card-body {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.card-body-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-success {
    background: #ddfbe1;
    color: #138a3d;
}

.badge-warning {
    background: #fff0da;
    color: #b76b00;
}

.member-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #10182f;
}

.member-label.muted {
    color: #8c94a7;
}

.detail-list {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #4a5164;
    font-size: 0.9rem;
}

.detail-list li {
    margin-bottom: 0.3rem;
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 0.75rem 1.3rem;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
    background: linear-gradient(135deg, #256eff, #0acffe);
    color: #fff;
    box-shadow: 0 10px 20px rgba(19, 98, 223, 0.3);
}

.btn.primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn.secondary {
    background: #eef2ff;
    color: #1d2c6b;
}

.btn.danger {
    background: #ffe5e5;
    color: #b22222;
    box-shadow: 0 8px 16px rgba(178, 34, 34, 0.2);
}

.btn.danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-weight: 600;
}

.form-field input,
.form-field select {
    border-radius: 10px;
    border: 1px solid #d5d8e5;
    padding: 0.7rem 0.9rem;
    font-size: 1rem;
}

.alert {
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
}

.alert ul {
    margin: 0;
    padding-left: 1.2rem;
}

.alert-error {
    background: #ffe7e7;
    color: #9d1a1a;
}

.alert-success {
    background: #e5fbef;
    color: #0f7a3a;
}

.text-muted {
    color: #6b7285;
}

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 47, 0.7);
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: 18px;
    padding: 2rem;
    width: min(420px, 90vw);
    z-index: 1001;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #657190;
}

.form-message {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    min-height: 1.2rem;
}

.form-message.success {
    color: #118542;
}

.form-message.error {
    color: #c62828;
}

.modal-open {
    overflow: hidden;
}

.empty-state {
    text-align: center;
    font-size: 1.05rem;
}

.review-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 1rem;
}

.review-list {
    margin-bottom: 1rem;
}

@media (max-width: 600px) {
    .site-header .container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .site-nav a {
        margin-left: 0.5rem;
    }

    .gallery-card {
        border-radius: 14px;
    }
}
