html, body {
    height: 100%;
    margin: 0;
    font-family: Arial, sans-serif;
    color: #222;
    background: #f7f7f7;
}

* {
    box-sizing: border-box;
}

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

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: #222;
    color: #fff;
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu-left, .menu-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar a {
    color: #fff;
    font-weight: 600;
}

.topbar a:hover {
    text-decoration: underline;
}

.page-content {
    flex: 1;
    min-height: 0;
}

.homepage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    height: calc(100vh - 64px - 90px);
    padding: 20px;
}

.panel {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    overflow: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    min-height: 0;
}

.welcome {
    grid-column: 1;
    grid-row: 1;
}

.photos {
    grid-column: 1;
    grid-row: 2;
}

.announcement {
    grid-column: 2;
    grid-row: 1 / 3;
}

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

.photo-grid img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    background: #ddd;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.footer {
    min-height: 90px;
    background: #2f2f2f;
    color: #fff;
    padding: 20px;
}

.form-row {
    margin-bottom: 14px;
}

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

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    font-size: 14px;
}

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

button, .btn {
    display: inline-block;
    background: #222;
    color: #fff;
    padding: 10px 14px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}

.btn-light {
    background: #e9e9e9;
    color: #222;
}

.admin-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
}

.admin-menu {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    height: fit-content;
}

.admin-menu a {
    display: block;
    padding: 10px;
    border-radius: 8px;
}

.admin-menu a:hover {
    background: #f1f1f1;
}

.table-wrap {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

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

.notice {
    padding: 12px 14px;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    margin-bottom: 15px;
}

.error {
    padding: 12px 14px;
    background: #fdecea;
    border: 1px solid #f5c2c7;
    border-radius: 8px;
    margin-bottom: 15px;
}

@media (max-width: 900px) {
    .topbar {
        height: auto;
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .homepage {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
    }

    .welcome, .photos, .announcement {
        grid-column: 1;
        grid-row: auto;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
