*{box-sizing:border-box}body{font-family:var(--font,Inter,Arial,Helvetica,sans-serif);margin:0;background:#f3f6fb;color:#162033}a{color:var(--accent,#2563eb);text-decoration:none}a:hover{text-decoration:underline}.topbar,header{position:sticky;top:0;z-index:10;background:var(--header,#101828);color:white;padding:12px 22px;display:flex;justify-content:space-between;align-items:center;box-shadow:0 2px 16px #0002}.topbar a,header a{color:white;text-decoration:none;margin-left:14px;font-weight:700;font-size:14px}.brand{display:flex;align-items:center;gap:10px}.brand img{height:34px;max-width:160px;object-fit:contain;background:white;border-radius:8px;padding:2px}main{max-width:1240px;margin:24px auto;padding:0 18px}.wide{max-width:1600px}.hero{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px;background:linear-gradient(135deg,#fff,#eef5ff);border:1px solid #e1e8f5;border-radius:22px;box-shadow:0 12px 36px #1233} .eyebrow{text-transform:uppercase;letter-spacing:.08em;font-size:12px;color:#64748b;font-weight:800;margin:0 0 8px}.hero h1{font-size:38px;margin:0}.hero-btn{white-space:nowrap}.login-page{display:grid;min-height:100vh;place-items:center;background:radial-gradient(circle at top left,#dbeafe,#f8fafc 45%,#eef2ff)}.login-card{background:white;width:420px;max-width:92vw;padding:30px;border-radius:22px;box-shadow:0 24px 70px #0002}.language-switch{text-align:right}.language-switch a{margin-left:10px;font-weight:800}.login-logo{max-height:76px;max-width:260px;display:block;margin:0 auto 16px}.title-row{display:flex;justify-content:space-between;align-items:center;gap:12px}.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:18px 0}.stat-card,.card,.panel{background:white;border:1px solid #e2e8f0;border-radius:18px;padding:18px;box-shadow:0 10px 28px #0f172a0d}.stat-card small{color:#64748b;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.stat-card strong{display:block;font-size:34px;margin-top:8px}.warn{border-left:6px solid #f7c948}.danger{border-left:6px solid #e11d48}.filters.modern,.filters{display:grid;grid-template-columns:2fr 1fr 1fr 1fr auto auto;gap:10px;background:white;border:1px solid #e2e8f0;border-radius:18px;padding:12px;margin:18px 0;box-shadow:0 8px 24px #0f172a0a}input,select,textarea{width:100%;padding:11px;border:1px solid #cbd5e1;border-radius:12px;background:white;font:inherit}input[type=color]{padding:3px;height:44px}textarea{min-height:110px}label{display:block;margin:10px 0;font-weight:700}button,.button{display:inline-flex;align-items:center;justify-content:center;background:var(--accent,#2563eb);color:white;border:0;border-radius:12px;padding:10px 15px;text-decoration:none;font-weight:800;cursor:pointer}.secondary{background:#64748b}.danger-button{background:#e11d48}.small{padding:7px 11px;font-size:12px}.view-switch{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:8px 0 18px}.chip{background:white;border:1px solid #cbd5e1;border-radius:999px;padding:8px 12px;color:#172033;font-weight:800}.chip.active{background:var(--accent,#2563eb);color:white;border-color:var(--accent,#2563eb)}.doc-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.doc-card{background:white;border:1px solid #e2e8f0;border-radius:20px;padding:18px;box-shadow:0 12px 32px #0f172a0d;display:flex;flex-direction:column;gap:10px}.doc-card-head{display:flex;justify-content:space-between;align-items:center}.file-icon{display:inline-flex;width:54px;height:54px;border-radius:16px;align-items:center;justify-content:center;background:#eef4ff;color:#1d4ed8;font-weight:900;font-size:13px}.doc-card h2{font-size:19px;margin:2px 0}.file-name{word-break:break-all}.meta{display:grid;gap:6px;font-size:13px;color:#475569}.tags{color:#1d4ed8;font-weight:700}.doc-actions{display:flex;gap:8px;margin-top:auto;flex-wrap:wrap}.compact-list{display:grid;gap:10px}.compact-row{display:grid;grid-template-columns:60px 1fr auto;align-items:center;gap:12px;background:white;border:1px solid #e2e8f0;border-radius:16px;padding:12px;color:#172033}.compact-row small{display:block;color:#64748b}.empty-state{text-align:center;background:white;border:1px dashed #cbd5e1;border-radius:20px;padding:38px}.table-wrap{overflow:auto;border-radius:18px}table{width:100%;border-collapse:collapse;background:white;border-radius:18px;overflow:hidden;box-shadow:0 8px 24px #0f172a0a;margin:14px 0}th,td{text-align:left;border-bottom:1px solid #e6eaf2;padding:13px;vertical-align:top}th{background:#eef4ff}.badge{display:inline-block;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:900}.green{background:#dcfce7;color:#166534}.yellow{background:#fef9c3;color:#854d0e}.red{background:#fee2e2;color:#991b1b}.checks{display:flex;flex-wrap:wrap;gap:12px}.checks label,.mini{font-weight:600;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:9px}.checks input,.mini input{width:auto}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.inline{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.inline input,.inline select{width:auto;min-width:180px}.alert,.notice{padding:12px;border-radius:12px;margin:10px 0}.alert.ok{background:#dcfce7;color:#166534}.alert.error{background:#fee2e2;color:#991b1b}.notice{background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a}.muted{color:#64748b}.detail-panel p{margin:10px 0}footer{margin:28px 0;color:#64748b;text-align:center}.preview-box{background:white;border:1px solid #e6eaf2;border-radius:18px;padding:12px;box-shadow:0 8px 24px #0f172a0a;text-align:center}.preview-image{max-width:100%;max-height:78vh;object-fit:contain}.preview-frame{width:100%;height:78vh;border:1px solid #e6eaf2;border-radius:18px;background:white}.onlyoffice-frame{width:100%;height:780px;background:white;border:1px solid #e6eaf2;border-radius:18px;overflow:hidden}.preview-text{white-space:pre-wrap;background:#0f172a;color:#e2e8f0;border-radius:18px;padding:16px;overflow:auto;max-height:78vh}@media(max-width:1050px){.doc-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.filters.modern,.filters{grid-template-columns:1fr 1fr}.grid{grid-template-columns:1fr 1fr}}@media(max-width:720px){main{margin:14px auto;padding:0 12px}.topbar,header{position:static;display:block;padding:14px}.topbar nav,header nav{margin-top:10px;display:flex;gap:8px;flex-wrap:wrap}.topbar a,header a{margin:0;background:#ffffff1a;padding:7px 9px;border-radius:9px}.hero{display:block;padding:18px}.hero h1{font-size:30px}.hero-btn{margin-top:12px;width:100%}.stat-grid,.doc-grid,.filters.modern,.filters,.grid{grid-template-columns:1fr}.compact-row{grid-template-columns:50px 1fr}.compact-row .badge{grid-column:2}.title-row{display:block}.title-row .button{margin:4px 0}.login-card{padding:24px}.preview-frame,.onlyoffice-frame{height:68vh}}

/* v1.4 production polish */
body{background:#f3f6fb;background-image:linear-gradient(rgba(243,246,251,var(--page-overlay,.88)),rgba(243,246,251,var(--page-overlay,.88))),var(--page-bg-image);background-size:cover;background-position:center;background-attachment:fixed}.login-page{background-image:linear-gradient(rgba(248,250,252,var(--login-overlay,.72)),rgba(238,242,255,var(--login-overlay,.72))),var(--login-bg-image),radial-gradient(circle at top left,#dbeafe,#f8fafc 45%,#eef2ff);background-size:cover;background-position:center}.admin-page,.settings-page{padding-bottom:80px}.compact-hero{padding:20px 24px;margin-bottom:16px}.admin-stats{grid-template-columns:repeat(4,1fr)}.admin-nav{position:sticky;top:62px;z-index:9;display:flex;gap:10px;flex-wrap:wrap;margin:16px 0;padding:10px;background:#ffffffd9;backdrop-filter:blur(8px);border:1px solid #e2e8f0;border-radius:18px;box-shadow:0 8px 24px #0f172a0a}.admin-nav a{font-weight:900;background:#f8fafc;border:1px solid #e2e8f0;border-radius:999px;padding:9px 13px;color:#172033}.admin-section{scroll-margin-top:130px;margin:24px 0}.section-title{display:flex;align-items:end;justify-content:space-between;gap:12px;margin:0 0 10px}.section-title h2{margin-bottom:4px}.admin-cards{display:grid;grid-template-columns:1fr;gap:14px}.admin-cards.two-col{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-card{margin:0}.user-card .card-head,.card-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.admin-add{margin-bottom:14px}.settings-panel{margin-bottom:22px}.grid.two{grid-template-columns:repeat(2,1fr)}.preview-page{overflow:hidden}.preview-topbar{height:52px}.preview-main{max-width:none;width:100%;height:calc(100vh - 52px);margin:0;padding:10px 14px;display:flex;flex-direction:column;gap:10px}.preview-header{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:10px 16px;flex:0 0 auto;border-radius:16px}.preview-header h1{margin:0;font-size:24px}.preview-header p{margin:4px 0}.fullscreen{flex:1 1 auto;min-height:0}.preview-box.fullscreen{display:flex;align-items:center;justify-content:center;height:100%;padding:6px}.preview-image{max-width:100%;max-height:100%;object-fit:contain}.preview-frame.fullscreen,.onlyoffice-frame.fullscreen{height:auto;flex:1 1 auto;border-radius:16px}.onlyoffice-frame.fullscreen{min-height:0}.preview-text.fullscreen{max-height:none;height:auto;flex:1 1 auto}.preview-open{position:absolute;right:22px;bottom:14px;background:white;border-radius:999px;padding:7px 12px;box-shadow:0 8px 24px #0f172a22}@media(max-width:1050px){.admin-stats{grid-template-columns:repeat(2,1fr)}.admin-cards.two-col{grid-template-columns:1fr}.admin-nav{top:0}.preview-page{overflow:auto}.preview-main{height:auto;min-height:calc(100vh - 52px)}.preview-frame.fullscreen,.onlyoffice-frame.fullscreen{height:76vh;min-height:640px}.preview-header{display:block}.preview-header .doc-actions{margin-top:10px}}@media(max-width:720px){.admin-stats,.grid.two{grid-template-columns:1fr}.section-title{display:block}.admin-nav{position:static}.preview-frame.fullscreen,.onlyoffice-frame.fullscreen{height:72vh;min-height:520px}.preview-header h1{font-size:20px}}
.current-version-card{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px;border:1px solid var(--border,#d0d7e2);border-radius:16px;background:rgba(255,255,255,.78);margin-bottom:14px}.compact-title{margin-bottom:8px}.button.small{padding:7px 10px;font-size:13px}@media(max-width:760px){.current-version-card{align-items:flex-start;flex-direction:column}.doc-actions{display:flex;flex-wrap:wrap;gap:8px}}
