* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #f4f7f8;
    color: #172026;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    background: #185b55;
    color: #fff;
    cursor: pointer;
    padding: 0 14px;
}

button.secondary {
    background: #e1ebe9;
    color: #17433f;
}

button.ghost {
    width: auto;
    min-height: 34px;
    background: transparent;
    color: #185b55;
    padding: 0 8px;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cbd9d7;
    border-radius: 8px;
    background: #fff;
    color: #172026;
    padding: 9px 10px;
}

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

label {
    display: grid;
    gap: 6px;
    color: #566966;
    font-size: 13px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 54px;
    padding: 0 14px;
    background: #fff;
    border-bottom: 1px solid #dce7e5;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #185b55;
    color: #fff;
}

.userbar {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #667774;
    font-size: 13px;
}

.wrap {
    width: min(760px, 100%);
    margin: 0 auto;
    padding: 14px;
}

.login-wrap {
    display: grid;
    min-height: calc(100vh - 54px);
    place-items: center;
    padding: 18px;
}

.panel {
    border: 1px solid #dce7e5;
    border-radius: 10px;
    background: #fff;
    padding: 14px;
}

.login-panel {
    width: min(420px, 100%);
}

.stack {
    display: grid;
    gap: 12px;
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1 {
    font-size: 22px;
}

h2 {
    font-size: 18px;
}

h3 {
    font-size: 15px;
}

.muted,
.meta {
    color: #667774;
    font-size: 13px;
}

.form-grid {
    display: grid;
    gap: 12px;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.tabs button {
    min-height: 38px;
    background: #e8efee;
    color: #38504d;
}

.tabs button.active {
    background: #185b55;
    color: #fff;
}

.list {
    display: grid;
    gap: 8px;
}

.list-item {
    display: grid;
    gap: 5px;
    width: 100%;
    border: 1px solid #dce7e5;
    border-radius: 10px;
    background: #fff;
    color: #172026;
    text-align: left;
    padding: 12px;
}

.list-item.active {
    border-color: #185b55;
    background: #eff7f5;
}

.list-title {
    font-weight: 700;
}

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

.kv {
    display: grid;
    gap: 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid #edf3f2;
}

.kv span {
    color: #667774;
    font-size: 12px;
}

.kv strong {
    overflow-wrap: anywhere;
    font-size: 14px;
}

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

.photo-item {
    display: grid;
    gap: 6px;
}

.photo-item img {
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid #dce7e5;
    border-radius: 10px;
    background: #edf3f2;
    object-fit: cover;
}

.empty {
    border: 1px dashed #cbd9d7;
    border-radius: 10px;
    color: #667774;
    padding: 18px;
    text-align: center;
}

.status {
    min-height: 20px;
    color: #9b2f2f;
    font-size: 13px;
    overflow-wrap: anywhere;
}

@media (max-width: 520px) {
    .two-col,
    .grid-info {
        grid-template-columns: 1fr;
    }
}

.admin-shell {
    min-height: calc(100vh - 54px);
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
}

.admin-nav {
    border-right: 1px solid #dce7e5;
    background: #fff;
    padding: 14px;
}

.admin-nav button {
    margin-bottom: 8px;
    background: #e8efee;
    color: #38504d;
}

.admin-nav button.active {
    background: #185b55;
    color: #fff;
}

.admin-main {
    padding: 14px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

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

th {
    color: #566966;
    font-size: 13px;
    font-weight: 600;
}

td button {
    width: auto;
    min-height: 32px;
}

@media (max-width: 760px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-nav {
        border-right: 0;
        border-bottom: 1px solid #dce7e5;
    }
}
