:root {
    --navy: #071a2e;
    --navy-soft: #102941;
    --yellow: #f2c500;
    --paper: #f3f5f2;
    --white: #ffffff;
    --ink: #172536;
    --muted: #73808c;
    --line: #dde2de;
    --danger: #bd3830;
    --sidebar: 248px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

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

button {
    cursor: pointer;
}

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

.admin-eyebrow {
    margin-bottom: 8px;
    color: #8b969f;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.admin-brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--navy);
    background: var(--yellow);
    clip-path: polygon(50% 0, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%);
    font-size: 17px;
    font-weight: 900;
}

.admin-brand > span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.admin-brand strong {
    font-size: 15px;
    letter-spacing: 0.08em;
}

.admin-brand small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 7px;
    letter-spacing: 0.14em;
}

.admin-brand-light {
    color: var(--white);
}

.admin-brand-light small {
    color: rgba(255, 255, 255, 0.4);
}

.admin-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 0 18px;
    border: 0;
    font-size: 12px;
    font-weight: 700;
    transition: transform 160ms ease, background 160ms ease;
}

.admin-button:hover {
    transform: translateY(-1px);
}

.admin-button-primary {
    color: var(--navy);
    background: var(--yellow);
}

.admin-button-primary:hover {
    background: #ffda27;
}

.admin-button-secondary {
    background: var(--paper);
    border: 1px solid var(--line);
}

.admin-alert {
    margin-bottom: 22px;
    padding: 13px 16px;
    background: #fff6c7;
    border-left: 4px solid var(--yellow);
    font-size: 12px;
}

.admin-alert-error {
    color: #7f1d1d;
    background: #fff0ef;
    border-left-color: var(--danger);
}

.admin-alert-success {
    color: #174d34;
    background: #edf8f1;
    border-left-color: #2a8a53;
}

.auth-page {
    min-height: 100vh;
    background: var(--paper);
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(420px, 0.95fr) 1.05fr;
}

.auth-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 58px;
    color: var(--white);
    background:
        radial-gradient(circle at 75% 24%, rgba(90, 163, 200, 0.25), transparent 30%),
        linear-gradient(145deg, #061727, #0b2d4a);
    overflow: hidden;
}

.auth-brand-panel::after {
    position: absolute;
    right: -100px;
    bottom: -160px;
    width: 480px;
    height: 480px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    box-shadow: inset 0 0 0 90px rgba(255, 255, 255, 0.02);
    content: "";
}

.auth-brand-panel > div {
    position: relative;
    z-index: 1;
    max-width: 520px;
    padding: 50px 0;
}

.auth-brand-panel h1 {
    margin-bottom: 22px;
    font-size: clamp(38px, 4.4vw, 62px);
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 1.18;
}

.auth-brand-panel > div > p:last-child {
    max-width: 440px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
    line-height: 1.9;
}

.auth-brand-panel .admin-eyebrow {
    color: var(--yellow);
}

.auth-back {
    position: relative;
    z-index: 1;
    width: max-content;
    color: rgba(255, 255, 255, 0.48);
    font-size: 11px;
}

.auth-back:hover {
    color: var(--white);
}

.auth-form-panel {
    display: grid;
    place-items: center;
    padding: 44px;
}

.auth-form-inner {
    width: min(100%, 420px);
}

