* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f5f7;
    color: #222;
}

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

.card {
    background: #fff;
    border: 1px solid #d9dde3;
    border-radius: 8px;
    padding: 22px;
    margin-bottom: 20px;
}

h1, h2, h3 {
    margin-top: 0;
}

.header {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}

.muted {
    color: #666;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.status-item {
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 14px;
    background: #fafbfc;
}

.update {
    border-top: 1px solid #e4e7eb;
    padding: 18px 0;
}

.update:first-child {
    border-top: 0;
}

.update-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    font-size: 0.92rem;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border: 1px solid #c8cdd4;
    border-radius: 999px;
    background: #f5f6f8;
}

label {
    display: block;
    font-weight: 700;
    margin: 12px 0 6px;
}

input[type="text"],
input[type="date"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 10px 11px;
    border: 1px solid #b9c0c8;
    border-radius: 5px;
    font: inherit;
    background: #fff;
}

textarea {
    min-height: 90px;
    resize: vertical;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

button,
.button {
    appearance: none;
    border: 1px solid #8d97a3;
    border-radius: 5px;
    padding: 10px 14px;
    background: #fff;
    color: #111;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

button.primary,
.button.primary {
    background: #1f4f82;
    border-color: #1f4f82;
    color: #fff;
}

button.danger,
.button.danger {
    border-color: #a33;
    color: #922;
}

.message {
    padding: 11px 13px;
    border-radius: 5px;
    margin-bottom: 16px;
    border: 1px solid #b7c5d8;
    background: #eef4fb;
}

.error {
    border-color: #d2a2a2;
    background: #fff0f0;
}

.admin-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #e1e4e8;
    vertical-align: top;
}

@media (max-width: 700px) {
    .status-grid {
        grid-template-columns: 1fr;
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        border: 1px solid #e1e4e8;
        margin-bottom: 12px;
        border-radius: 6px;
        padding: 8px;
    }

    td {
        border: 0;
        padding: 6px;
    }
}


/* v1.3 photo controls */
input[type="file"] {
    width: 100%;
    padding: 8px 0;
    font: inherit;
}
.check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    margin: 10px 0;
}
.check-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}
.editor-thumb {
    display: block;
    max-width: 150px;
    max-height: 110px;
    object-fit: contain;
    border: 1px solid #d9dde3;
    border-radius: 5px;
    margin-bottom: 6px;
}
.editor-preview {
    display: block;
    max-width: 100%;
    max-height: 360px;
    object-fit: contain;
    border: 1px solid #d9dde3;
    border-radius: 6px;
    margin: 8px 0;
}
.photo-controls { min-width: 230px; }
.photo-name { margin-bottom: 8px; overflow-wrap: anywhere; }
.compact-form { margin: 8px 0 14px; }
.compact-form button { margin-top: 6px; }
.bulk-photo-actions { margin-top: 0; }
.public-photo-wrap { margin-top: 14px; }
.public-photo {
    display: block;
    max-width: min(100%, 720px);
    max-height: 560px;
    object-fit: contain;
    border: 1px solid #d9dde3;
    border-radius: 6px;
}
