:root {
    --ink: #19251B;
    --ink-2: #2B3A2D;
    --paper: #F6F4EC;
    --paper-2: #E7EADF;
    --white: #fffdf9;
    --red: #3d6234;
    --red-dark: #243d27;
    --danger: #B73D31;
    --gold: #c59b5a;
    --green: #50654d;
    --muted: #7C887B;
    --line: rgba(42, 64, 43, .13);
    --shadow: 0 18px 50px rgba(24, 44, 27, .1);
    --serif: "Songti SC", "STSong", "SimSun", serif;
    --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow {
    margin: 0 0 18px;
    color: #d9b77d;
    font: 600 11px/1.4 var(--sans);
    letter-spacing: .26em;
}
.eyebrow.accent { color: var(--red); }

.login-view {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(480px, 1.2fr) minmax(420px, .8fr);
    background: var(--paper);
}
.login-visual {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    padding: 44px 58px;
    color: #f8ead4;
    background:
        linear-gradient(90deg, rgba(12, 24, 15, .84) 0%, rgba(12, 24, 15, .38) 72%, rgba(12, 24, 15, .63) 100%),
        linear-gradient(0deg, rgba(11, 22, 14, .86) 0%, rgba(11, 22, 14, .05) 55%),
        url("https://qianjinzix.oss-cn-shenzhen.aliyuncs.com/media/images/hero-dongxiang.jpg") center / cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.login-visual::after {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(240, 210, 165, .23);
    pointer-events: none;
}
.login-brand { display: flex; align-items: center; gap: 13px; position: relative; z-index: 1; }
.login-logo {
    width: 76px;
    height: 76px;
    flex: 0 0 auto;
    border: 1px solid rgba(250, 230, 198, .35);
    border-radius: 11px;
    object-fit: contain;
    background: #fff;
}
.logo-link { display: flex; flex: 0 0 auto; }
.login-brand > span:last-child {
    font: 600 21px/1 var(--serif);
    letter-spacing: .12em;
}
.brand-seal {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(250, 230, 198, .48);
    background: var(--red);
    color: #fff3df;
    font: 600 15px/1.1 var(--serif);
    letter-spacing: .06em;
}
.login-copy { position: relative; z-index: 1; max-width: 650px; margin: auto 0 8vh; }
.login-copy h1 {
    margin: 0 0 24px;
    font: 500 clamp(42px, 5vw, 72px)/1.2 var(--serif);
    letter-spacing: .03em;
}
.login-copy > p:last-child {
    max-width: 500px;
    margin: 0;
    color: rgba(248, 234, 212, .72);
    font-size: 15px;
    line-height: 1.9;
}
.login-quote {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(248, 234, 212, .6);
}
.login-quote span { color: var(--gold); font: 56px/0.6 var(--serif); }
.login-quote p { margin: 0; letter-spacing: .14em; }
.login-panel {
    display: grid;
    place-items: center;
    padding: 48px;
    background:
        radial-gradient(circle at 86% 8%, rgba(61, 98, 52, .08), transparent 30%),
        var(--paper);
}
.login-form { width: min(380px, 100%); }
.login-form h2 {
    margin: 0 0 10px;
    font: 600 38px/1.2 var(--serif);
}
.login-form > .muted { margin: 0 0 36px; font-size: 14px; }
.mobile-brand { display: none; }
.field { display: block; margin-bottom: 18px; }
.field > span {
    display: block;
    margin: 0 0 8px;
    color: #685b50;
    font-size: 12px;
    font-weight: 600;
}
.field input, .field select, .field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 4px;
    outline: none;
    background: rgba(255, 253, 249, .75);
    color: var(--ink);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input, .field select { height: 46px; padding: 0 14px; }
.field textarea { min-height: 116px; padding: 12px 14px; line-height: 1.75; resize: none; }
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: rgba(61, 98, 52, .62);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(61, 98, 52, .08);
}
.editor-toolbar {
    min-height: 38px;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 4px 4px 0 0;
    background: #f1f3ec;
}
.editor-toolbar button {
    height: 27px;
    padding: 0 9px;
    border: 1px solid rgba(61, 98, 52, .13);
    border-radius: 3px;
    background: #fffdf9;
    color: #52644f;
    cursor: pointer;
    font-size: 10px;
}
.editor-toolbar button:hover { border-color: rgba(61, 98, 52, .3); background: #f7faf4; }
.editor-toolbar span { margin-left: auto; color: #98a093; font-size: 9px; letter-spacing: .08em; }
.editor-toolbar + textarea { border-radius: 0 0 4px 4px; }
.rich-textarea {
    min-height: 250px !important;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.8;
}
.textarea-count {
    display: block;
    margin-top: 5px;
    color: #9a9f96;
    font-size: 9px;
    text-align: right;
}
.btn {
    border: 0;
    border-radius: 4px;
    min-height: 40px;
    padding: 0 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: transform .15s, background .15s, color .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--red); color: #fff8ed; box-shadow: 0 8px 20px rgba(36, 61, 39, .2); }
.btn-primary:hover { background: var(--red-dark); }
.btn-dark { background: var(--ink); color: #f5ead8; }
.btn-ghost { border: 1px solid var(--line); background: transparent; color: #685b50; }
.btn-ghost:hover { background: rgba(255, 255, 255, .55); }
.btn-danger { background: #fae9e5; color: #a33428; }
.btn-block { width: 100%; height: 50px; margin-top: 8px; justify-content: space-between; padding: 0 19px; }
.form-error {
    min-height: 20px;
    margin: 12px 0 0;
    color: var(--danger);
    font-size: 12px;
}
.login-hint {
    margin: 22px 0 0;
    color: #a2978d;
    font-size: 11px;
    line-height: 1.7;
    text-align: center;
}

.app-view { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    width: 238px;
    display: flex;
    flex-direction: column;
    padding: 26px 16px 18px;
    color: #decdb6;
    background:
        radial-gradient(circle at 10% 2%, rgba(61, 98, 52, .18), transparent 25%),
        #17251A;
}
.side-brand {
    padding: 0 10px 28px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(236, 211, 174, .11);
}
.side-brand .brand-seal { width: 42px; height: 42px; font-size: 13px; }
.side-brand .side-logo {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    border-radius: 9px;
    object-fit: contain;
    background: #fff;
}
.side-brand strong { display: block; font: 600 16px/1.4 var(--serif); letter-spacing: .07em; color: #f4e7d1; }
.side-brand small { display: block; margin-top: 2px; color: rgba(222, 205, 182, .43); font-size: 10px; letter-spacing: .08em; }
.side-nav { padding-top: 14px; overflow-y: auto; flex: 1; }
.nav-label {
    margin: 21px 13px 8px;
    color: rgba(222, 205, 182, .33);
    font-size: 9px;
    letter-spacing: .2em;
}
.nav-item {
    position: relative;
    width: 100%;
    height: 45px;
    border: 0;
    border-radius: 5px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(238, 221, 196, .68);
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    text-align: left;
    transition: color .15s, background .15s;
}
.nav-item:hover { color: #f4e7d1; background: rgba(255, 255, 255, .035); }
.nav-item.active { color: #fff3df; background: rgba(61, 98, 52, .19); }
.nav-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    width: 2px;
    height: 20px;
    background: #A7BF98;
}
.nav-icon {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(231, 204, 165, .16);
    border-radius: 50%;
    color: rgba(231, 204, 165, .65);
    font: 11px/1 var(--serif);
}
.nav-item.active .nav-icon { border-color: rgba(231, 204, 165, .4); color: #f1d9b3; }
.nav-dot {
    position: absolute;
    right: 13px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #D1A15B;
}
.side-foot {
    padding: 15px 12px 3px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid rgba(236, 211, 174, .09);
    color: rgba(222, 205, 182, .38);
    font-size: 10px;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #7a9b68; box-shadow: 0 0 0 3px rgba(122, 155, 104, .12); }
.main-shell { grid-column: 2; min-width: 0; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 76px;
    padding: 0 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    background: rgba(245, 239, 229, .9);
    backdrop-filter: blur(14px);
}
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #9b8f83; }
.breadcrumb i { font-style: normal; opacity: .55; }
.breadcrumb strong { color: var(--ink); font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 16px; }
.profile { position: relative; display: flex; align-items: center; gap: 10px; padding-left: 16px; border-left: 1px solid var(--line); }
.profile-avatar {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #f9ead5;
    background: linear-gradient(145deg, #b04d36, #6e2d24);
    font: 600 15px/1 var(--serif);
}
.profile strong { display: block; font-size: 12px; }
.profile small { display: block; margin-top: 2px; color: #9b8f83; font-size: 9px; }
.icon-btn {
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #8e8176;
}
.profile-menu {
    position: absolute;
    z-index: 10;
    right: 0;
    top: 48px;
    width: 134px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
    box-shadow: var(--shadow);
}
.profile-menu button { width: 100%; padding: 10px; border: 0; border-radius: 3px; background: transparent; cursor: pointer; text-align: left; font-size: 12px; }
.profile-menu button:hover { background: var(--paper); }
.mobile-menu { display: none; font-size: 19px; }
.main-content { padding: 30px 34px 60px; max-width: 1540px; }
.page-heading { margin-bottom: 25px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.page-heading h2 { margin: 0 0 7px; font: 600 30px/1.2 var(--serif); letter-spacing: .02em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.heading-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.loading-state { min-height: 300px; display: grid; place-items: center; color: var(--muted); font-size: 13px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card {
    position: relative;
    overflow: hidden;
    padding: 21px 22px;
    border: 1px solid rgba(82, 57, 40, .09);
    border-radius: 6px;
    background: rgba(255, 253, 249, .72);
}
.stat-card::after {
    content: "";
    position: absolute;
    right: -26px;
    bottom: -44px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(197, 155, 90, .08);
}
.stat-card .stat-label { color: var(--muted); font-size: 11px; }
.stat-card .stat-value { display: block; margin: 13px 0 4px; font: 600 31px/1 var(--serif); color: var(--ink); }
.stat-card .stat-sub { color: #a3978a; font-size: 10px; }
.stat-card.accent { background: var(--ink); color: #f5e9d8; }
.stat-card.accent .stat-label, .stat-card.accent .stat-sub { color: rgba(245, 233, 216, .55); }
.stat-card.accent .stat-value { color: #f5e9d8; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(290px, .72fr); gap: 18px; }
.panel {
    border: 1px solid rgba(82, 57, 40, .09);
    border-radius: 7px;
    background: rgba(255, 253, 249, .73);
    box-shadow: 0 8px 30px rgba(56, 39, 27, .025);
}
.panel-head {
    min-height: 62px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}
.panel-head h3 { margin: 0; font: 600 16px/1.2 var(--serif); }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.panel-body { padding: 18px 20px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.quick-card {
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 15px;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: background .16s, transform .16s, border-color .16s;
}
.quick-card:hover { transform: translateY(-2px); background: var(--paper); border-color: rgba(61, 98, 52, .2); }
.quick-card span { display: block; color: var(--red); font: 600 16px/1 var(--serif); margin-bottom: 10px; }
.quick-card strong { display: block; font-size: 12px; }
.quick-card small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.preview-card { position: relative; overflow: hidden; min-height: 357px; background: #17251A; }
.preview-hero { position: relative; height: 190px; padding: 20px; background: linear-gradient(90deg, rgba(13, 28, 17, .92), rgba(13, 28, 17, .22)), url("https://qianjinzix.oss-cn-shenzhen.aliyuncs.com/media/images/hero-dongxiang.jpg") 64% 48% / cover; }
.preview-logo {
    width: 66px;
    height: 66px;
    padding: 3px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}
.preview-logo-link { position: absolute; right: 20px; top: 20px; display: flex; }
.preview-hero::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(242, 220, 185, .2); }
.preview-hero small { position: relative; z-index: 1; color: rgba(248, 234, 212, .6); font-size: 8px; letter-spacing: .16em; }
.preview-hero h3 { position: relative; z-index: 1; margin: 40px 0 7px; color: #fff4e2; font: 500 24px/1.2 var(--serif); letter-spacing: .08em; }
.preview-hero p { position: relative; z-index: 1; margin: 0; color: rgba(255, 237, 210, .7); font: 12px/1.4 var(--serif); letter-spacing: .12em; }
.preview-owner { position: relative; margin: -23px 16px 0; padding: 11px 12px; display: flex; align-items: center; gap: 10px; border-radius: 4px; background: #fff8ec; box-shadow: 0 8px 22px rgba(0, 0, 0, .18); }
.preview-owner img { width: 43px; height: 43px; border-radius: 50%; object-fit: cover; }
.preview-owner strong { display: block; font: 600 12px/1.4 var(--serif); }
.preview-owner small { display: block; color: var(--muted); font-size: 8px; }
.preview-info { padding: 16px; color: #e8d7be; }
.preview-info p { margin: 0; font-size: 10px; line-height: 1.8; color: rgba(232, 215, 190, .62); }
.preview-tags { display: flex; gap: 5px; margin-top: 11px; flex-wrap: wrap; }
.preview-tags span { padding: 4px 7px; border: 1px solid rgba(230, 202, 160, .16); color: rgba(235, 212, 177, .75); font-size: 8px; }
.recent-list { display: grid; }
.recent-item { padding: 13px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.recent-item:last-child { border-bottom: 0; }
.recent-item strong { display: block; max-width: 430px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
.recent-item small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.tag { display: inline-flex; align-items: center; height: 23px; padding: 0 8px; border-radius: 3px; background: #eee5d8; color: #796b5f; font-size: 9px; white-space: nowrap; }
.tag.red { background: #f8e8e3; color: #a0372b; }
.tag.green { background: #e9efe6; color: #4a6547; }
.tag.gold { background: #f4ead8; color: #8d6a32; }

.toolbar { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.search-box { position: relative; width: min(310px, 100%); }
.search-box input { width: 100%; height: 40px; padding: 0 14px 0 38px; border: 1px solid var(--line); border-radius: 4px; background: rgba(255, 253, 249, .7); outline: 0; }
.search-box input:focus { border-color: rgba(61, 98, 52, .45); background: var(--white); }
.search-box::before { content: "⌕"; position: absolute; left: 14px; top: 9px; color: #a3978b; font-size: 17px; }
.record-count { color: var(--muted); font-size: 11px; }
.data-panel { overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    padding: 12px 16px;
    color: #988b7d;
    background: rgba(235, 225, 211, .48);
    text-align: left;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .08em;
    white-space: nowrap;
}
.data-table td { padding: 13px 16px; border-top: 1px solid var(--line); font-size: 11px; vertical-align: middle; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: rgba(244, 238, 228, .55); }
.table-title { display: flex; align-items: center; gap: 11px; min-width: 180px; }
.table-thumb { width: 55px; height: 42px; flex: 0 0 auto; object-fit: cover; border-radius: 3px; background: var(--paper-2); }
.table-title strong { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.table-title small { display: block; max-width: 270px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 9px; }
.row-actions { display: flex; justify-content: flex-end; gap: 5px; white-space: nowrap; }
.mini-btn { border: 0; border-radius: 3px; padding: 6px 8px; background: transparent; color: #8d7969; cursor: pointer; font-size: 10px; }
.mini-btn:hover { background: var(--paper-2); color: var(--ink); }
.mini-btn.danger:hover { background: #f8e4e0; color: #a43528; }
.empty-row { padding: 60px 20px !important; text-align: center; color: var(--muted); font-size: 12px; }
.pager { padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); }
.pager-actions { display: flex; gap: 5px; }

.brand-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .55fr); gap: 18px; align-items: start; }
.form-panel { padding: 24px; }
.form-section + .form-section { margin-top: 27px; padding-top: 25px; border-top: 1px solid var(--line); }
.form-section-title { margin: 0 0 19px; display: flex; align-items: center; gap: 10px; font: 600 16px/1.2 var(--serif); }
.form-section-title::before { content: ""; width: 3px; height: 15px; background: var(--red); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { margin-top: 25px; display: flex; justify-content: flex-end; gap: 8px; }
.media-field { display: flex; gap: 10px; align-items: center; }
.media-field input { flex: 1; }
.media-preview { width: 56px; height: 46px; flex: 0 0 auto; border-radius: 3px; object-fit: cover; background: var(--paper-2); }
.upload-btn { height: 46px; white-space: nowrap; }
.brand-side { position: sticky; top: 96px; display: grid; gap: 18px; }
.brand-preview { overflow: hidden; border-radius: 7px; background: #17251A; box-shadow: var(--shadow); }
.brand-preview img.cover { width: 100%; height: 185px; object-fit: cover; display: block; opacity: .9; }
.brand-preview-content { margin: -28px 18px 0; position: relative; padding: 16px; border-radius: 5px 5px 0 0; background: #fff9ed; }
.brand-preview-content img.avatar { position: absolute; top: -30px; right: 16px; width: 58px; height: 58px; border: 3px solid #fff9ed; border-radius: 50%; object-fit: cover; }
.brand-preview-content h3 { margin: 0 0 5px; font: 600 20px/1.3 var(--serif); }
.brand-preview-content p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.brand-preview-foot { padding: 14px 18px 20px; color: #e7d3b7; font-size: 10px; line-height: 1.8; }
.tip-card { padding: 18px; border-left: 3px solid var(--gold); background: rgba(255, 253, 249, .6); color: var(--muted); font-size: 10px; line-height: 1.8; }
.tip-card strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 12px; }

.modal-backdrop {
    position: fixed;
    z-index: 100;
    inset: 0;
    padding: 24px;
    display: flex;
    justify-content: flex-end;
    background: rgba(23, 16, 13, .48);
    backdrop-filter: blur(3px);
    animation: fadeIn .18s ease;
}
.drawer {
    width: min(680px, 100%);
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 7px;
    background: var(--paper);
    box-shadow: -20px 0 70px rgba(11, 22, 14, .25);
    animation: slideIn .24s cubic-bezier(.2, .8, .2, 1);
}
.drawer > form {
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.drawer-head { flex: 0 0 auto; padding: 22px 25px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; font: 600 21px/1.2 var(--serif); }
.drawer-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.drawer-body { min-height: 0; padding: 23px 25px; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.drawer-foot {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    padding: 15px 25px calc(20px + env(safe-area-inset-bottom));
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid var(--line);
    background: var(--paper);
}
.close-btn { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; font-size: 17px; color: var(--muted); }
.editor-tip { margin: 0 0 18px; padding: 11px 13px; border: 1px solid rgba(197, 155, 90, .24); background: #f6eedf; color: #836d51; font-size: 10px; line-height: 1.7; }
.confirm-modal {
    width: min(380px, 100%);
    margin: auto;
    padding: 26px;
    border-radius: 7px;
    background: var(--white);
    box-shadow: var(--shadow);
    animation: popIn .2s ease;
}
.confirm-modal h3 { margin: 0 0 9px; font: 600 21px/1.3 var(--serif); }
.confirm-modal p { margin: 0 0 23px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
.toast {
    position: fixed;
    z-index: 200;
    left: 50%;
    top: 22px;
    transform: translateX(-50%);
    max-width: min(480px, 90vw);
    padding: 11px 16px;
    border-radius: 4px;
    color: #fff7e8;
    background: #17251A;
    box-shadow: 0 12px 35px rgba(0, 0, 0, .2);
    font-size: 12px;
    animation: toastIn .22s ease;
}
.toast.error { background: #9b3227; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateX(32px); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes popIn { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastIn { from { transform: translate(-50%, -8px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

@media (max-width: 1160px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .brand-layout { grid-template-columns: 1fr; }
    .brand-side { position: static; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .login-view { grid-template-columns: 1fr; }
    .login-visual { display: none; }
    .login-panel { min-height: 100vh; padding: 32px; }
    .mobile-brand { display: block; margin-bottom: 36px; color: var(--red); font: 600 21px/1.3 var(--serif); letter-spacing: .12em; }
    .app-view { grid-template-columns: 1fr; }
    .sidebar { transform: translateX(-102%); transition: transform .22s ease; box-shadow: 20px 0 50px rgba(0, 0, 0, .16); }
    .sidebar.open { transform: none; }
    .main-shell { grid-column: 1; }
    .mobile-menu { display: block; }
    .topbar { padding: 0 18px; }
    .top-actions .btn-ghost { display: none; }
    .main-content { padding: 24px 18px 50px; }
}
@media (max-width: 650px) {
    .page-heading { align-items: flex-start; flex-direction: column; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .stat-card { padding: 17px; }
    .stat-card .stat-value { font-size: 27px; }
    .quick-grid { grid-template-columns: 1fr 1fr; }
    .brand-side { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .full { grid-column: 1; }
    .toolbar { align-items: stretch; flex-direction: column; }
    .search-box { width: 100%; }
    .data-table th:nth-child(3), .data-table td:nth-child(3),
    .data-table th:nth-child(4), .data-table td:nth-child(4) { display: none; }
    .table-title strong { max-width: 150px; }
    .profile > div:not(.profile-menu) { display: none; }
    .breadcrumb > span, .breadcrumb i { display: none; }
    .modal-backdrop { padding: 0; }
    .drawer { border-radius: 0; }
    .drawer-head, .drawer-body, .drawer-foot { padding-left: 18px; padding-right: 18px; }
    .toast { top: 14px; }
}