.auth-form-inner h2 {
    margin-bottom: 8px;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.auth-intro {
    margin-bottom: 28px;
    color: var(--muted);
    font-size: 12px;
}

.auth-form {
    display: grid;
    gap: 17px;
}

.auth-form label > span,
.admin-field > span {
    display: block;
    margin-bottom: 7px;
    font-size: 11px;
    font-weight: 700;
}

.auth-form input,
.admin-field input,
.admin-field textarea,
.admin-field select {
    width: 100%;
    padding: 11px 13px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid #d7ddd8;
    border-radius: 0;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-form input {
    height: 47px;
}

.admin-field input {
    height: 43px;
}

.admin-field textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.7;
}

.auth-form input:focus,
.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus {
    border-color: #a49115;
    box-shadow: 0 0 0 3px rgba(242, 197, 0, 0.14);
}

.auth-submit {
    width: 100%;
    min-height: 48px;
    margin-top: 5px;
}

.auth-security {
    margin: 21px 0 0;
    color: #9ba3aa;
    font-size: 9px;
    text-align: center;
}

.admin-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

.admin-sidebar {
    position: fixed;
    z-index: 50;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    width: var(--sidebar);
    flex-direction: column;
    padding: 28px 22px 20px;
    color: var(--white);
    background: var(--navy);
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 50px;
}

.admin-nav > p {
    margin: 0 10px 10px;
    color: rgba(255, 255, 255, 0.28);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.15em;
}

.admin-nav a {
    display: flex;
    min-height: 43px;
    align-items: center;
    gap: 13px;
    padding: 0 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    transition: background 160ms ease, color 160ms ease;
}

.admin-nav a > span {
    width: 20px;
    color: rgba(255, 255, 255, 0.38);
    font-size: 15px;
    text-align: center;
}

.admin-nav a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.06);
}

.admin-nav a.is-active {
    color: var(--navy);
    background: var(--yellow);
    font-weight: 700;
}

.admin-nav a.is-active > span {
    color: var(--navy);
}

.admin-sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar-footer a,
.admin-sidebar-footer button {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    color: rgba(255, 255, 255, 0.48);
    background: transparent;
    border: 0;
    font-size: 10px;
    text-align: left;
}

.admin-sidebar-footer a:hover,
.admin-sidebar-footer button:hover {
    color: var(--white);
}

.admin-main {
    min-width: 0;
    grid-column: 2;
}

.admin-topbar {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    min-height: 78px;
    align-items: center;
    gap: 18px;
    padding: 12px 34px;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.admin-topbar > div:nth-child(2) {
    min-width: 0;
}

.admin-topbar p {
    margin-bottom: 1px;
    color: #9aa3aa;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.admin-topbar h1 {
    margin-bottom: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.admin-user > span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: var(--navy);
    background: var(--yellow);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
}

.admin-user > div {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.admin-user strong {
    font-size: 11px;
}

.admin-user small {
    color: #929ca5;
    font-size: 9px;
}

.admin-menu-button {
    display: none;
    padding: 4px;
    background: transparent;
    border: 0;
    font-size: 20px;
}

.admin-content {
    padding: 34px;
}

.dashboard-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 28px;
}

.dashboard-intro h2 {
    margin-bottom: 7px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.035em;
}

.dashboard-intro p:last-child {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 12px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-grid article {
    display: flex;
    min-height: 165px;
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
    background: var(--white);
    border: 1px solid var(--line);
}

.stat-grid article > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.stat-grid article > strong {
    margin-top: 4px;
    font-size: 42px;
    line-height: 1.3;
}

.stat-grid article > a {
    margin-top: auto;
    padding-bottom: 2px;
    border-bottom: 1px solid #ccd2cd;
    color: #75818c;
    font-size: 10px;
}

.stat-grid .stat-highlight {
    color: var(--white);
    background: var(--navy);
    border-color: var(--navy);
}

.stat-grid .stat-highlight > span,
.stat-grid .stat-highlight > a {
    color: rgba(255, 255, 255, 0.50);
}

.stat-grid .stat-highlight > strong {
    color: var(--yellow);
}

.stat-grid .stat-highlight > a {
    border-color: rgba(255, 255, 255, 0.18);
}

.admin-panel {
    margin-bottom: 24px;
    padding: 25px;
    background: var(--white);
    border: 1px solid var(--line);
}

.admin-panel-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 25px;
}

.admin-panel-heading h2 {
    margin-bottom: 3px;
    font-size: 21px;
    font-weight: 800;
}

.admin-panel-heading p:last-child {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 11px;
}

.admin-text-link {
    color: #6f7b86;
    font-size: 10px;
}

.admin-text-link:hover {
    color: var(--navy);
}

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

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.admin-table th {
    padding: 10px 12px;
    color: #859099;
    background: #f7f8f6;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-align: left;
    white-space: nowrap;
}

.admin-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #e8ebe7;
    vertical-align: middle;
}

