:root { color-scheme: light; font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: #17231f; background: #eef2ef; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(280px, 1fr) minmax(360px, 520px); overflow: hidden; transition: grid-template-columns .72s cubic-bezier(.2,.8,.2,1); }
.brand-panel { min-width: 0; background: linear-gradient(145deg, #123d34, #235f4e); color: #fff; padding: clamp(38px, 8vw, 120px); display: flex; flex-direction: column; justify-content: center; transition: transform .72s cubic-bezier(.2,.8,.2,1), opacity .5s ease; }
.brand-mark { width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid #c4e0a6; border-radius: 50%; color: #e8f2dc; font-weight: 800; margin-bottom: 48px; }
.eyebrow { margin: 0 0 10px; color: #799e72; font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.brand-panel .eyebrow { color: #c4e0a6; }
h1 { max-width: 430px; margin: 0; font-size: clamp(3rem, 6vw, 5.8rem); letter-spacing: -.06em; }
.brand-copy { max-width: 360px; margin: 22px 0 0; color: #d8e8df; font-size: 1.1rem; line-height: 1.6; }
.login-panel { align-self: center; width: min(100%, 520px); padding: clamp(32px, 7vw, 72px); transition: width .72s cubic-bezier(.2,.8,.2,1); }
.login-layout.is-authenticated { grid-template-columns: 0 minmax(360px, 1fr); }
.login-layout.is-authenticated .brand-panel { opacity: 0; pointer-events: none; transform: translateX(-110%); }
.login-layout.is-authenticated .login-panel { width: min(100%, 1120px); margin-inline: auto; }
.login-layout.is-authenticated.is-production-workbench .login-panel { width: 100%; max-width: none; padding: 0; }
h2 { margin: 0; font-size: 2rem; letter-spacing: -.04em; }
.hint { color: #63736b; line-height: 1.55; margin: 12px 0 30px; }
form { display: grid; gap: 9px; }
label { font-size: .9rem; font-weight: 700; margin-top: 10px; }
input { min-height: 48px; border: 1px solid #cbd6ce; border-radius: 8px; padding: 0 13px; font: inherit; }
input:focus-visible { outline: 3px solid #c4e0a6; border-color: #276a54; }
.password-toggle { display: flex; align-items: center; gap: 9px; width: fit-content; margin-top: 5px; color: #52645a; cursor: pointer; font-size: .86rem; font-weight: 600; }
.password-toggle input { appearance: none; display: grid; place-content: center; width: 17px; min-height: 17px; height: 17px; margin: 0; padding: 0; border-radius: 4px; cursor: pointer; }
.password-toggle input::before { content: ''; width: 9px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) scale(0); }
.password-toggle input:checked { background: #1d604c; border-color: #1d604c; }
.password-toggle input:checked::before { transform: rotate(-45deg) scale(1); }
button { min-height: 48px; border: 0; border-radius: 8px; background: #1d604c; color: #fff; cursor: pointer; font: inherit; font-weight: 800; margin-top: 20px; }
button:hover { background: #174f3e; }
button:disabled { opacity: .65; cursor: wait; }
.secondary { background: #e0e9e2; color: #173c35; }
.error { margin: 12px 0 0; border-left: 3px solid #b92828; color: #8d1c1c; padding-left: 10px; line-height: 1.4; }
.workspace-home { padding: 4px 0 40px; }
.workspace-hero { position: relative; display: grid; grid-template-columns: minmax(260px, .88fr) minmax(280px, .72fr); justify-content: space-between; gap: 48px; overflow: hidden; min-height: 254px; padding: clamp(30px, 4vw, 54px); border-radius: 24px; color: #fff; background: linear-gradient(125deg, #0d4234 0%, #155c46 52%, #3f6042 100%); box-shadow: 0 18px 45px rgba(13, 63, 48, .18); }
.workspace-hero::before { content: ""; position: absolute; width: 360px; height: 360px; right: -110px; bottom: -225px; border: 1px solid rgba(221, 239, 211, .26); border-radius: 50%; box-shadow: 0 0 0 36px rgba(221, 239, 211, .08), 0 0 0 74px rgba(221, 239, 211, .05); }
.workspace-hero > * { position: relative; z-index: 1; }
.workspace-hero .eyebrow { color: #c6deac; }
.workspace-hero h2 { margin: 0; max-width: 620px; color: #fff; font-size: clamp(2.35rem, 4.4vw, 4.25rem); line-height: .98; letter-spacing: -.065em; }
.workspace-hero > p { align-self: end; max-width: 360px; margin: 0; color: #dbebe0; font-size: 1rem; line-height: 1.65; }
.warehouse-sections { display: grid; gap: 18px; margin: 20px 0; }
.warehouse-secondary-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.warehouse-card { position: relative; display: flex; align-items: center; gap: 20px; min-height: 152px; overflow: hidden; border: 1px solid #d8e0d9; border-radius: 18px; padding: 28px; color: inherit; text-decoration: none; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease; }
.warehouse-card:hover, .warehouse-card:focus-visible { transform: translateY(-4px); border-color: #4a806a; box-shadow: 0 16px 32px rgba(17, 55, 43, .12); outline: none; }
.production-card { min-height: 180px; color: #f8fcf8; border-color: #1b7559; background: linear-gradient(120deg, #126047 0%, #187959 100%); }
.production-card::after { content: ""; position: absolute; inset: auto -20px -62px auto; width: 240px; height: 170px; border: 1px solid rgba(229, 243, 222, .3); border-radius: 50% 50% 0 0; transform: rotate(-18deg); }
.production-card:hover, .production-card:focus-visible { border-color: #d3e5bd; background: linear-gradient(120deg, #0e513e 0%, #187959 100%); box-shadow: 0 18px 38px rgba(14, 81, 62, .23); }
.finished-card { background: #f5f8f3; }
.dry-card { background: #f4f0e7; }
.card-number { align-self: flex-start; flex: 0 0 auto; color: #8ba396; font-size: .75rem; font-weight: 850; letter-spacing: .11em; line-height: 1; }
.production-card .card-number { color: #c8e3b6; }
.card-content { display: grid; gap: 8px; flex: 1; }
.card-content strong { font-size: clamp(1.2rem, 1.8vw, 1.65rem); letter-spacing: -.04em; }
.card-content span, .section-note { color: #64766b; font-size: .94rem; line-height: 1.5; }
.production-card .card-content span { color: #d9eadf; }
.card-arrow { position: relative; z-index: 1; align-self: flex-end; color: #2e6a55; font-size: 1.65rem; line-height: 1; transition: transform .22s ease; }
.production-card .card-arrow { color: #e1f0d8; }
.warehouse-card:hover .card-arrow, .warehouse-card:focus-visible .card-arrow { transform: translate(3px, -3px); }
.section-note { display: flex; align-items: center; gap: 9px; margin: 0; font-size: .82rem; }
.section-note span { width: 28px; height: 1px; background: #93aa9b; }
.build-version { margin: 22px 0 0; color: #7a8d82; font-size: .72rem; font-variant-numeric: tabular-nums; text-align: right; }
.account-header { display: flex; min-height: 70px; justify-content: space-between; gap: 18px; align-items: center; padding: 4px 0 26px; }
.app-brand { display: flex; align-items: center; gap: 12px; color: #264e40; font-size: .72rem; font-weight: 850; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
.app-brand img { display: block; width: 82px; height: 30px; object-fit: contain; object-position: left center; }
.personnel-dialog { width: min(720px, calc(100vw - 32px)); max-height: min(700px, calc(100dvh - 32px)); overflow: auto; border: 0; border-radius: 16px; padding: 0; color: #173c35; background: #fff; box-shadow: 0 24px 70px rgba(15, 53, 41, .26); }
.personnel-dialog::backdrop { background: rgba(13, 42, 33, .44); backdrop-filter: blur(5px); }
.personnel-dialog__header { display: flex; justify-content: space-between; gap: 18px; padding: 20px 24px 17px; border-bottom: 1px solid #deeadf; background: #f6faf5; }
.personnel-dialog__header .eyebrow { margin: 0 0 5px; color: #47765d; font-size: .68rem; }
.personnel-dialog__header h2 { margin: 0; font-size: clamp(1.45rem, 4vw, 1.85rem); letter-spacing: -.045em; }
.personnel-dialog__header p:not(.eyebrow) { margin: 5px 0 0; color: #60746a; font-size: .84rem; line-height: 1.4; }
.personnel-dialog .dialog-close { position: relative; flex: 0 0 auto; width: 34px; height: 34px; min-height: 34px; margin: 0; padding: 0; border: 0; border-radius: 9px; background: #1d604c; }
.personnel-dialog .dialog-close:hover { background: #174f3e; }
.personnel-dialog .dialog-close::before, .personnel-dialog .dialog-close::after { position: absolute; top: 9px; left: 16px; width: 2px; height: 16px; border-radius: 2px; background: #c4e0a6; content: ""; }
.personnel-dialog .dialog-close::before { transform: rotate(45deg); }
.personnel-dialog .dialog-close::after { transform: rotate(-45deg); }
.personnel-add { display: grid; grid-template-columns: minmax(0, 1fr) 145px auto; gap: 10px; align-items: end; margin: 16px 24px 0; padding: 12px; border: 1px solid #d5e4d8; border-radius: 10px; background: #f8fbf8; }
.personnel-add label, .personnel-row label { display: grid; gap: 6px; margin: 0; color: #4c6759; font-size: .77rem; font-weight: 800; letter-spacing: .02em; }
.personnel-add input, .personnel-add select, .personnel-row input, .personnel-row select { width: 100%; min-height: 42px; margin: 0; }
.personnel-add select, .personnel-row select { appearance: none; border: 1px solid #cbd6ce; border-radius: 8px; padding: 0 36px 0 13px; color: #173c35; background-color: #fff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M2 2l6 6 6-6' fill='none' stroke='%233e6855' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; font: inherit; }
.personnel-add select:focus-visible, .personnel-row select:focus-visible { outline: 3px solid #c4e0a6; border-color: #276a54; }
.personnel-add button { min-height: 42px; margin: 0; padding-inline: 17px; }
.personnel-message { margin: 12px 24px 0; padding: 9px 11px; border-radius: 8px; color: #3c624a; background: #e7f2e8; font-size: .82rem; line-height: 1.35; }
.personnel-message[data-type="error"] { color: #934337; background: #fae9e5; }
.personnel-list { display: grid; gap: 16px; padding: 18px 24px 24px; }
.personnel-group h3 { margin: 0 0 5px; color: #315d49; font-size: .76rem; letter-spacing: .07em; text-transform: uppercase; }
.personnel-row { display: grid; grid-template-columns: minmax(0, 1fr) 132px auto; gap: 10px; align-items: end; padding: 9px 0; border-top: 1px solid #e5ede7; }
.personnel-row__actions { display: flex; gap: 6px; align-items: center; min-height: 38px; }
.personnel-row__actions .secondary, .personnel-remove { min-height: 38px; margin: 0; padding: 0 10px; font-size: .78rem; white-space: nowrap; }
.personnel-remove { color: #a04939; border: 1px solid #efd3cc; border-radius: 8px; background: #fff7f4; }
.personnel-remove:hover { background: #fae9e5; }
.personnel-empty { margin: 0; padding: 15px 0; color: #718178; font-size: .9rem; }
.personnel-archive { padding-top: 4px; }
.personnel-row.is-archived { opacity: .68; }
.personnel-archived { color: #6a7f71; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.account-compact { display: flex; align-items: center; gap: 9px; padding: 5px 6px 5px 5px; border: 1px solid #d7e1d9; border-radius: 999px; background: rgba(255, 255, 255, .72); }
.account-avatar { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: #fff; background: #1d604c; font-size: .9rem; font-weight: 850; }
.account-identity { display: grid; gap: 1px; min-width: 0; }
.account-identity b { max-width: 300px; overflow: hidden; color: #173c35; font-size: .92rem; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.account-identity small { color: #718178; font-size: .74rem; }
.logout { flex: 0 0 auto; min-height: 36px; margin: 0 0 0 5px; padding: 0 13px; font-size: .82rem; }
.login-layout.is-production-workbench .account-header { display: none; }
.master-workbench-frame { display: block; width: 100%; min-height: 100vh; border: 0; border-radius: 0; background: #f5f7f3; }

/* Компактная главная страница в стиле производственного интерфейса. */
.login-layout { grid-template-columns:minmax(280px, .9fr) minmax(360px, 1fr); transition:none; }
.brand-panel { padding:clamp(32px,6vw,80px); background:linear-gradient(112deg,#0c3c31 0%,#126345 70%,#1d7e5c 100%); transition:none; }
.brand-mark { margin-bottom:28px; border-radius:14px; }
.brand-panel h1 { font-size:clamp(42px,5vw,64px); }
.login-panel { width:100%; max-width:520px; margin:auto; padding:40px; transition:none; }
#loginView { padding:28px; border:1px solid #d9e3da; border-radius:16px; background:white; }
#login-title { font-size:28px; }
#loginForm button { font-weight:600; }
.login-layout.is-authenticated { display:block; }
.login-layout.is-authenticated .brand-panel { display:none; }
.login-layout.is-authenticated .login-panel { width:100%; max-width:none; padding:0; }
.account-header { padding:20px max(24px,calc((100vw - 1120px)/2)); background:linear-gradient(112deg,#0c3c31 0%,#126345 70%,#1d7e5c 100%); }
.app-brand { color:#d8eee1; font-weight:600; }
.account-compact { border-radius:12px; border-color:rgba(203,239,218,.42); background:rgba(7,49,37,.2); padding:8px; }
.account-identity b { color:white; font-weight:600; }
.account-identity small { color:#c6e8d2; }
.account-avatar { background:#d8f0df; color:#13513e; }
.workspace-home { max-width:1168px; margin:auto; padding:28px 24px; }
.workspace-hero { display:block; min-height:0; padding:0; margin-bottom:24px; color:#17231f; background:none; box-shadow:none; border-radius:0; overflow:visible; }
.workspace-hero::before,.production-card::after { content:none; }
.workspace-hero .eyebrow { color:#63736b; }
.workspace-hero h2 { color:#18332b; font-size:32px; line-height:1.2; letter-spacing:-.035em; }
.workspace-hero > p { position:static; max-width:none; margin:8px 0 0; color:#63736b; line-height:1.5; }
.warehouse-sections { gap:12px; margin:0 0 20px; }
.warehouse-secondary-cards { gap:12px; }
.warehouse-card { min-height:120px; padding:24px; border-radius:14px; gap:16px; transition:background .15s ease,border-color .15s ease; }
.production-card { min-height:136px; }
.card-content strong { font-size:20px; font-weight:650; letter-spacing:-.02em; }
.card-content span { font-size:14px; }
.card-number { align-self:center; font-weight:600; }
.card-arrow { align-self:center; }
.warehouse-card:hover,.warehouse-card:focus-visible { transform:none; box-shadow:none; }
.warehouse-card:focus-visible,.home-resources a:focus-visible,button:focus-visible { outline:3px solid #4a806a; outline-offset:3px; }
.home-resources { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:20px; }
.home-resources a { display:grid; gap:7px; padding:18px 20px; border:1px solid #d9e3da; border-radius:12px; background:white; color:#18332b; text-decoration:none; }
.home-resources strong { display:flex; justify-content:space-between; gap:12px; font-size:15px; font-weight:600; }
.home-resources a > span { color:#63736b; font-size:13px; line-height:1.5; }
.home-resources a:hover { background:#f5f8f3; }

@media (max-width: 860px) { .workspace-hero { grid-template-columns: 1fr; gap: 22px; } .workspace-hero > p { max-width: 530px; } }
@media (max-width: 760px) { .login-layout, .login-layout.is-authenticated { grid-template-columns: 1fr; } .brand-panel { min-height: 260px; padding: 40px 28px; } .login-layout.is-authenticated .brand-panel { display: none; } .brand-mark { margin-bottom: 28px; } h1 { font-size: 3.4rem; } .login-panel { padding: 42px 28px 60px; } .account-header { align-items: stretch; flex-direction: column; padding-bottom: 18px; } .app-brand { justify-content: space-between; } .account-compact { width: 100%; } .account-identity b { max-width: calc(100vw - 150px); } .logout { width: fit-content; } .workspace-home { padding-bottom: 20px; } .workspace-hero { min-height: 258px; padding: 30px 26px; border-radius: 8px; } .workspace-hero h2 { font-size: clamp(2.35rem, 12vw, 3.4rem); } .workspace-hero > p { position: relative; right: auto; bottom: auto; margin-top: 20px; } .warehouse-sections { grid-template-columns: 1fr; } .warehouse-secondary-cards { grid-template-columns: 1fr; } .warehouse-card { min-height: 128px; padding: 24px; border-radius: 16px; } .production-card { min-height: 174px; padding: 26px; } .personnel-dialog { width: min(100vw - 20px, 620px); max-height: calc(100dvh - 20px); border-radius: 16px; } .personnel-dialog__header { gap: 14px; padding: 24px 20px 20px; } .personnel-add { grid-template-columns: 1fr; margin: 18px 20px 0; padding: 14px; } .personnel-list { gap: 18px; padding: 20px; } .personnel-message { margin-inline: 20px; } .personnel-row { grid-template-columns: 1fr; gap: 10px; } .personnel-row__actions { justify-content: flex-end; } }
@media (prefers-reduced-motion: reduce) { .login-layout, .brand-panel, .login-panel, .warehouse-card, .card-arrow { transition: none; } .warehouse-card:hover, .warehouse-card:focus-visible { transform: none; } }
@media (max-width:760px) {
  .brand-panel { min-height:0; padding:28px; }
  .brand-mark { margin-bottom:18px; }
  .brand-panel h1 { font-size:38px; }
  .brand-copy { margin-top:10px; font-size:15px; }
  .login-panel { padding:24px 16px; }
  #loginView { padding:24px; }
  .account-header { padding:18px 20px; }
  .workspace-home { padding:24px 16px; }
  .workspace-hero { min-height:0; padding:0; }
  .workspace-hero h2 { font-size:28px; }
  .workspace-hero > p { margin-top:8px; }
  .home-resources { grid-template-columns:1fr; }
  .warehouse-card,.production-card { min-height:112px; padding:20px; }
  .account-identity { flex:1; }
}
