:root{--navy:#111c31;--navy-2:#1b2b49;--blue:#2563eb;--blue-2:#3b82f6;--ink:#142033;--muted:#64748b;--line:#dce4ef;--soft:#f4f7fb;--white:#fff;--green:#0f9f6e;--danger:#c93838;--shadow:0 18px 45px rgba(15,35,65,.09)}
*{box-sizing:border-box}
html{min-height:100%}
body{margin:0;min-height:100%;background:linear-gradient(180deg,#eef3f9 0,#f7f9fc 42%,#eef3f8 100%);color:var(--ink);font:14px/1.65 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif}
button,input,textarea,select{font:inherit}
.topbar{position:sticky;z-index:30;top:0;min-height:76px;background:linear-gradient(110deg,#111b2e,#182742 70%,#203557);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 max(28px,calc((100vw - 1320px)/2));box-shadow:0 8px 28px rgba(15,28,49,.18)}
.platform-brand{display:flex;align-items:center;gap:15px;color:#fff;text-decoration:none}
.platform-brand img{display:block;width:42px;height:42px;padding:3px;border-radius:10px;background:#fff;object-fit:contain}
.platform-brand span{display:flex;flex-direction:column;border-left:1px solid rgba(255,255,255,.22);padding-left:15px;line-height:1.25}
.platform-brand strong{font-size:17px;letter-spacing:.04em}
.platform-brand small{margin-top:4px;color:#9eb0cb;font-size:9px;letter-spacing:.13em}
.topbar nav{display:flex;gap:8px;align-items:center}
.topbar nav>a,.link-button{display:inline-flex;align-items:center;min-height:36px;padding:0 13px;border:1px solid transparent;border-radius:9px;color:#e8eef8;text-decoration:none;background:none;cursor:pointer;font:inherit;transition:.2s}
.topbar nav>a:hover,.link-button:hover{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.08)}
.admin-badge{margin:0 5px;padding:5px 11px;border-radius:999px;background:rgba(255,255,255,.1);color:#bfcee2;font-size:12px}
.inline{display:inline;margin:0}
.container{max-width:1320px;margin:30px auto;padding:0 24px 46px}
.card{background:rgba(255,255,255,.96);border:1px solid rgba(214,225,238,.9);border-radius:18px;box-shadow:var(--shadow);padding:28px;margin-bottom:24px}
.title-row{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}
h1,h2,p{margin-top:0}
h1{font-size:27px;line-height:1.3;margin-bottom:5px;letter-spacing:-.02em}
h2{font-size:19px;line-height:1.35;margin-bottom:3px}
.muted{color:var(--muted)}
.eyebrow{display:block;margin-bottom:8px;color:#a9c8ff;font-size:11px;font-weight:700;letter-spacing:.16em}
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:0 18px;border:0;border-radius:10px;background:linear-gradient(135deg,var(--blue),var(--blue-2));box-shadow:0 8px 20px rgba(37,99,235,.2);color:#fff;text-decoration:none;cursor:pointer;font-weight:650;transition:transform .18s,box-shadow .18s,background .18s}
.btn:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(37,99,235,.28)}
.btn.secondary{background:#e9eff7;box-shadow:none;color:#253653}
.btn.light{background:#fff;box-shadow:0 10px 25px rgba(5,18,39,.14);color:#152540}
.btn.success{background:#159a67}.btn.warning{background:#d97706}.btn.danger{background:#d64545}
.btn.small{min-height:34px;padding:0 12px;border-radius:8px;font-size:13px;box-shadow:none}
.dashboard-hero,.edit-hero{display:flex;align-items:center;justify-content:space-between;gap:28px;margin-bottom:20px;padding:30px 34px;border-radius:20px;background:radial-gradient(circle at 78% 20%,rgba(71,125,221,.4),transparent 32%),linear-gradient(120deg,#101b30,#1b3155);box-shadow:0 20px 42px rgba(20,43,77,.2);color:#fff;overflow:hidden}
.dashboard-hero h1,.edit-hero h1{font-size:30px;margin:0 0 5px}.dashboard-hero p,.edit-hero p{margin:0;color:#b9c8dc}
.stats-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-bottom:20px}
.stat-card{position:relative;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;align-items:center;padding:20px 22px;border:1px solid #dde6f1;border-radius:16px;background:rgba(255,255,255,.9);box-shadow:0 10px 26px rgba(25,48,79,.06);overflow:hidden}
.stat-card:after{content:"";position:absolute;width:75px;height:75px;right:-24px;bottom:-32px;border-radius:50%;background:#eaf1ff}
.stat-card span{color:#5d6e84;font-weight:650}.stat-card strong{grid-row:1/3;grid-column:2;font-size:31px;line-height:1;color:#1e4f9d}.stat-card small{color:#95a2b4}
.list-card{padding:25px 26px}
.table-wrap{overflow:auto;border:1px solid #e3e9f1;border-radius:13px}
table{width:100%;border-collapse:collapse;background:#fff}
th,td{text-align:left;padding:15px 13px;border-bottom:1px solid #edf1f6;white-space:nowrap;vertical-align:middle}
tr:last-child td{border-bottom:0}tbody tr:hover{background:#fafcff}
th{color:#5e6c80;font-size:12px;font-weight:700;letter-spacing:.03em;background:#f5f8fc}
.id-badge{display:inline-flex;padding:4px 8px;border-radius:7px;background:#edf3fc;color:#2f5eaa;font-weight:700}
.platform-cell{display:flex;align-items:center;gap:11px}.platform-cell img{width:50px;height:50px;border:1px solid #e3e8ef;border-radius:11px;background:#fff;object-fit:contain;padding:2px}.platform-cell span{display:flex;flex-direction:column}.platform-cell small{color:var(--muted)}
.status{display:inline-block;border-radius:999px;padding:4px 10px;font-size:12px;font-weight:650}.status.on{background:#dcfce7;color:#15803d}.status.off{background:#fee2e2;color:#b91c1c}
.secret{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
.edit-hero{padding:26px 30px}.edit-hero h1{font-size:27px}
.platform-form-card{padding:0;overflow:hidden}
.platform-form-card>form{display:block}
.form-section{padding:30px 32px;border-bottom:1px solid #e8edf4}
.section-heading{display:flex;align-items:flex-start;gap:14px;margin-bottom:24px}
.section-heading p{margin:4px 0 0;color:var(--muted)}
.section-number{display:inline-flex;align-items:center;justify-content:center;flex:0 0 39px;height:39px;border-radius:11px;background:#eaf1ff;color:#2860bd;font-size:12px;font-weight:800}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 24px}
.field{display:flex;min-width:0;flex-direction:column;gap:7px}
.field.full{grid-column:1/-1}
.field>label:first-child{font-weight:650;color:#26364c}
.field input:not([type=checkbox]):not([type=file]),.field select,.field textarea{width:100%;border:1px solid #cfd9e6;border-radius:10px;padding:0 13px;background:#fff;color:#152238;transition:.18s}
.field input:not([type=checkbox]):not([type=file]),.field select{height:44px}
.field textarea{min-height:88px;padding-top:11px;resize:vertical}
.field input:focus,.field select:focus,.field textarea:focus{outline:none;border-color:#4c82dc;box-shadow:0 0 0 4px rgba(59,130,246,.1)}
.field input::placeholder,.field textarea::placeholder{color:#a4afbd}
.help{font-size:12px;color:#718096}
.password-control{position:relative}.password-control input{padding-right:62px!important}.password-control button{position:absolute;right:5px;top:5px;height:34px;padding:0 11px;border:0;border-radius:7px;background:#eef3f9;color:#38577f;cursor:pointer;font-size:12px}
.file-control{display:flex;min-height:46px;align-items:center;gap:12px;padding:7px 10px;border:1px dashed #c9d5e4;border-radius:10px;background:#f9fbfe}.file-control input{max-width:220px}.file-control span{color:#7c8999;font-size:12px}
.logo-preview-wrap{display:flex;align-items:center;gap:11px;margin-top:4px}.logo-preview-wrap span{color:#78869a;font-size:12px}.logo-preview{display:block;width:118px;height:58px;object-fit:contain;border:1px solid #e0e7ef;border-radius:9px;padding:6px;background:#fff}
.switch-row{display:flex!important;align-items:center;gap:12px;min-height:58px;padding:8px 0;cursor:pointer}.switch-row>input{position:absolute;opacity:0;pointer-events:none}.switch-ui{position:relative;flex:0 0 46px;width:46px;height:26px;border-radius:999px;background:#bec9d6;transition:.2s}.switch-ui:after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(15,23,42,.25);transition:.2s}.switch-row>input:checked+.switch-ui{background:#2f76e5}.switch-row>input:checked+.switch-ui:after{transform:translateX(20px)}.switch-copy{display:flex;flex-direction:column;line-height:1.35}.switch-copy strong{font-size:14px}.switch-copy small{margin-top:4px;color:#7c8998;font-weight:400}
.permission-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px 13px}.permission-grid label{display:flex;align-items:center;gap:8px;min-height:43px;padding:9px 11px;border:1px solid #e0e7f0;border-radius:9px;background:#fbfcfe;cursor:pointer}.permission-grid label:hover{border-color:#b9cbe5;background:#f6f9fd}.permission-grid input{accent-color:#2563eb}.permission-grid .permission-all{border-color:#bcd0ef;background:#eef5ff;color:#24569e}
.form-submit-bar{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:22px 32px;background:#f7f9fc}.form-submit-bar>div:first-child{display:flex;flex-direction:column}.form-submit-bar>div:first-child span{color:#77869a;font-size:12px}.actions{display:flex;gap:10px;align-items:center;margin-top:20px}.form-submit-bar .actions{margin:0}
.flash{padding:13px 16px;border-radius:10px;margin-bottom:18px}.flash.success{background:#dcfce7;color:#166534}.flash.error{background:#fee2e2;color:#991b1b}.error-box{background:#fee2e2;color:#991b1b;padding:13px 15px;border-radius:10px;margin:24px 32px 0}
.platform-login-page{position:relative;overflow:hidden;background:linear-gradient(150deg,#edf2f8,#f8fafc 48%,#e9f0f8)}
.platform-login-page:before{content:"";position:fixed;inset:0;pointer-events:none;background-image:linear-gradient(rgba(80,107,142,.055) 1px,transparent 1px),linear-gradient(90deg,rgba(80,107,142,.055) 1px,transparent 1px);background-size:32px 32px;mask-image:linear-gradient(to bottom,#000,transparent 85%)}
.platform-login-page:after{content:"";position:fixed;width:460px;height:460px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:50%;background:rgba(76,130,218,.12);filter:blur(85px);pointer-events:none}
.platform-login-page .container{position:relative;z-index:2;max-width:none;margin:0;padding:0}
.login-shell{display:flex;min-height:100vh;align-items:center;justify-content:center;padding:34px 20px}
.login-card{width:min(410px,100%);padding:38px 38px 28px;border:1px solid rgba(255,255,255,.85);border-radius:23px;background:rgba(255,255,255,.88);box-shadow:0 26px 70px rgba(22,44,76,.15);backdrop-filter:blur(18px);text-align:center}
.login-logo{display:flex;align-items:center;justify-content:center;width:104px;height:104px;margin:0 auto 20px;border:1px solid #e2e8f0;border-radius:25px;background:#fff;box-shadow:0 12px 30px rgba(31,65,110,.12)}.login-logo img{display:block;width:88px;height:88px;object-fit:contain}
.login-card h1{font-size:25px;margin-bottom:4px}.login-subtitle{margin:0;color:#7a8aa0;font-size:10px;font-weight:700;letter-spacing:.17em}.login-intro{margin:13px 0 25px;font-size:13px}
.login-field{gap:7px;margin-top:15px;text-align:left}.login-field>label:first-child{font-size:13px}.input-with-icon{display:flex;align-items:center;height:48px;border:1px solid #d5deea;border-radius:10px;background:#fff;overflow:hidden;transition:.18s}.input-with-icon:focus-within{border-color:#4c82dc;box-shadow:0 0 0 4px rgba(59,130,246,.1)}.input-with-icon span{flex:0 0 55px;text-align:center;color:#7b899a;font-size:12px;border-right:1px solid #e5eaf0}.input-with-icon input{height:46px!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:0 13px!important}
.login-actions{margin-top:24px}.login-actions .btn{width:100%;height:47px;border-radius:10px;background:linear-gradient(135deg,#16243c,#263c61);box-shadow:0 10px 24px rgba(18,35,59,.22)}.login-footer{margin-top:24px;padding-top:18px;border-top:1px solid #edf0f4;color:#a0aab8;font-size:11px;letter-spacing:.08em}
@media(max-width:900px){.topbar{padding:12px 18px;align-items:flex-start}.platform-brand span{display:none}.topbar nav{flex-wrap:wrap;justify-content:flex-end}.admin-badge{display:none}.container{margin:20px auto;padding:0 15px 34px}.dashboard-hero,.edit-hero{padding:24px}.stats-grid{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.permission-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.form-submit-bar{align-items:flex-start;flex-direction:column}.dashboard-hero,.edit-hero{align-items:flex-start;flex-direction:column}}
@media(max-width:560px){.platform-brand img{width:90px}.topbar nav>a,.link-button{padding:0 8px;font-size:12px}.card{padding:19px;border-radius:14px}.form-section{padding:24px 18px}.form-submit-bar{padding:20px 18px}.permission-grid{grid-template-columns:1fr}.login-card{padding:32px 24px 24px}.file-control{align-items:flex-start;flex-direction:column}.error-box{margin:18px 18px 0}}

/* 与岩牛牛正式后台一致的清爽管理界面 */
body:not(.platform-login-page){background:#f5f7fb;color:#111827}
body:not(.platform-login-page) .topbar{height:58px;min-height:58px;padding:0 max(24px,calc((100vw - 1320px)/2));background:rgba(255,255,255,.97);border-bottom:1px solid #e8edf3;box-shadow:0 10px 28px rgba(15,23,42,.06);backdrop-filter:blur(10px)}
body:not(.platform-login-page) .platform-brand{align-self:stretch;color:#111827}
body:not(.platform-login-page) .platform-brand img{width:40px;height:40px;border:1px solid #e2e8f0;border-radius:8px}
body:not(.platform-login-page) .platform-brand span{border-left:1px solid #e2e8f0}
body:not(.platform-login-page) .platform-brand strong{font-size:16px;color:#111827}
body:not(.platform-login-page) .platform-brand small{color:#64748b}
body:not(.platform-login-page) .topbar nav>a,body:not(.platform-login-page) .link-button{min-height:34px;padding:0 12px;color:#475569;font-weight:700}
body:not(.platform-login-page) .topbar nav>a:hover,body:not(.platform-login-page) .link-button:hover{background:#f2f5f9;border-color:transparent;color:#111827}
body:not(.platform-login-page) .admin-badge{background:#eef2f7;color:#475569}
body:not(.platform-login-page) .container{margin-top:24px}
body:not(.platform-login-page) .dashboard-hero,body:not(.platform-login-page) .edit-hero{padding:24px 28px;margin-bottom:16px;border:1px solid #e1e8f0;border-radius:10px;background:#fff;color:#111827;box-shadow:0 12px 30px rgba(15,23,42,.055)}
body:not(.platform-login-page) .dashboard-hero h1,body:not(.platform-login-page) .edit-hero h1{margin-bottom:4px;color:#111827;font-size:25px}
body:not(.platform-login-page) .dashboard-hero p,body:not(.platform-login-page) .edit-hero p{color:#64748b}
body:not(.platform-login-page) .edit-hero .eyebrow{margin-bottom:6px;color:#2563eb}
body:not(.platform-login-page) .btn{border-radius:6px;background:#2563eb;box-shadow:none}
body:not(.platform-login-page) .btn:hover{background:#1d4ed8;box-shadow:none}
body:not(.platform-login-page) .btn.light{background:#111827;color:#fff}
body:not(.platform-login-page) .btn.light:hover{background:#1f2937}
body:not(.platform-login-page) .btn.secondary{background:#eef2f7;color:#475569}
body:not(.platform-login-page) .btn.success{background:#16a36f}
body:not(.platform-login-page) .btn.warning{background:#d97706}
.stats-grid{gap:14px;margin-bottom:16px}
.stat-card{display:block;position:relative;min-height:104px;padding:18px 20px;border:1px solid #dbe7f3;border-radius:10px;background:#fff;box-shadow:none;overflow:visible}
.stat-card:after{content:"";position:absolute;z-index:1;top:19px;right:19px;bottom:auto;width:10px;height:10px;border-radius:50%;background:#3b82f6;box-shadow:0 0 0 6px #eff6ff}
.stat-card:nth-child(2):after{background:#10b981;box-shadow:0 0 0 6px #ecfdf5}
.stat-card:nth-child(3):after{background:#8b5cf6;box-shadow:0 0 0 6px #f5f3ff}
.stat-card span{display:block;padding-right:42px;color:#64748b;font-weight:700}
.stat-card strong{position:relative;z-index:2;display:inline-block;margin-top:8px;color:#0f172a;font-size:29px;line-height:1.05}
.stat-card small{display:inline-block;margin-left:7px;color:#94a3b8}
.list-card{padding:26px;border-radius:10px;box-shadow:0 12px 30px rgba(15,23,42,.055)}
.list-card .title-row{padding-bottom:18px;margin-bottom:0;border-bottom:1px solid #edf2f7}
.table-wrap{margin-top:18px;border-color:#e2e8f0;border-radius:8px}
th{background:#f8fafc;color:#64748b}
tbody tr:hover{background:#f8fbff}
@media(max-width:900px){body:not(.platform-login-page) .topbar{height:auto;min-height:58px;padding:9px 16px;align-items:center}body:not(.platform-login-page) .dashboard-hero,body:not(.platform-login-page) .edit-hero{padding:21px}.stat-card{min-height:94px}}
@media(max-width:560px){body:not(.platform-login-page) .platform-brand img{width:38px;height:38px}.stats-grid{gap:10px}.stat-card{padding:16px 18px}.list-card{padding:18px}}
.favicon-preview{display:flex;align-items:center;gap:10px;margin-top:8px;color:#64748b;font-size:12px}.favicon-preview img{width:36px;height:36px;padding:4px;border:1px solid #dbe4ef;border-radius:8px;background:#fff;object-fit:contain}
.global-settings-page .platform-form-card,.global-settings-page .edit-hero{max-width:1180px;margin-left:auto;margin-right:auto}.global-settings-page .field textarea[name=code_head],.global-settings-page .field textarea[name=code]{min-height:150px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px}
.list-actions{min-width:285px;flex-wrap:wrap}.btn.download-source{background:#2563eb}.btn.download-disabled{min-height:38px;padding:4px 12px;flex-direction:column;gap:0;background:#e5e7eb!important;color:#8b95a5!important;box-shadow:none!important;cursor:not-allowed;line-height:1.12}.btn.download-disabled:hover{transform:none}.btn.download-disabled small{font-size:10px;font-weight:600}