.admin-table td strong,
.admin-table td small {
    display: block;
}

.admin-table td small {
    margin-top: 3px;
    color: #9099a1;
}

.admin-table .table-actions {
    white-space: nowrap;
}

.admin-table .table-actions > a,
.admin-table .table-actions > form,
.admin-table .table-actions button {
    display: inline;
    margin-left: 12px;
}

.admin-table .table-actions a,
.admin-table .table-actions button {
    padding: 0;
    color: #596670;
    background: transparent;
    border: 0;
    font-size: 10px;
}

.admin-table .table-actions a:hover,
.admin-table .table-actions button:hover {
    color: var(--navy);
    text-decoration: underline;
}

.danger-link {
    color: var(--danger) !important;
}

.content-table {
    min-width: 760px;
}

.table-thumb {
    display: block;
    width: 70px;
    height: 48px;
    object-fit: cover;
    background: var(--paper);
}

.table-thumb-empty {
    display: grid;
    place-items: center;
    color: #a0a8ae;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    color: #6e7880;
    background: #eef0ed;
    border-radius: 99px;
    font-size: 9px;
    white-space: nowrap;
}

.status-badge::before {
    width: 5px;
    height: 5px;
    background: currentColor;
    border-radius: 50%;
    content: "";
}

.status-published {
    color: #217343;
    background: #eaf6ee;
}

.status-draft {
    color: #7f6e1a;
    background: #fbf7df;
}

.status-new {
    color: #9d302b;
    background: #fff0ef;
}

.status-read {
    color: #52616d;
    background: #eef1f3;
}

.admin-empty {
    padding: 58px 20px;
    color: var(--muted);
    text-align: center;
}

.admin-empty > span {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    margin: 0 auto 14px;
    color: var(--navy);
    background: var(--yellow);
    border-radius: 50%;
    font-size: 20px;
}

.admin-empty h3 {
    margin-bottom: 5px;
    color: var(--ink);
    font-size: 16px;
}

.admin-empty p {
    margin-bottom: 18px;
    font-size: 11px;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.quick-links a {
    display: grid;
    min-height: 118px;
    align-content: center;
    grid-template-columns: 32px 1fr;
    grid-template-rows: auto auto;
    column-gap: 12px;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--line);
    transition: transform 160ms ease, border-color 160ms ease;
}

.quick-links a:hover {
    border-color: #b8a214;
    transform: translateY(-2px);
}

.quick-links a > span {
    display: grid;
    width: 32px;
    height: 32px;
    grid-row: 1 / 3;
    place-items: center;
    color: var(--navy);
    background: var(--yellow);
    font-size: 16px;
}

.quick-links strong {
    font-size: 12px;
}

.quick-links small {
    color: var(--muted);
    font-size: 9px;
}

.admin-form {
    display: grid;
    gap: 24px;
}

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

.admin-field {
    display: block;
    min-width: 0;
}

.admin-field-wide {
    grid-column: 1 / -1;
}

.admin-field > small {
    display: block;
    margin-top: 6px;
    color: #939ca4;
    font-size: 9px;
}

.image-field {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 13px;
    background: #f7f8f6;
    border: 1px solid var(--line);
}

.image-field img,
.image-placeholder {
    width: 150px;
    height: 100px;
    flex: 0 0 auto;
    object-fit: cover;
}

.image-placeholder {
    display: grid;
    place-items: center;
    color: #9da5ab;
    background: #ecefeb;
    font-size: 10px;
}

