:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --line: #dbe2ef;
    --text: #1b2430;
    --accent: #146c94;
    --accent-hover: #0f5878;
    --error-bg: #fde8e8;
    --error-text: #a61b1b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: linear-gradient(160deg, #f8fbff, #eef4ff 45%, #f5f7fb 100%);
    color: var(--text);
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.85);
    position: sticky;
    top: 0;
    backdrop-filter: blur(5px);
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: cover;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info a {
    color: var(--accent);
    text-decoration: none;
}

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

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 8px 24px rgba(16, 36, 94, 0.06);
}

.login-card {
    max-width: 460px;
    margin: 40px auto;
}

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

input, select, button {
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--line);
    padding: 0 12px;
    font-size: 14px;
}

textarea {
    border-radius: 8px;
    border: 1px solid var(--line);
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

button, .btn-link {
    border: none;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 8px;
    height: 40px;
}

button:hover, .btn-link:hover {
    background: var(--accent-hover);
}

.hero {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 16px;
    align-items: center;
}

.hero-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--line);
}

.filters {
    display: grid;
    grid-template-columns: 1fr 160px 120px 90px 140px;
    gap: 10px;
    margin-bottom: 12px;
}

.export-btn {
    font-weight: 600;
}

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

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

th, td {
    border: 1px solid var(--line);
    padding: 10px;
    text-align: left;
    white-space: nowrap;
}

th {
    background: #edf4ff;
}

.empty {
    text-align: center;
}

.alert {
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.alert.error {
    background: var(--error-bg);
    color: var(--error-text);
}

.alert.success {
    background: #eaf7ec;
    color: #1f6f2f;
}

.admin-create-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.inline-form {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.inline-form input {
    min-width: 140px;
}

.notice-item {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    background: #fbfdff;
}

.meta {
    color: #4b5f7e;
    font-size: 13px;
}

.mt-10 {
    margin-top: 10px;
}

.notice-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(7, 20, 44, 0.42);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.notice-modal {
    width: min(560px, 95vw);
    background: #ffffff;
    border: 1px solid #cdd8ec;
    border-radius: 14px;
    box-shadow: 0 20px 48px rgba(9, 28, 70, 0.22);
    padding: 18px 18px 16px;
}

.notice-modal h3 {
    margin: 0 0 10px;
    color: #11345b;
}

.notice-modal p {
    margin: 0 0 14px;
    line-height: 1.75;
}

.notice-close-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

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

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

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

    .inline-form {
        flex-direction: column;
        align-items: stretch;
    }
}
