:root{--bg:#f4f6fa;--panel:#fff;--text:#101828;--muted:#667085;--line:#e4e7ec;--accent:#111827;--danger:#c62828;--ok:#067647}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,"Microsoft YaHei",system-ui,sans-serif}
.admin-shell{display:grid;grid-template-columns:230px minmax(0,1fr);min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;padding:24px 16px;background:#fff;border-right:1px solid var(--line)}
.brand{padding:0 10px 22px;font-size:20px;font-weight:900}.nav{display:grid;gap:7px}.nav a{display:flex;align-items:center;gap:10px;padding:11px 13px;border-radius:11px;color:var(--muted);font-size:13px;font-weight:800;text-decoration:none}.nav a:hover,.nav a.active{background:#111827;color:#fff}
.main{padding:30px;min-width:0}.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:22px}.topbar h1{margin:0;font-size:28px}.muted{color:var(--muted);font-size:12px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:20px;margin-bottom:18px}.panel-head,.toolbar,.actions{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.panel h2{margin:0;font-size:17px}
.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.field{display:grid;gap:6px}.field label{font-size:12px;font-weight:800;color:var(--muted)}input,select,textarea{width:100%;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--text);font:inherit;padding:0 12px}input,select{height:42px}textarea{min-height:160px;padding:12px;resize:vertical}
button,.button{height:40px;padding:0 14px;border:0;border-radius:10px;background:var(--accent);color:#fff;font-weight:800;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}.secondary{background:#fff;color:var(--text);border:1px solid var(--line)}.danger{background:#fff;color:var(--danger);border:1px solid #fecaca}.ok{color:var(--ok)}.error{color:var(--danger)}.msg{min-height:20px;margin-top:10px;font-size:12px}
table{width:100%;border-collapse:collapse;margin-top:14px}th,td{padding:12px 9px;border-bottom:1px solid var(--line);text-align:left;font-size:12px;vertical-align:middle}th{color:var(--muted);font-size:11px}.table-wrap{overflow:auto}.search{max-width:320px}.inline{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.inline input{width:100px;height:36px}.inline button{height:36px;padding:0 10px}
.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.module-card{display:block;padding:22px;border:1px solid var(--line);border-radius:16px;background:#fff;color:var(--text);text-decoration:none}.module-card strong{display:block;font-size:17px;margin-bottom:7px}.team-card,.template-card,.model-row{padding:15px;border:1px solid var(--line);border-radius:14px;background:#fbfcfe;margin-top:12px}.team-members{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;max-height:220px;overflow:auto;margin:10px 0}.member-option{display:flex;align-items:center;gap:7px;padding:8px;border:1px solid var(--line);border-radius:9px;background:#fff;font-size:12px}.member-option input{width:16px;height:16px}.model-row{display:grid;grid-template-columns:minmax(180px,1.2fr) minmax(180px,1fr) 130px 110px;gap:10px;align-items:end}.model-row.video-price-row{grid-template-columns:minmax(180px,1.1fr) minmax(180px,1fr) minmax(360px,1.4fr) 110px}.resolution-prices{display:grid;grid-template-columns:repeat(3,minmax(100px,1fr));gap:8px}.model-id{font-size:12px;font-weight:800;word-break:break-all}.switch{display:flex;align-items:center;gap:8px;height:42px}.switch input{width:18px;height:18px}
.summary{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin:16px 0}.summary div{padding:14px;border:1px solid var(--line);border-radius:12px}.summary strong{display:block;font-size:22px;margin-top:5px}
@media(max-width:900px){.admin-shell{grid-template-columns:1fr}.sidebar{position:static;height:auto}.nav{grid-template-columns:repeat(3,1fr)}.main{padding:20px}.grid,.grid.two,.cards,.model-row,.model-row.video-price-row{grid-template-columns:1fr 1fr}.resolution-prices{grid-column:1/-1}.team-members{grid-template-columns:1fr 1fr}}@media(max-width:560px){.nav,.grid,.grid.two,.cards,.model-row,.model-row.video-price-row,.team-members,.summary,.resolution-prices{grid-template-columns:1fr}}
.model-row.video-price-row{grid-template-columns:minmax(180px,1.1fr) minmax(180px,1fr) minmax(420px,1.6fr) 110px}.resolution-prices{grid-template-columns:repeat(3,minmax(130px,1fr))}.resolution-price-item{display:grid;gap:4px}.resolution-switch{height:28px;font-size:12px}
@media(max-width:900px){.model-row.video-price-row{grid-template-columns:1fr 1fr}.resolution-prices{grid-column:1/-1}}@media(max-width:560px){.model-row.video-price-row,.resolution-prices{grid-template-columns:1fr}}

.sidebar .brand{line-height:1.2}
@media(max-width:980px){
  .admin-shell{display:block}
  .sidebar{position:sticky;top:0;z-index:20;width:100%;height:auto;border-right:0;border-bottom:1px solid var(--line);background:rgba(255,255,255,.96);backdrop-filter:blur(14px)}
  .sidebar .nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding-bottom:14px}
  .sidebar .nav a{text-align:center;justify-content:center}
  .main{padding:16px}
  .topbar{flex-direction:column;align-items:flex-start;gap:14px}
  .topbar .actions{width:100%;display:grid;grid-template-columns:1fr 1fr}
  .panel{padding:16px;border-radius:18px}
  .grid,.grid.two,.grid.three{grid-template-columns:1fr!important}
  .inline{flex-wrap:wrap}
}
@media(max-width:640px){
  .sidebar .nav{grid-template-columns:1fr}
  .topbar h1{font-size:24px}
  .table-wrap{overflow:auto}
  table{min-width:760px}
}