.image-field > div {
    min-width: 0;
}

.image-field input[type="file"] {
    height: auto;
    padding: 8px;
    background: var(--white);
    font-size: 10px;
}

.image-field small {
    display: block;
    margin-top: 6px;
    color: #909aa1;
    font-size: 9px;
}

.admin-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.form-panel {
    padding: 30px;
}

.settings-form {
    display: grid;
    gap: 24px;
}

.settings-actions {
    position: sticky;
    z-index: 20;
    bottom: 18px;
    display: flex;
    justify-content: flex-end;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    box-shadow: 0 12px 35px rgba(7, 26, 46, 0.12);
    backdrop-filter: blur(12px);
}

.inquiry-list {
    display: grid;
    gap: 14px;
}

.inquiry-item {
    border: 1px solid var(--line);
}

.inquiry-item.is-new {
    border-left: 4px solid var(--yellow);
}

.inquiry-summary {
    display: grid;
    grid-template-columns: 86px 1fr 1.2fr 120px;
    align-items: center;
    gap: 18px;
    padding: 15px 18px;
    background: #f8f9f7;
}

.inquiry-person {
    display: flex;
    flex-direction: column;
}

.inquiry-person strong {
    font-size: 12px;
}

.inquiry-person span {
    color: #859099;
    font-size: 9px;
}

.inquiry-contact {
    display: flex;
    flex-direction: column;
    color: #65737e;
    font-size: 10px;
}

.inquiry-summary time {
    color: #8b959d;
    font-size: 9px;
    text-align: right;
}

.inquiry-message {
    padding: 20px;
    color: #46535e;
    font-size: 12px;
    line-height: 1.85;
}

.inquiry-actions {
    display: flex;
    justify-content: flex-end;
    gap: 18px;
    padding: 10px 18px;
    border-top: 1px solid var(--line);
}

.inquiry-actions form {
    display: inline;
}

.inquiry-actions button {
    padding: 0;
    background: transparent;
    border: 0;
    font-size: 10px;
}

.admin-text-button {
    color: #596670;
}

@media (max-width: 1050px) {
    :root {
        --sidebar: 220px;
    }

    .admin-content {
        padding: 24px;
    }

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

    .quick-links {
        grid-template-columns: 1fr;
    }

    .inquiry-summary {
        grid-template-columns: 80px 1fr 1fr;
    }

    .inquiry-summary time {
        display: none;
    }
}

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

    .auth-brand-panel {
        min-height: 340px;
        padding: 34px;
    }

    .auth-brand-panel h1 {
        font-size: 40px;
    }

    .auth-brand-panel > div {
        padding: 35px 0;
    }

    .auth-form-panel {
        padding: 52px 24px;
    }

    .admin-shell {
        display: block;
    }

    .admin-sidebar {
        transform: translateX(-105%);
        transition: transform 220ms ease;
    }

    .admin-sidebar.is-open {
        transform: translateX(0);
        box-shadow: 15px 0 45px rgba(5, 20, 35, 0.22);
    }

    .admin-main {
        min-width: 0;
    }

    .admin-menu-button {
        display: block;
    }

    .admin-topbar {
        padding: 12px 20px;
    }

    .admin-content {
        padding: 20px;
    }

    .admin-user > div {
        display: none;
    }

    .dashboard-intro {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .admin-field-wide {
        grid-column: auto;
    }
}

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

    .stat-grid article {
        min-height: 135px;
    }

    .admin-panel {
        padding: 19px 15px;
    }

    .admin-panel-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .form-panel {
        padding: 20px 16px;
    }

    .image-field {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-form-actions {
        flex-direction: column-reverse;
    }

    .admin-form-actions .admin-button {
        width: 100%;
    }

    .inquiry-summary {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .settings-actions .admin-button {
        width: 100%;
    }
}
