.admin-body { min-height: 100vh; background: #f4f7f5; color: #263631; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 265px minmax(0, 1fr); }
.admin-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 18px; background: #183e35; color: #fff; overflow-y: auto; }
.admin-brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 25px; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-brand img { width: 50px; height: 50px; }
.admin-brand span { display: grid; line-height: 1.15; }
.admin-brand strong { color: #fff; font-size: 1.08rem; }
.admin-brand small { margin-top: 4px; color: rgba(255,255,255,.55); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.admin-nav { display: grid; gap: 6px; margin-top: 24px; }
.admin-nav a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 10px 13px; border-radius: 12px; color: rgba(255,255,255,.7); font-size: .88rem; font-weight: 650; }
.admin-nav a > span { display: grid; place-items: center; width: 24px; height: 24px; font-size: 1rem; }
.admin-nav a:hover, .admin-nav a.is-active { background: rgba(255,255,255,.1); color: #fff; }
.admin-nav a.is-active { box-shadow: inset 3px 0 var(--sun-500); }
.admin-sidebar__footer { margin-top: auto; padding: 18px 10px 0; border-top: 1px solid rgba(255,255,255,.1); }
.admin-sidebar__footer p { color: rgba(255,255,255,.5); font-size: .7rem; line-height: 1.5; }
.admin-sidebar__footer button { padding: 0; border: 0; background: transparent; color: var(--sun-200); font-size: .82rem; font-weight: 750; }
.admin-main { min-width: 0; }
.admin-topbar { position: sticky; top: 0; z-index: 50; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 32px; border-bottom: 1px solid #dfe7e4; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); }
.admin-topbar > div { flex: 1; }
.admin-topbar p, .admin-topbar small { margin: 0; }
.admin-topbar p { color: var(--green-900); font-weight: 750; font-size: .86rem; }
.admin-topbar small { color: #7a8984; font-size: .7rem; }
.admin-menu-toggle { display: none; width: 42px; height: 42px; border: 0; border-radius: 12px; background: var(--green-100); color: var(--green-800); }
.admin-content { padding: 32px; }
.admin-flashes { padding: 18px 32px 0; }
.admin-flashes .flash { max-width: 760px; }
.admin-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.admin-page-heading h1 { margin: 3px 0 7px; font-size: clamp(1.8rem, 3vw, 2.5rem); }
.admin-page-heading p { margin-bottom: 0; font-size: .86rem; }
.admin-kicker { color: var(--peach-500) !important; font-size: .69rem !important; font-weight: 850; text-transform: uppercase; letter-spacing: .12em; }
.admin-heading-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.admin-heading-actions > a:not(.button) { color: var(--green-700); font-size: .8rem; font-weight: 750; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.admin-stat-grid article { display: flex; align-items: center; gap: 15px; min-height: 132px; padding: 22px; border: 1px solid #dfe7e4; border-radius: 19px; background: #fff; }
.admin-stat__icon { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 auto; border-radius: 15px; font-weight: 900; }
.admin-stat__icon--green { background: var(--green-100); color: var(--green-800); }
.admin-stat__icon--sun { background: var(--sun-100); color: #a27322; }
.admin-stat__icon--blue { background: var(--blue-100); color: var(--blue-800); }
.admin-stat__icon--peach { background: var(--peach-100); color: #a65e48; }
.admin-stat-grid small, .admin-stat-grid strong, .admin-stat-grid a, .admin-stat-grid span { display: block; }
.admin-stat-grid small { color: #7b8985; font-size: .7rem; }
.admin-stat-grid strong { margin: 2px 0; color: var(--green-900); font-size: 1.75rem; line-height: 1; }
.admin-stat-grid a, .admin-stat-grid div > span { color: var(--green-700); font-size: .7rem; font-weight: 750; }
.admin-panel { border: 1px solid #dfe7e4; border-radius: 20px; background: #fff; box-shadow: 0 6px 22px rgba(32,73,60,.04); }
.admin-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 21px 24px; border-bottom: 1px solid #edf1ef; }
.admin-panel__head h2, .admin-panel__head p { margin: 0; }
.admin-panel__head h2 { font-size: 1.08rem; }
.admin-panel__head p { margin-top: 3px; font-size: .73rem; }
.admin-panel__head > a { color: var(--green-700); font-size: .76rem; font-weight: 750; }
.admin-dashboard-grid { display: grid; grid-template-columns: 1.18fr .82fr; gap: 20px; }
.admin-list, .admin-message-list { padding: 8px 24px 18px; }
.admin-list article { display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid #edf1ef; }
.admin-list article:last-child, .admin-message-list article:last-child { border-bottom: 0; }
.admin-list img { width: 62px; height: 52px; object-fit: cover; border-radius: 10px; background: var(--green-100); }
.admin-list h3 { margin: 4px 0 1px; font-size: .87rem; }
.admin-list small { color: #7b8985; font-size: .67rem; }
.admin-list article > a { color: var(--green-700); font-size: .72rem; font-weight: 750; }
.status-pill { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: .6rem; font-weight: 850; }
.status-pill--published { background: #e7f6ef; color: #277257; }
.status-pill--draft { background: #fff3d9; color: #806022; }
.admin-message-list article { display: flex; align-items: center; gap: 12px; padding: 15px 0; border-bottom: 1px solid #edf1ef; }
.admin-message-list article > span { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; background: var(--peach-100); color: var(--peach-500); font-weight: 900; }
.admin-message-list h3, .admin-message-list p, .admin-message-list small { margin: 0; }
.admin-message-list h3 { font-size: .86rem; }
.admin-message-list p { color: #667671; font-size: .7rem; }
.admin-message-list small { color: #97a19e; font-size: .63rem; }
.admin-empty { padding: 35px; color: #7b8985; text-align: center; }
.admin-empty--large { padding: 75px 25px; }
.admin-empty--large > span { display: block; color: var(--green-200); font-size: 3rem; }
.admin-empty--large h2 { margin: 10px 0 7px; font-size: 1.4rem; }
.admin-guide { margin-top: 20px; }
.admin-guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 24px; }
.admin-guide-grid article { padding: 20px; border-radius: 16px; background: #f7faf8; }
.admin-guide-grid span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--green-100); color: var(--green-800); font-weight: 900; }
.admin-guide-grid h3 { margin: 15px 0 6px; font-size: .95rem; }
.admin-guide-grid p { margin: 0; font-size: .76rem; }
.admin-guide code, .admin-page-heading code, .file-info code { padding: 2px 5px; border-radius: 5px; background: #eef3f0; color: var(--green-800); }

.admin-filter { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.admin-filter label { flex: 1; max-width: 480px; }
.admin-filter input, .admin-filter select { width: 100%; height: 43px; padding: 0 13px; border: 1px solid #d4dfda; border-radius: 11px; background: #fff; }
.admin-filter select { width: 190px; }
.admin-filter > a { color: #76847f; font-size: .74rem; text-decoration: underline; }
.admin-table-panel { overflow: hidden; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .78rem; }
.admin-table th { padding: 12px 16px; background: #f7faf8; color: #687771; text-align: left; font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; }
.admin-table td { padding: 14px 16px; border-top: 1px solid #edf1ef; vertical-align: middle; }
.admin-article-cell { display: flex; align-items: center; gap: 12px; min-width: 260px; }
.admin-article-cell img { width: 60px; height: 48px; object-fit: cover; border-radius: 9px; background: var(--green-100); }
.admin-article-cell strong, .admin-article-cell small { display: block; }
.admin-article-cell strong { max-width: 330px; color: var(--green-900); font-size: .78rem; }
.admin-article-cell small { color: #87938f; font-size: .62rem; }
.admin-table code { font-size: .62rem; }
.admin-row-actions { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.admin-row-actions a, .admin-row-actions button { padding: 0; border: 0; background: none; color: var(--green-700); font-size: .7rem; font-weight: 750; }
.admin-row-actions form button { color: #b35757; }

.admin-form-errors { margin-bottom: 18px; padding: 15px 18px; border: 1px solid #e8b5b5; border-radius: 14px; background: #fff1f1; color: #8c4343; font-size: .8rem; }
.admin-form-errors ul { margin: 7px 0 0; }
.admin-editor-form { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; align-items: start; }
.admin-editor-main, .admin-editor-sidebar { display: grid; gap: 18px; }
.editor-panel { overflow: hidden; }
.editor-title-field { display: grid; gap: 8px; padding: 24px; }
.editor-title-field > span { color: #62716c; font-size: .72rem; font-weight: 750; }
.editor-title-field textarea { width: 100%; border: 0; resize: none; color: var(--green-900); font-size: 1.55rem; font-weight: 800; line-height: 1.25; }
.editor-title-field textarea:focus { outline: none; }
.editor-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; padding: 9px 13px; border-top: 1px solid #edf1ef; border-bottom: 1px solid #edf1ef; background: #f7faf8; }
.editor-toolbar button { min-width: 34px; min-height: 32px; padding: 5px 8px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #465751; font-size: .68rem; }
.editor-toolbar button:hover { border-color: #cad8d2; background: #fff; }
.editor-toolbar > span { width: 1px; height: 22px; margin: 0 3px; background: #d8e1dd; }
.rich-editor { min-height: 580px; padding: 32px; outline: none; background: #fff; }
.rich-editor:focus { box-shadow: inset 0 0 0 2px rgba(77,140,118,.15); }
.editor-status { padding: 9px 14px; border-top: 1px solid #edf1ef; color: #83908c; font-size: .65rem; }
.editor-status.is-error { color: #a64f4f; }
.admin-editor-main > .admin-panel:not(.editor-panel) { padding-bottom: 20px; }
.admin-editor-main > .admin-panel:not(.editor-panel) .field { padding: 20px 24px 0; }
.admin-editor-sidebar .admin-panel { padding-bottom: 20px; overflow: hidden; }
.admin-editor-sidebar .admin-panel > .field { padding: 17px 20px 0; }
.admin-editor-sidebar .admin-panel > .button { margin: 16px 20px 0; width: calc(100% - 40px); }
.admin-editor-sidebar .field input, .admin-editor-sidebar .field select { height: 42px; font-size: .78rem; }
.publish-box .admin-hint { margin: 10px 20px 0; color: #8a9692; font-size: .65rem; line-height: 1.45; }
.slug-field { display: flex; }
.slug-field input { min-width: 0; border-radius: 11px 0 0 11px !important; }
.slug-field button { width: 55px; border: 1px solid #cedbd6; border-left: 0; border-radius: 0 11px 11px 0; background: #f5f8f6; color: var(--green-700); font-size: .68rem; font-weight: 750; }
.cover-preview { min-height: 155px; display: grid; place-items: center; margin: 18px 20px 0; overflow: hidden; border: 1px dashed #cedbd6; border-radius: 14px; background: #f7faf8; color: #87938f; font-size: .72rem; }
.cover-preview img { width: 100%; height: 180px; object-fit: cover; }
.file-info { padding: 20px; }
.file-info h2 { font-size: .95rem; }
.file-info p { font-size: .7rem; }
.file-info code { display: block; margin-bottom: 10px; font-size: .65rem; overflow-wrap: anywhere; }

.submission-tabs { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto; }
.submission-tabs a { display: flex; align-items: center; gap: 7px; padding: 9px 14px; border: 1px solid #d8e2de; border-radius: 999px; background: #fff; color: #63726d; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.submission-tabs a span { display: grid; place-items: center; min-width: 23px; height: 23px; padding: 0 5px; border-radius: 999px; background: #edf3f0; font-size: .65rem; }
.submission-tabs a.is-active { background: var(--green-800); color: #fff; border-color: var(--green-800); }
.submission-tabs a.is-active span { background: rgba(255,255,255,.15); }
.submission-list { padding: 10px 24px 22px; }
.submission-item { border-bottom: 1px solid #edf1ef; }
.submission-item:last-child { border-bottom: 0; }
.submission-item__summary { display: grid; grid-template-columns: 46px 1fr auto auto; align-items: center; gap: 13px; padding: 17px 0; }
.submission-avatar { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 50%; background: var(--green-100); color: var(--green-800); font-weight: 900; }
.submission-type { display: inline-flex; padding: 3px 7px; border-radius: 999px; font-size: .58rem; font-weight: 850; }
.submission-type--admission { background: var(--green-100); color: var(--green-800); }
.submission-type--contact { background: var(--blue-100); color: var(--blue-800); }
.submission-type--recruitment { background: var(--peach-100); color: #a55d48; }
.submission-item h3, .submission-item p { margin: 0; }
.submission-item h3 { margin-top: 3px; font-size: .87rem; }
.submission-item p { font-size: .68rem; }
.submission-item time { color: #899590; font-size: .65rem; }
.submission-item__summary button { padding: 7px 10px; border: 1px solid #d6e0dc; border-radius: 9px; background: #fff; color: var(--green-700); font-size: .68rem; font-weight: 750; }
.submission-item__details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; margin: 0 0 18px 59px; padding: 18px; border-radius: 14px; background: #f7faf8; }
.submission-item__details > div { display: grid; gap: 2px; }
.submission-item__details strong { color: #6f7d78; font-size: .62rem; text-transform: uppercase; }
.submission-item__details span, .submission-item__details a { color: #34453f; font-size: .76rem; overflow-wrap: anywhere; }
.submission-item__details a { color: var(--green-700); text-decoration: underline; }
.submission-item__details > small { grid-column: 1 / -1; color: #909b97; font-size: .6rem; }

/* Login */
.admin-login-page { min-height: 100vh; background: #f4f8f5; }
.admin-login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.admin-login-visual { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: 45px 7vw 30px; overflow: hidden; background: var(--green-800); color: #fff; }
.admin-login-visual::before { content: ""; position: absolute; width: 360px; height: 360px; right: -150px; top: -130px; border-radius: 50%; background: rgba(255,255,255,.07); }
.admin-login-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; }
.admin-login-brand img { width: 58px; height: 58px; }
.admin-login-brand span { display: grid; }
.admin-login-brand strong { color: #fff; font-size: 1.2rem; }
.admin-login-brand small { color: rgba(255,255,255,.58); font-size: .72rem; }
.admin-login-visual > div { position: relative; z-index: 2; max-width: 600px; }
.admin-login-visual h1 { color: #fff; font-size: clamp(2.3rem, 4vw, 4rem); }
.admin-login-visual > div > p:last-child { color: rgba(255,255,255,.72); }
.admin-login-visual > img { position: relative; z-index: 2; width: min(100%, 520px); margin: 0 auto; }
.admin-login-form-wrap { display: grid; place-items: center; padding: 35px; }
.admin-login-form { width: min(100%, 440px); padding: 35px; border: 1px solid #dfe7e4; border-radius: 24px; background: #fff; box-shadow: var(--shadow-soft); }
.admin-login-form__head { margin-bottom: 25px; }
.admin-login-form__head > span { color: var(--peach-500); font-size: .68rem; font-weight: 850; text-transform: uppercase; letter-spacing: .1em; }
.admin-login-form__head h2 { margin: 5px 0 6px; font-size: 2rem; }
.admin-login-form__head p { font-size: .8rem; }
.admin-login-form .field { margin-bottom: 17px; }
.password-field { display: flex; }
.password-field input { border-radius: 11px 0 0 11px !important; }
.password-field button { width: 49px; border: 1px solid #cedbd6; border-left: 0; border-radius: 0 11px 11px 0; background: #f7faf8; color: var(--green-700); }
.admin-login-help { margin: 14px 0; color: #82908b; font-size: .68rem; text-align: center; }
.admin-login-help code { padding: 2px 4px; border-radius: 4px; background: #eef3f0; }
.admin-login-form > .text-link { font-size: .75rem; }

@media (max-width: 1180px) {
    .admin-stat-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { position: fixed; z-index: 100; left: 0; top: 0; width: 265px; transform: translateX(-100%); transition: transform .25s ease; }
    .admin-body.admin-menu-open .admin-sidebar { transform: none; }
    .admin-menu-toggle { display: block; }
    .admin-content { padding: 22px; }
    .admin-topbar { padding-inline: 22px; }
    .admin-flashes { padding-inline: 22px; }
    .admin-editor-form { grid-template-columns: 1fr; }
    .admin-editor-sidebar { grid-template-columns: repeat(2, 1fr); }
    .admin-login-shell { grid-template-columns: 1fr; }
    .admin-login-visual { display: none; }
}
@media (max-width: 650px) {
    .admin-content { padding: 16px; }
    .admin-topbar { padding: 10px 16px; }
    .admin-topbar .button { display: none; }
    .admin-page-heading { align-items: flex-start; flex-direction: column; }
    .admin-stat-grid, .admin-guide-grid, .admin-editor-sidebar { grid-template-columns: 1fr; }
    .admin-filter { align-items: stretch; flex-direction: column; }
    .admin-filter label, .admin-filter select { max-width: none; width: 100%; }
    .submission-item__summary { grid-template-columns: 43px 1fr; }
    .submission-item__summary time, .submission-item__summary button { grid-column: 2; justify-self: start; }
    .submission-item__details { grid-template-columns: 1fr; margin-left: 0; }
    .submission-item__details > small { grid-column: auto; }
    .admin-login-form-wrap { padding: 18px; }
    .admin-login-form { padding: 28px 20px; }
    .editor-toolbar { overflow-x: auto; flex-wrap: nowrap; }
    .rich-editor { padding: 22px 18px; }
}

/* First login and password change */
.first-login-note {
    display: grid;
    gap: 4px;
    margin: -5px 0 20px;
    padding: 13px 15px;
    border: 1px solid #efd79c;
    border-radius: 13px;
    background: #fff8e8;
    color: #6f5722;
    font-size: .75rem;
}
.first-login-note strong { color: #5a451b; font-size: .78rem; }
.first-login-note span { line-height: 1.55; }
.first-login-note small { color: #88713c; line-height: 1.45; }
.first-login-note code { padding: 2px 5px; border-radius: 5px; background: rgba(255,255,255,.78); color: #5c461b; font-weight: 800; }
.field-hint { display: block; margin-top: 6px; color: #7c8985; font-size: .66rem; line-height: 1.45; }
.admin-back-link { display: block; margin-top: 16px; text-align: center; font-size: .75rem; }
