:root{
  --bg:#f7f5ed;
  --bg2:#eef5e7;
  --paper:#fffdf7;
  --paper2:#fbf8ec;
  --text:#17331f;
  --muted:#66735f;
  --green:#245b39;
  --green2:#6ca56b;
  --gold:#d99a3d;
  --gold2:#f3c36f;
  --line:rgba(23,51,31,.12);
  --danger:#b42318;
  --ok:#1f7a3f;
  --shadow:0 24px 70px rgba(32,63,43,.11);
  --softshadow:0 12px 30px rgba(32,63,43,.08);
  --radius:22px;
  --white: #fff;
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  font-family:Arial,Helvetica,sans-serif;
  background:
    linear-gradient(180deg,rgba(247,245,237,.08),var(--bg) 560px),
    radial-gradient(circle at 12% 0%,rgba(108,165,107,.22),transparent 380px),
    radial-gradient(circle at 88% 5%,rgba(217,154,61,.18),transparent 380px),
    var(--bg);
  color:var(--text);
}

a{
  color:var(--green);
  text-decoration:none;
}

.topbar{
  min-height:74px;
  padding:12px 28px;
  background:rgba(255,253,247,.9);
  backdrop-filter:blur(16px);
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  position:sticky;
  top:0;
  z-index:10;
}

.brand{
  display:flex;
  align-items:center;
  gap:14px;
}

.brand-logo{
  width:44px;
  height:44px;
  border-radius:16px;
  background:linear-gradient(135deg,var(--green),var(--green2));
  box-shadow:0 12px 30px rgba(36,91,57,.22);
  display:grid;
  place-items:center;
  color:#fff;
  font-size:22px;
}

.brand-title{
  font-weight:900;
  letter-spacing:.02em;
}

.brand-sub{
  display:block;
  color:var(--muted);
  font-size:13px;
  margin-top:2px;
}

.top-actions{
  display:flex;
  align-items:center;
  gap:12px;
}

.user-pill{
  padding:9px 12px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:var(--muted);
  font-size:13px;
}

.layout{
  display:grid;
  grid-template-columns:272px 1fr;
  min-height:calc(100vh - 74px);
}

.sidebar{
  padding:22px;
  background:linear-gradient(180deg,#eef5e7,#f8f5ea);
  border-right:1px solid var(--line);

  scrollbar-width:none;
  -ms-overflow-style:none;
}

.sidebar::-webkit-scrollbar{
  width:0;
  height:0;
  display:none;
}

.sidebar::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-thumb{
  background:transparent;
}

.side-card{
  padding:18px;
  border:1px solid var(--line);
  border-radius:24px;
  background:rgba(255,253,247,.72);
  box-shadow:var(--softshadow);
  margin-bottom:18px;
}

.side-card strong{
  display:block;
  font-size:15px;
}

.side-card span{
  display:block;
  color:var(--muted);
  font-size:13px;
  margin-top:6px;
  line-height:1.4;
}

.nav a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border-radius:16px;
  color:var(--text);
  margin-bottom:7px;
  font-weight:700;
}

.nav a:hover,
.nav a.active{
  background:#fff;
  box-shadow:0 10px 24px rgba(32,63,43,.08);
  color:var(--green);
}

.content{
  padding:34px;
  min-width:0;
  max-width:1500px;
  width:100%;
}

.page-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:22px;
}

.eyebrow{
  text-transform:uppercase;
  letter-spacing:.14em;
  color:var(--gold);
  font-weight:900;
  font-size:12px;
  margin-bottom:8px;
}

.lead{
  color:var(--muted);
  font-size:16px;
  max-width:740px;
  line-height:1.55;
  margin:-12px 0 24px;
}

h1{
  margin:0 0 24px;
  font-size:36px;
  line-height:1.05;
  letter-spacing:-.03em;
}

h2{
  margin:28px 0 14px;
  font-size:22px;
  letter-spacing:-.02em;
}

.stats-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;
  margin-bottom:24px;
}

.stat-card,
.panel,
.form-card,
.auth-card{
  background:linear-gradient(180deg,var(--paper),var(--paper2));
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}

.stat-card{
  padding:22px;
  position:relative;
  overflow:hidden;
}

.stat-card:after{
  content:"";
  position:absolute;
  right:-24px;
  top:-26px;
  width:92px;
  height:92px;
  border-radius:50%;
  background:rgba(217,154,61,.13);
}

.stat-card div{
  color:var(--muted);
  font-size:14px;
  font-weight:700;
}

.stat-card strong{
  display:block;
  margin-top:8px;
  font-size:34px;
}

.panel{
  padding:22px;
  margin-bottom:22px;
  overflow:auto;
}

.panel.hero-panel{
  padding:28px;
  background:
    linear-gradient(135deg,rgba(36,91,57,.96),rgba(44,117,71,.9)),
    radial-gradient(circle at 85% 0%,rgba(217,154,61,.4),transparent 360px);
  color:#fff;
}

.hero-panel h1,
.hero-panel .lead{
  color:#fff;
}

.hero-panel .eyebrow{
  color:var(--gold2);
}

table{
  width:100%;
  border-collapse:collapse;
}

th,
td{
  padding:13px 12px;
  border-bottom:1px solid var(--line);
  text-align:left;
  font-size:14px;
  vertical-align:top;
}

th{
  color:var(--muted);
  font-weight:900;
}

.status{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:#edf5e8;
  color:var(--green);
  font-weight:800;
  font-size:12px;
}

.status.approved,
.status.closed{
  background:#e8f7ed;
  color:#16733a;
}

.status.rejected{
  background:#fff0ed;
  color:var(--danger);
}

.status.draft{
  background:#f4efe4;
  color:#8a5b17;
}

.form-card{
  padding:24px;
  margin-bottom:20px;
}

.form-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
}

label{
  display:block;
  font-size:14px;
  color:var(--muted);
  font-weight:700;
  margin-bottom:14px;
}

input,
select,
textarea{
  width:100%;
  margin-top:7px;
  padding:13px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  color:var(--text);
  font:inherit;
  outline:none;
}

input:focus,
select:focus,
textarea:focus{
  border-color:rgba(36,91,57,.45);
  box-shadow:0 0 0 4px rgba(36,91,57,.08);
}

textarea{
  resize:vertical;
}

button,
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:0;
  border-radius:14px;
  background:linear-gradient(135deg,var(--green),#1f7040);
  color:#fff;
  padding:12px 18px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 12px 24px rgba(36,91,57,.18);
}

.btn.muted,
button.muted{
  background:#fff;
  color:var(--green);
  border:1px solid var(--line);
  box-shadow:var(--softshadow);
}

.btn.gold,
button.gold{
  background:linear-gradient(135deg,var(--gold),#c38324);
  color:#fff;
}

.btn.danger,
button.danger{
  background:linear-gradient(135deg,#c24135,#93251d);
  color:#fff;
}

button:hover,
.btn:hover{
  filter:brightness(.98);
  transform:translateY(-1px);
}

.actions{
  display:flex;
  gap:12px;
  margin-top:20px;
  flex-wrap:wrap;
}

.total-box{
  margin:22px 0;
  padding:20px;
  border-radius:18px;
  background:linear-gradient(135deg,#eef5e7,#fff8e8);
  border:1px solid var(--line);
  font-size:20px;
}

.alert{
  padding:14px 16px;
  border-radius:16px;
  margin-bottom:18px;
  font-weight:700;
}

.alert-error{
  background:#fff0ed;
  color:var(--danger);
  border:1px solid rgba(180,35,24,.2);
}

.alert-ok{
  background:#eefaf1;
  color:var(--ok);
  border:1px solid rgba(31,122,63,.2);
}

.auth-page{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
  background:
    linear-gradient(135deg,rgba(36,91,57,.92),rgba(30,79,47,.88)),
    radial-gradient(circle at 82% 12%,rgba(217,154,61,.35),transparent 420px),
    url('/assets/farm-bg.svg');
  background-size:cover;
}

.auth-card{
  width:100%;
  max-width:460px;
  padding:32px;
}

.brand-mark{
  width:58px;
  height:58px;
  border-radius:20px;
  background:linear-gradient(135deg,var(--green),var(--green2));
  display:grid;
  place-items:center;
  color:#fff;
  font-size:29px;
  margin-bottom:14px;
}

.auth-card h1{
  margin-bottom:8px;
}

.auth-card p,
.auth-card small{
  color:var(--muted);
}

.auth-card button{
  width:100%;
  margin-top:18px;
}

.filters{
  display:grid;
  grid-template-columns:1fr 260px auto;
  gap:12px;
  margin-bottom:20px;
}

.details{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
}

.details div{
  padding:16px;
  border-radius:18px;
  background:#f6f8ef;
  border:1px solid var(--line);
}

.details span{
  display:block;
  color:var(--muted);
  font-size:13px;
  font-weight:800;
}

.details strong{
  display:block;
  margin-top:6px;
}

.notice-flow{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
}

.notice-flow div{
  padding:16px;
  border-radius:18px;
  background:#fff;
  border:1px solid var(--line);
}

pre{
  background:#f5f7ef;
  padding:14px;
  border-radius:12px;
  overflow:auto;
}

.small-muted{
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
}

@media(max-width:1100px){
  .layout{
    grid-template-columns:1fr;
  }

  .sidebar{
    display:block;
    border-right:0;
    border-bottom:1px solid var(--line);
  }

  .nav{
    display:flex;
    overflow-x:auto;
    gap:8px;
  }

  .nav a{
    white-space:nowrap;
  }

  .side-card{
    display:none;
  }

  .stats-grid,
  .form-grid,
  .details,
  .notice-flow{
    grid-template-columns:1fr 1fr;
  }

  .filters{
    grid-template-columns:1fr;
  }

  .content{
    padding:20px;
  }
}

@media(max-width:680px){
  .stats-grid,
  .form-grid,
  .details,
  .notice-flow{
    grid-template-columns:1fr;
  }

  .topbar{
    align-items:flex-start;
    gap:12px;
    flex-direction:column;
  }

  .top-actions{
    width:100%;
    justify-content:space-between;
  }

  .page-head{
    align-items:flex-start;
    flex-direction:column;
  }

  h1{
    font-size:30px;
  }

  .user-pill{
    max-width:100%;
    white-space:normal;
  }
}

.brand-logo-img{
  display:block !important;
  width:160px;
  height:80px;
  object-fit:cover !important;
  border-radius:18px !important;
}

.filters.wide{
  grid-template-columns:minmax(180px,1.4fr) minmax(220px,1.4fr) minmax(160px,1fr) minmax(160px,1fr) minmax(150px,.9fr) auto;
}

.stats-grid.compact{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.import-form{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:18px;
}

.import-form input[type="file"]{
  max-width:520px;
}

@media(max-width:1100px){
  .filters.wide,
  .stats-grid.compact{
    grid-template-columns:1fr;
  }
}

/* v3: более мягкий, мобильный агро-интерфейс */
body{
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  min-height:100vh;
}

body:before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(115deg,rgba(255,255,255,.62),rgba(255,255,255,0) 38%),
    radial-gradient(circle at 8% 18%,rgba(108,165,107,.18),transparent 34vw),
    radial-gradient(circle at 92% 8%,rgba(217,154,61,.14),transparent 32vw);
  z-index:-1;
}

.topbar{
  min-height:78px;
  box-shadow:0 14px 40px rgba(28,62,38,.07);
}

.brand-title{
  font-size:16px;
}

.brand-sub{
  font-size:12px;
}

.content{
  padding-bottom:44px;
}

.panel,
.form-card,
.stat-card,
.auth-card{
  position:relative;
  isolation:isolate;
}

.panel:before,
.form-card:before,
.stat-card:before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  pointer-events:none;
  background:linear-gradient(180deg,rgba(255,255,255,.55),rgba(255,255,255,0));
  z-index:-1;
}

.nav a{
  transition:.18s ease;
}

.nav a.active{
  outline:1px solid rgba(36,91,57,.12);
}

.table-scroll{
  width:100%;
  overflow-x:auto;
}

.inspection-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}

.inspection-card{
  overflow:hidden;
  border-radius:24px;
  border:1px solid var(--line);
  background:linear-gradient(180deg,var(--paper),var(--paper2));
  box-shadow:var(--shadow);
}

.inspection-photo{
  display:grid;
  place-items:center;
  height:210px;
  background:linear-gradient(135deg,#e9f2df,#fff4d8);
  color:var(--green);
  font-size:52px;
  overflow:hidden;
}

.inspection-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .35s ease;
}

.inspection-card:hover .inspection-photo img{
  transform:scale(1.035);
}

.inspection-body{
  padding:18px;
}

.inspection-body h2{
  margin:7px 0 8px;
  font-size:20px;
  line-height:1.15;
}

.inspection-body p{
  margin:0;
  color:var(--muted);
  line-height:1.5;
}

.inspection-meta{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--gold);
  font-weight:900;
}

.inspection-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:14px;
  color:var(--muted);
  font-size:13px;
}

.status.observed{
  background:#edf5e8;
  color:var(--green);
}

.status.needs_action{
  background:#fff2dd;
  color:#9a5d12;
}

.status.done{
  background:#e8f7ed;
  color:#16733a;
}

.inspection-view{
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr);
  gap:20px;
  align-items:start;
}

.inspection-view-photo{
  padding:0;
  overflow:hidden;
  min-height:360px;
  display:grid;
  place-items:center;
  background:#eef5e7;
}

.inspection-view-photo img{
  width:100%;
  height:100%;
  max-height:620px;
  object-fit:cover;
  display:block;
}

.empty-photo{
  padding:70px 24px;
  color:var(--muted);
  font-weight:900;
  text-align:center;
}

.details.onecol{
  grid-template-columns:1fr;
}

.mobile-tabbar{
  display:none;
}

@media(max-width:1180px){
  .inspection-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .inspection-view{
    grid-template-columns:1fr;
  }
}

@media(max-width:760px){
  body{
    background:#f7f5ed;
    padding-bottom:78px;
  }

  .topbar{
    position:sticky;
    top:0;
    padding:10px 14px;
    min-height:64px;
    flex-direction:row;
    align-items:center;
    border-bottom:1px solid rgba(23,51,31,.1);
  }

  .brand-logo-img{
    width:38px;
    height:38px;
    border-radius:12px;
  }

  .brand-title{
    font-size:13px;
    line-height:1.15;
  }

  .brand-sub{
    display:none;
  }

  .top-actions{
    width:auto;
  }

  .user-pill{
    display:none;
  }

  .top-actions .btn{
    padding:9px 11px;
    font-size:12px;
  }

  .layout{
    display:block;
    min-height:auto;
  }

  .sidebar{
    display:none;
  }

  .content{
    padding:16px 12px 96px;
    max-width:none;
  }

  .page-head{
    margin-bottom:14px;
  }

  .eyebrow{
    font-size:11px;
    margin-bottom:6px;
  }

  h1{
    font-size:26px;
    line-height:1.04;
    margin-bottom:10px;
  }

  h2{
    font-size:19px;
  }

  .lead{
    font-size:14px;
    margin:0 0 16px;
    line-height:1.45;
  }

  .panel,
  .form-card,
  .stat-card,
  .auth-card{
    border-radius:20px;
    box-shadow:0 10px 28px rgba(32,63,43,.08);
  }

  .panel{
    padding:16px;
    margin-bottom:14px;
    overflow:visible;
  }

  .hero-panel{
    padding:20px;
  }

  .stats-grid,
  .stats-grid.compact{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }

  .stat-card{
    padding:15px;
  }

  .stat-card strong{
    font-size:27px;
  }

  .stat-card div{
    font-size:12px;
  }

  .form-grid,
  .details,
  .notice-flow{
    grid-template-columns:1fr;
    gap:10px;
  }

  .form-card{
    padding:16px;
  }

  label{
    font-size:13px;
    margin-bottom:12px;
  }

  input,
  select,
  textarea{
    padding:13px 12px;
    border-radius:13px;
    font-size:16px;
  }

  .actions{
    display:grid;
    grid-template-columns:1fr;
    gap:9px;
  }

  .btn,
  button{
    width:100%;
    padding:13px 14px;
    border-radius:14px;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td{
    display:block;
    width:100%;
  }

  thead{
    display:none;
  }

  tr{
    padding:12px;
    border:1px solid var(--line);
    border-radius:18px;
    background:#fffdf7;
    margin-bottom:10px;
    box-shadow:0 8px 20px rgba(32,63,43,.06);
  }

  td{
    border:0;
    padding:6px 0;
    font-size:14px;
  }

  td:before{
    content:attr(data-label);
    display:block;
    font-size:11px;
    color:var(--muted);
    text-transform:uppercase;
    letter-spacing:.08em;
    font-weight:900;
    margin-bottom:2px;
  }

  .filters,
  .filters.wide{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
  }

  .filters button{
    width:100%;
  }

  .inspection-grid{
    grid-template-columns:1fr;
    gap:14px;
  }

  .inspection-photo{
    height:220px;
  }

  .inspection-body{
    padding:16px;
  }

  .inspection-foot{
    align-items:flex-start;
    flex-direction:column;
  }

  .inspection-view-photo{
    min-height:240px;
  }

  .inspection-view-photo img{
    max-height:420px;
  }

  .mobile-tabbar{
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:4px;
    position:fixed;
    left:10px;
    right:10px;
    bottom:10px;
    z-index:40;
    padding:8px;
    border-radius:22px;
    background:rgba(255,253,247,.94);
    border:1px solid rgba(23,51,31,.13);
    box-shadow:0 18px 50px rgba(23,51,31,.18);
    backdrop-filter:blur(16px);
  }

  .mobile-tabbar a{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:2px;
    min-height:48px;
    border-radius:16px;
    color:var(--muted);
    font-weight:900;
    font-size:18px;
  }

  .mobile-tabbar a span{
    font-size:10px;
  }

  .mobile-tabbar a.active{
    background:#edf5e8;
    color:var(--green);
  }
}

@media(max-width:390px){
  .stats-grid,
  .stats-grid.compact{
    grid-template-columns:1fr;
  }

  h1{
    font-size:24px;
  }

  .inspection-photo{
    height:190px;
  }

  .mobile-tabbar{
    left:6px;
    right:6px;
    bottom:6px;
  }
}

/* v4 permissions + polished agriculture UI */
:root{
  --bg:#f3f0df;
  --paper:#fffdf4;
  --paper2:#f9f3df;
  --text:#142b1b;
  --muted:#66715f;
  --green:#1f6f3e;
  --green2:#5e9f54;
  --gold:#d99a3d;
  --gold2:#f5c76f;
  --line:rgba(20,43,27,.12);
  --shadow:0 18px 55px rgba(28,62,38,.10);
  --softshadow:0 8px 24px rgba(28,62,38,.075);
  --radius:24px;
}

html{
  font-size:16px;
}

body{
  background:
    linear-gradient(180deg,rgba(243,240,223,.75),rgba(243,240,223,.96) 420px,#f7f3e6),
    url('/assets/farm-bg.svg') center top/cover fixed no-repeat;
}

body:before{
  background:linear-gradient(90deg,rgba(255,255,255,.78),rgba(255,255,255,.32) 45%,rgba(255,255,255,.66));
}

a{
  transition:.16s ease;
}

.topbar{
  margin:14px 14px 0;
  border-radius:26px;
  border:1px solid rgba(255,255,255,.65);
  background:rgba(255,253,244,.86);
}

.layout{
  grid-template-columns:292px 1fr;
  gap:0;
}

.sidebar{
  margin:14px 0 14px 14px;
  border:1px solid rgba(255,255,255,.58);
  border-radius:28px;
  background:rgba(255,253,244,.72);
  backdrop-filter:blur(18px);
  box-shadow:var(--softshadow);
  height:calc(100vh - 106px);
  position:sticky;
  top:92px;
  overflow:auto;

  scrollbar-width:none;
  -ms-overflow-style:none;
}

.sidebar::-webkit-scrollbar{
  width:0;
  height:0;
  display:none;
}

.sidebar::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-thumb{
  background:transparent;
}

.content{
  padding:28px 28px 96px;
  max-width:1480px;
}

.side-card{
  background:linear-gradient(135deg,rgba(31,111,62,.94),rgba(83,145,75,.88));
  color:#fff;
  border:0;
}

.side-card span{
  color:rgba(255,255,255,.8);
}

.nav a{
  gap:12px;
  padding:11px 12px;
  border-radius:18px;
  font-size:14px;
}

.nav a:hover,
.nav a.active{
  background:#fffdf4;
  color:var(--green);
  box-shadow:0 12px 26px rgba(28,62,38,.09);
}

.nav-ico{
  width:30px;
  height:30px;
  border-radius:12px;
  display:inline-grid;
  place-items:center;
  flex:0 0 auto;
  background:#eef6e7;
  color:var(--green);
}

.nav-ico svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.nav-ico svg path[fill]{
  fill:currentColor;
  stroke:none;
}

.nav a.active .nav-ico{
  background:linear-gradient(135deg,var(--green),var(--green2));
  color:#fff;
}

.panel,
.form-card,
.stat-card{
  background:rgba(255,253,244,.88);
  border:1px solid rgba(255,255,255,.72);
}

.panel.hero-panel{
  background:
    linear-gradient(135deg,rgba(31,111,62,.97),rgba(69,127,61,.91)),
    url('/assets/farm-photo-bg.svg') center/cover;
  color:#fff;
  overflow:hidden;
}

.hero-panel:after{
  content:"";
  position:absolute;
  right:-80px;
  bottom:-80px;
  width:230px;
  height:230px;
  border-radius:50%;
  background:rgba(245,199,111,.22);
}

h1{
  font-size:clamp(28px,3vw,42px);
}

.lead{
  max-width:840px;
}

.stats-grid{
  gap:14px;
}

.stat-card{
  min-height:116px;
}

.stat-card strong{
  font-size:clamp(28px,3vw,38px);
}

input,
select,
textarea{
  background:rgba(255,255,255,.92);
  border-color:rgba(20,43,27,.14);
}

button,
.btn{
  min-height:44px;
}

.btn:hover,
button:hover{
  transform:translateY(-1px);
}

.form-card.mini{
  padding:20px;
}

.compact-form{
  grid-template-columns:1.2fr .85fr .9fr .75fr;
}

.checkline{
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px 0;
  color:var(--text);
}

.checkline input{
  width:auto;
  margin:0;
}

.permission-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.permission-head h2{
  margin:0;
}

.permission-head p{
  margin:5px 0 0;
  color:var(--muted);
  font-weight:700;
}

.permissions-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}

.permission-item{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0;
  padding:12px;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
  color:var(--text);
  cursor:pointer;
}

.permission-item input{
  width:auto;
  margin:0;
}

.permission-item strong{
  font-size:13px;
}

.permission-item:hover{
  border-color:rgba(31,111,62,.3);
  box-shadow:0 8px 20px rgba(28,62,38,.07);
}

.user-permission-card{
  overflow:visible;
}

.auth-page{
  background:
    linear-gradient(135deg,rgba(24,70,38,.88),rgba(31,111,62,.68)),
    url('/assets/farm-photo-bg.svg') center/cover no-repeat;
}

.auth-card{
  background:rgba(255,253,244,.92);
  border:1px solid rgba(255,255,255,.62);
}

@media(max-width:1180px){
  .permissions-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .compact-form{
    grid-template-columns:1fr 1fr;
  }

  .layout{
    grid-template-columns:1fr;
  }

  .sidebar{
    height:auto;
    position:static;
    margin:12px 14px;
    border-radius:24px;
  }

  .content{
    padding:18px 14px 96px;
  }

  .nav{
    display:flex;
    gap:8px;
    overflow-x:auto;
    padding-bottom:3px;
  }

  .nav a{
    white-space:nowrap;
  }

  .side-card{
    display:none;
  }
}

@media(max-width:760px){
  body{
    background:
      linear-gradient(180deg,rgba(247,244,230,.92),rgba(247,244,230,.98)),
      url('/assets/farm-bg.svg') center top/auto 520px no-repeat;
    padding-bottom:90px;
  }

  .topbar{
    margin:8px;
    border-radius:22px;
    min-height:58px;
    padding:9px 10px;
  }

  .brand-logo-img{
    width:40px;
    height:40px;
  }

  .brand-title{
    font-size:12.5px;
  }

  .top-actions .btn{
    width:auto;
    min-height:38px;
  }

  .layout{
    display:block;
  }

  .sidebar{
    display:none;
  }

  .content{
    padding:14px 10px 104px;
  }

  .panel,
  .form-card,
  .stat-card{
    background:rgba(255,253,244,.94);
    border-radius:20px;
  }

  .panel{
    padding:14px;
  }

  .form-card{
    padding:14px;
  }

  .stats-grid,
  .stats-grid.compact{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px;
  }

  .stat-card{
    min-height:96px;
  }

  .stat-card strong{
    font-size:26px;
  }

  .stat-card div{
    font-size:12px;
  }

  .form-grid,
  .compact-form{
    grid-template-columns:1fr;
  }

  .permissions-grid{
    grid-template-columns:1fr;
  }

  .permission-head{
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
  }

  .permission-head button{
    width:100%;
  }

  .permission-item{
    padding:11px;
  }

  .mobile-tabbar{
    grid-template-columns:repeat(auto-fit,minmax(54px,1fr));
    left:8px;
    right:8px;
    bottom:8px;
  }

  .mobile-tabbar .nav-ico{
    width:24px;
    height:24px;
    background:transparent;
  }

  .mobile-tabbar .nav-ico svg{
    width:20px;
    height:20px;
  }

  .mobile-tabbar a.active .nav-ico{
    background:transparent;
    color:var(--green);
  }

  table tr{
    background:rgba(255,253,244,.96);
  }
}

@media(max-width:420px){
  .stats-grid,
  .stats-grid.compact{
    grid-template-columns:1fr;
  }

  .brand span:not(.brand-title){
    display:none;
  }

  .brand-title{
    font-size:13px;
  }

  .topbar{
    gap:8px;
  }

  .mobile-tabbar a span:last-child{
    font-size:9px;
  }
}

/* final-visible-ui-fix: принудительно включаем новый фон, иконки и мобильный интерфейс поверх старого кэша */
body{
  background-color:#f3f0df!important;
  background-image:
    linear-gradient(180deg,rgba(243,240,223,.72),rgba(243,240,223,.98) 520px,#f7f3e6),
    radial-gradient(circle at 10% 8%,rgba(94,159,84,.22),transparent 340px),
    radial-gradient(circle at 88% 12%,rgba(217,154,61,.20),transparent 360px),
    url('/assets/farm-photo-bg.svg?v=20260607-3')!important;
  background-position:center top,center top,center top,center top!important;
  background-size:auto,auto,auto,cover!important;
  background-attachment:scroll,scroll,scroll,fixed!important;
}

.nav-ico{
  display:inline-grid!important;
  place-items:center!important;
  width:32px!important;
  height:32px!important;
  border-radius:13px!important;
  background:#eef6e7!important;
  color:#1f6f3e!important;
  flex:0 0 auto!important;
}

.nav-ico svg{
  display:block!important;
  width:19px!important;
  height:19px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:2!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}

.nav a.active .nav-ico,
.mobile-tabbar a.active .nav-ico{
  background:linear-gradient(135deg,#1f6f3e,#5e9f54)!important;
  color:#fff!important;
}

.panel,
.form-card,
.stat-card{
  background:rgba(255,253,244,.92)!important;
  border:1px solid rgba(255,255,255,.72)!important;
  box-shadow:0 18px 55px rgba(28,62,38,.10)!important;
}

.sidebar{
  background:rgba(255,253,244,.76)!important;
  backdrop-filter:blur(18px)!important;

  scrollbar-width:none!important;
  -ms-overflow-style:none!important;
}

.sidebar::-webkit-scrollbar{
  width:0!important;
  height:0!important;
  display:none!important;
}

.sidebar::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-thumb{
  background:transparent!important;
}

@media(max-width:760px){
  body{
    background-attachment:scroll!important;
    background-size:auto,auto,auto,auto 560px!important;
    padding-bottom:96px!important;
  }

  .mobile-tabbar{
    display:grid!important;
  }

  .sidebar{
    display:none!important;
  }
}

.hero-panel h1,
.hero-panel .lead{
  color:#064719;
}

/* edit-delete-actions */
.row-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.row-actions .btn,
.row-actions button{
  min-height:36px;
  padding:8px 11px;
  border-radius:12px;
  font-size:13px;
  box-shadow:none;
}

.inline-delete{
  display:inline-flex;
  margin:0;
}

.edit-box{
  border:1px solid rgba(31,111,62,.18);
  background:rgba(255,253,244,.96);
  border-radius:22px;
  padding:18px;
  margin:0 0 18px;
  box-shadow:0 12px 34px rgba(28,62,38,.08);
}

.table-actions-col{
  width:180px;
}

.btn.tiny,
button.tiny{
  min-height:34px;
  padding:7px 10px;
  border-radius:11px;
  font-size:12px;
}

.danger-note{
  color:#9f281e;
  font-weight:800;
  font-size:12px;
}

.hero-panel h1,
.hero-panel .lead{
  color: #054819 !important;
}

.photo-bg-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.16);
  color:#fff;
  font-weight:900;
  border:1px solid rgba(255,255,255,.24);
}

@media(max-width:760px){
  .row-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    width:100%;
  }

  .row-actions .btn,
  .row-actions button{
    width:100%;
  }

  .table-actions-col{
    width:auto;
  }
}

/* v5: тонкая шапка, действия в строку, красивое подтверждение и отчёты */
.topbar{
  min-height:58px!important;
  padding:7px 18px!important;
  border-radius:20px!important;
  margin:8px 12px 0!important;
}

.brand-logo-img{
  width:126px!important;
  height:55px!important;
  border-radius:14px!important;
}

.layout{
  min-height:calc(100vh - 66px)!important;
}

.sidebar{
  top:74px!important;
  height:calc(100vh - 88px)!important;

  scrollbar-width:none!important;
  -ms-overflow-style:none!important;
}

.sidebar::-webkit-scrollbar{
  width:0!important;
  height:0!important;
  display:none!important;
}

.sidebar::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-thumb{
  background:transparent!important;
}

.content{
  padding-top:22px!important;
}

.row-actions{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:7px!important;
  flex-wrap:nowrap!important;
  white-space:nowrap!important;
}

.row-actions .btn,
.row-actions button{
  width:auto!important;
  min-width:auto!important;
  min-height:34px!important;
  padding:7px 10px!important;
  border-radius:11px!important;
  font-size:12px!important;
  line-height:1!important;
}

.inline-delete{
  display:inline-flex!important;
  margin:0!important;
  width:auto!important;
  flex:0 0 auto!important;
}

.inline-delete button{
  width:auto!important;
}

.table-actions-col{
  width:250px!important;
}

.actions .inline-delete{
  align-self:center;
}

.actions .inline-delete button{
  width:auto!important;
}

.delete-modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(12,31,18,.42);
  backdrop-filter:blur(8px);
  z-index:9999;
}

.delete-modal.is-open{
  display:flex;
}

.delete-modal__card{
  width:min(430px,100%);
  padding:24px;
  border-radius:26px;
  background:linear-gradient(180deg,#fffdf4,#f9f3df);
  border:1px solid rgba(255,255,255,.76);
  box-shadow:0 28px 90px rgba(12,31,18,.28);
  text-align:center;
}

.delete-modal__icon{
  width:52px;
  height:52px;
  margin:0 auto 12px;
  border-radius:18px;
  display:grid;
  place-items:center;
  background:#fff0ed;
  color:#b42318;
  font-size:28px;
  font-weight:900;
}

.delete-modal__card h2{
  margin:0 0 8px;
}

.delete-modal__card p{
  margin:0 0 18px;
  color:var(--muted);
  line-height:1.5;
}

.delete-modal__actions{
  display:flex;
  gap:10px;
  justify-content:center;
}

.delete-modal__actions button{
  width:auto!important;
  min-width:132px;
}

.report-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:0 0 14px;
}

.report-tab{
  padding:10px 14px;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--line);
  font-weight:900;
  color:var(--green);
}

.report-tab.active{
  background:linear-gradient(135deg,var(--green),var(--green2));
  color:#fff;
  border-color:transparent;
}

.report-kpis{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}

.report-kpi{
  padding:16px;
  border-radius:20px;
  background:linear-gradient(180deg,#fffdf4,#f9f3df);
  border:1px solid var(--line);
  box-shadow:var(--softshadow);
}

.report-kpi span{
  display:block;
  color:var(--muted);
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.report-kpi strong{
  display:block;
  margin-top:7px;
  font-size:25px;
}

.report-actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.reports-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.reports-grid .panel{
  margin-bottom:0;
}

.filters.reports{
  grid-template-columns:1.15fr 1fr 1fr 1fr 1fr 1fr auto auto;
}

.muted-link{
  color:var(--muted);
  font-weight:900;
}

@media(max-width:1180px){
  .report-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .reports-grid{
    grid-template-columns:1fr;
  }

  .filters.reports{
    grid-template-columns:1fr 1fr;
  }

  .table-actions-col{
    width:220px!important;
  }
}

@media(max-width:760px){
  .topbar{
    min-height:50px!important;
    padding:6px 8px!important;
    margin:6px!important;
    border-radius:18px!important;
  }

  .sidebar{
    height:auto!important;
  }

  .content{
    padding-top:12px!important;
  }

  .row-actions{
    overflow-x:auto!important;
    max-width:100%;
    padding-bottom:2px;

    scrollbar-width:none!important;
    -ms-overflow-style:none!important;
  }

  .row-actions::-webkit-scrollbar{
    width:0!important;
    height:0!important;
    display:none!important;
  }

  .row-actions .btn,
  .row-actions button{
    flex:0 0 auto!important;
  }

  .table-actions-col{
    width:auto!important;
  }

  .delete-modal__actions{
    display:grid;
    grid-template-columns:1fr 1fr;
  }

  .delete-modal__actions button{
    min-width:0;
    width:100%!important;
  }

  .report-kpis{
    grid-template-columns:1fr;
  }

  .filters.reports{
    grid-template-columns:1fr;
  }

  .report-actions{
    display:grid;
    grid-template-columns:1fr;
  }

  .report-actions .btn,
  .report-actions button{
    width:100%!important;
  }
}

.margin-top{
  margin-top:20px;
}

/* final-sidebar-scrollbar-hide */
.sidebar{
  scrollbar-width:none!important;
  -ms-overflow-style:none!important;
}

.sidebar::-webkit-scrollbar{
  width:0!important;
  height:0!important;
  display:none!important;
}

.sidebar::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-corner{
  background:transparent!important;
}
/* employee-month-orders */
.employee-month-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.employee-month-card{
  display:block;
  padding:18px;
  border-radius:22px;
  background:linear-gradient(180deg,#fffdf4,#f9f3df);
  border:1px solid rgba(20,43,27,.12);
  box-shadow:0 10px 26px rgba(28,62,38,.075);
  color:var(--text);
  transition:.18s ease;
}
.employee-month-card:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 42px rgba(28,62,38,.12);
}
.employee-month-card__title{
  display:block;
  font-size:20px;
  font-weight:900;
  letter-spacing:-.02em;
  color:var(--green);
}
.employee-month-card__dates{
  display:block;
  margin-top:7px;
  color:var(--muted);
  font-size:13px;
  font-weight:800;
}
.employee-month-card__stats{
  display:block;
  margin-top:12px;
  color:var(--text);
  line-height:1.45;
}
.danger-zone{
  border-color:rgba(180,35,24,.22)!important;
  background:linear-gradient(180deg,#fffdf4,#fff3ef)!important;
}
.danger-check{
  padding:14px;
  border:1px solid rgba(180,35,24,.2);
  border-radius:18px;
  background:#fff;
  color:#9f281e;
  font-weight:900;
}
.clear-orders-form{margin-top:14px}
@media(max-width:1180px){.employee-month-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.employee-month-grid{grid-template-columns:1fr}.employee-month-card{padding:15px;border-radius:18px}.employee-month-card__title{font-size:18px}}

/* smart-order-form */
.smart-hidden {
  display: none !important;
}

/* v6 unified green background + glass cabinet */
:root{
  --glass-bg: rgba(255,255,255,.72);
  --glass-strong: rgba(255,255,255,.84);
  --glass-line: rgba(255,255,255,.66);
}
body{
  background-color:#e8f2dc!important;
  background-image:
    linear-gradient(90deg,rgba(255,255,255,.74),rgba(255,255,255,.38) 46%,rgba(255,255,255,.16)),
    linear-gradient(180deg,rgba(246,250,239,.65),rgba(246,250,239,.88)),
    url('/assets/app-bg.webp?v=20260608-6')!important;
  background-size:cover!important;
  background-position:center center!important;
  background-attachment:fixed!important;
  color:var(--text)!important;
}
body:before{
  background:
    radial-gradient(circle at 12% 10%,rgba(255,255,255,.48),transparent 360px),
    radial-gradient(circle at 84% 8%,rgba(255,255,255,.22),transparent 420px)!important;
}
.topbar{
  background:rgba(255,255,255,.72)!important;
  border:1px solid var(--glass-line)!important;
  box-shadow:0 18px 55px rgba(8,57,38,.13)!important;
  backdrop-filter:blur(22px) saturate(1.15)!important;
  -webkit-backdrop-filter:blur(22px) saturate(1.15)!important;
}
.sidebar{
  background:rgba(255,255,255,.52)!important;
  border:1px solid rgba(255,255,255,.55)!important;
  box-shadow:0 18px 55px rgba(8,57,38,.11)!important;
  backdrop-filter:blur(22px) saturate(1.18)!important;
  -webkit-backdrop-filter:blur(22px) saturate(1.18)!important;
}
.panel,
.form-card,
.stat-card,
.auth-card,
.employee-month-card,
.report-kpi{
  background:linear-gradient(180deg,rgba(255,255,255,.82),rgba(255,255,255,.66))!important;
  border:1px solid rgba(255,255,255,.68)!important;
  box-shadow:0 20px 60px rgba(8,57,38,.12)!important;
  backdrop-filter:blur(18px) saturate(1.12)!important;
  -webkit-backdrop-filter:blur(18px) saturate(1.12)!important;
}
.nav a:hover,
.nav a.active{
  background:rgba(255,255,255,.75)!important;
  box-shadow:0 12px 28px rgba(8,57,38,.10)!important;
}
input,select,textarea{
  background:rgba(255,255,255,.82)!important;
  border-color:rgba(18,67,38,.16)!important;
}
table tr:hover td{
  background:rgba(255,255,255,.32);
}
.status.head_review,
.status.engineer_review{
  background:#e8f7ed!important;
  color:#0d6b35!important;
}
.auth-page,
.auth-page--fresh{
  min-height:100vh!important;
  display:grid!important;
  place-items:center!important;
  padding:24px!important;
  background-image:
    linear-gradient(120deg,rgba(0,76,39,.78),rgba(20,121,82,.42) 44%,rgba(238,255,226,.58)),
    url('/assets/app-bg.webp?v=20260608-6')!important;
  background-size:cover!important;
  background-position:center!important;
  background-attachment:fixed!important;
}
.login-shell{
  width:min(980px,100%);
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:18px;
  align-items:stretch;
}
.login-hero,
.login-card{
  min-height:520px;
  border-radius:34px;
  border:1px solid rgba(255,255,255,.62);
  box-shadow:0 32px 110px rgba(0,49,31,.24);
  backdrop-filter:blur(22px) saturate(1.15);
  -webkit-backdrop-filter:blur(22px) saturate(1.15);
}
.login-hero{
  position:relative;
  overflow:hidden;
  padding:38px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  color:#fff;
  background:
    radial-gradient(circle at 18% 12%,rgba(255,255,255,.34),transparent 280px),
    linear-gradient(145deg,rgba(9,73,39,.76),rgba(47,142,90,.38));
}
.login-hero:after{
  content:"";
  position:absolute;
  right:-90px;
  top:-90px;
  width:260px;
  height:260px;
  border-radius:50%;
  background:rgba(255,255,255,.16);
}
.login-hero__badge{
  position:absolute;
  left:34px;
  top:32px;
  display:inline-flex;
  width:max-content;
  padding:10px 14px;
  border-radius:999px;
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.25);
  color:#fff;
  font-weight:900;
  letter-spacing:.03em;
}
.login-hero h1{
  color:#fff;
  margin:0 0 14px;
  font-size:clamp(34px,4.6vw,58px);
  letter-spacing:-.055em;
}
.login-hero p{
  max-width:430px;
  margin:0;
  color:rgba(255,255,255,.84);
  font-size:17px;
  line-height:1.55;
  font-weight:700;
}
.login-card{
  padding:34px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  background:rgba(255,255,255,.78)!important;
}
.login-logo-wrap{
  width:190px;
  height:86px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  margin:0 0 18px;
}
.login-logo{
  display:block;
  max-width:190px;
  max-height:86px;
  object-fit:contain;
}
.login-title{
  font-size:34px;
  line-height:1.05;
  font-weight:950;
  letter-spacing:-.04em;
  color:var(--text);
}
.login-subtitle{
  margin:9px 0 22px;
  color:var(--muted);
  font-weight:800;
}
.login-form{
  display:grid;
  gap:12px;
}
.login-form button{
  width:100%;
  margin-top:6px;
  min-height:50px;
}
.auth-card small{display:none!important;}
@media(max-width:860px){
  .login-shell{grid-template-columns:1fr;}
  .login-hero{display:none;}
  .login-card{min-height:auto;border-radius:28px;}
}
@media(max-width:760px){
  body{background-attachment:scroll!important;}
  .auth-page,.auth-page--fresh{padding:14px!important;background-attachment:scroll!important;}
}

/* login center fix */
.login-shell,
.login-shell--center{
  width:min(500px,100%)!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:0!important;
  align-items:center!important;
  justify-items:center!important;
}

.login-hero{
  display:none!important;
}

.login-card{
  width:min(460px,100%)!important;
  min-height:auto!important;
  padding:36px 34px!important;
  border-radius:34px!important;
  border:1px solid rgba(255,255,255,.68)!important;
  background:rgba(255,255,255,.78)!important;
  box-shadow:0 32px 110px rgba(0,49,31,.24)!important;
  backdrop-filter:blur(24px) saturate(1.16)!important;
  -webkit-backdrop-filter:blur(24px) saturate(1.16)!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
}

.login-logo-wrap{
  width:100%;
  min-height:86px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 0 20px;
}

.login-logo{
  display:block;
  width:auto;
  max-width:220px;
  max-height:92px;
  object-fit:contain;
}

.login-title{
  text-align:center;
  font-size:34px;
  line-height:1.05;
  font-weight:950;
  letter-spacing:-.04em;
  color:var(--text);
}

.login-subtitle{
  margin:10px 0 24px;
  color:var(--muted);
  font-weight:800;
  text-align:center;
}

.login-form{
  display:grid;
  gap:12px;
}

.login-form label{
  margin-bottom:0;
}

.login-form input{
  min-height:48px;
}

.login-form button{
  width:100%;
  margin-top:8px;
  min-height:52px;
  font-size:15px;
}

.auth-page .brand-mark,
.auth-page .login-hero__badge{
  display:none!important;
}

@media(max-width:860px){
  .login-shell,
  .login-shell--center{
    width:min(460px,100%)!important;
    grid-template-columns:1fr!important;
  }

  .login-card{
    border-radius:28px!important;
    padding:30px 24px!important;
  }
}

@media(max-width:760px){
  .login-card{
    width:100%!important;
    padding:26px 18px!important;
    border-radius:24px!important;
  }

  .login-logo-wrap{
    min-height:70px;
    margin-bottom:16px;
  }

  .login-logo{
    max-width:185px;
    max-height:76px;
  }

  .login-title{
    font-size:28px;
  }

  .login-subtitle{
    font-size:14px;
  }
}
/* glass 2.0 — мягкий стеклянный редизайн */
:root{
  --glass-bg:rgba(255,255,255,.58);
  --glass-bg-strong:rgba(255,255,255,.72);
  --glass-border:rgba(255,255,255,.72);
  --glass-line:rgba(23,51,31,.10);
  --glass-blur:22px;
  --shadow:0 28px 80px rgba(25,62,39,.13);
  --softshadow:0 16px 42px rgba(25,62,39,.09);
}

html,
body{
  max-width:100%;
  overflow-x:hidden;
}

body{
  background:
    radial-gradient(circle at 12% 8%,rgba(108,165,107,.28),transparent 360px),
    radial-gradient(circle at 90% 12%,rgba(217,154,61,.22),transparent 390px),
    radial-gradient(circle at 54% 100%,rgba(36,91,57,.12),transparent 420px),
    linear-gradient(135deg,#eef5e8 0%,#fffaf0 46%,#f3f7ed 100%);
}

body:before{
  background:
    linear-gradient(115deg,rgba(255,255,255,.70),rgba(255,255,255,0) 42%),
    radial-gradient(circle at 8% 18%,rgba(108,165,107,.20),transparent 34vw),
    radial-gradient(circle at 92% 8%,rgba(217,154,61,.18),transparent 32vw);
}

.topbar{
  background:rgba(255,255,255,.62) !important;
  border-bottom:1px solid var(--glass-border) !important;
  backdrop-filter:blur(var(--glass-blur)) saturate(1.25);
  -webkit-backdrop-filter:blur(var(--glass-blur)) saturate(1.25);
  box-shadow:0 16px 46px rgba(20,60,34,.10) !important;
}

.sidebar{
  background:rgba(255,255,255,.36) !important;
  border-right:1px solid var(--glass-border) !important;
  backdrop-filter:blur(18px) saturate(1.15);
  -webkit-backdrop-filter:blur(18px) saturate(1.15);
}

.nav a{
  background:rgba(255,255,255,.28);
  border:1px solid transparent;
}

.nav a:hover,
.nav a.active{
  background:rgba(255,255,255,.72) !important;
  border-color:rgba(255,255,255,.86);
  box-shadow:0 14px 34px rgba(25,62,39,.10) !important;
}

.stat-card,
.panel,
.form-card,
.auth-card,
.inspection-card{
  background:linear-gradient(180deg,rgba(255,255,255,.76),rgba(255,255,255,.48)) !important;
  border:1px solid var(--glass-border) !important;
  box-shadow:var(--shadow) !important;
  backdrop-filter:blur(var(--glass-blur)) saturate(1.16);
  -webkit-backdrop-filter:blur(var(--glass-blur)) saturate(1.16);
}

.panel.hero-panel{
  background:
    linear-gradient(135deg,rgba(36,91,57,.92),rgba(67,132,75,.82)),
    radial-gradient(circle at 90% 0%,rgba(243,195,111,.45),transparent 360px) !important;
  border-color:rgba(255,255,255,.22) !important;
  box-shadow:0 30px 90px rgba(23,51,31,.23) !important;
}

.stat-card:after{
  background:rgba(255,255,255,.28) !important;
  border:1px solid rgba(255,255,255,.42);
}

input,
select,
textarea{
  background:rgba(255,255,255,.74) !important;
  border-color:rgba(23,51,31,.11) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.68);
}

input:focus,
select:focus,
textarea:focus{
  background:rgba(255,255,255,.9) !important;
  border-color:rgba(36,91,57,.38) !important;
  box-shadow:0 0 0 4px rgba(36,91,57,.09), inset 0 1px 0 rgba(255,255,255,.78) !important;
}

.btn.muted,
button.muted,
.user-pill,
.details div,
.notice-flow div,
.total-box,
.alert{
  background:rgba(255,255,255,.68) !important;
  border:1px solid rgba(255,255,255,.72) !important;
  backdrop-filter:blur(14px) saturate(1.12);
  -webkit-backdrop-filter:blur(14px) saturate(1.12);
}

.alert-ok{
  background:rgba(238,250,241,.82) !important;
  border-color:rgba(31,122,63,.20) !important;
}

.alert-error{
  background:rgba(255,240,237,.84) !important;
  border-color:rgba(180,35,24,.18) !important;
}

table{
  min-width:0;
}

th,
td{
  border-bottom-color:rgba(23,51,31,.09) !important;
}

.mobile-tabbar{
  background:rgba(255,255,255,.68) !important;
  border-top:1px solid var(--glass-border) !important;
  backdrop-filter:blur(20px) saturate(1.2);
  -webkit-backdrop-filter:blur(20px) saturate(1.2);
}

@media(max-width:1100px){
  .sidebar{
    background:rgba(255,255,255,.50) !important;
  }
}


/* liquid glass 2.1 — мягче, прозрачнее, без тяжелого зеленого hero */
:root{
  --liquid-glass:rgba(255,255,255,.54);
  --liquid-glass-strong:rgba(255,255,255,.72);
  --liquid-edge:rgba(255,255,255,.78);
  --liquid-shadow:0 28px 86px rgba(25,62,39,.12);
}

body{
  background:
    radial-gradient(circle at 10% 9%,rgba(108,165,107,.26),transparent 350px),
    radial-gradient(circle at 92% 8%,rgba(243,195,111,.24),transparent 390px),
    radial-gradient(circle at 54% 92%,rgba(36,91,57,.12),transparent 440px),
    linear-gradient(135deg,#edf5e8 0%,#fffaf0 48%,#f4f8ee 100%) !important;
}

.panel.hero-panel{
  background:
    radial-gradient(circle at 12% 14%,rgba(255,255,255,.76),transparent 260px),
    radial-gradient(circle at 88% 0%,rgba(243,195,111,.22),transparent 360px),
    linear-gradient(135deg,rgba(255,255,255,.60),rgba(255,255,255,.30)) !important;
  color:var(--text) !important;
  border:1px solid var(--liquid-edge) !important;
  box-shadow:var(--liquid-shadow) !important;
  backdrop-filter:blur(26px) saturate(1.18) !important;
  -webkit-backdrop-filter:blur(26px) saturate(1.18) !important;
}

.panel.hero-panel h1,
.panel.hero-panel .lead{
  color:var(--text) !important;
}

.panel.hero-panel .eyebrow{
  color:rgba(36,91,57,.74) !important;
}

.stat-card,
.panel,
.form-card,
.side-card,
.auth-card{
  background:linear-gradient(180deg,rgba(255,255,255,.70),rgba(255,255,255,.42)) !important;
  border-color:rgba(255,255,255,.76) !important;
  box-shadow:var(--liquid-shadow) !important;
}

.stat-card:after{
  background:rgba(255,255,255,.34) !important;
  border:1px solid rgba(255,255,255,.54) !important;
}

/* === Liquid Glass 2.2 mobile polish === */
html,body{max-width:100%;overflow-x:hidden!important}*,*::before,*::after{box-sizing:border-box}.content,.panel,.form-card,.page-head{max-width:100%}.panel,.form-card,.stat-card,.hero-panel{background:linear-gradient(180deg,rgba(255,255,255,.72),rgba(255,255,255,.43))!important;border:1px solid rgba(255,255,255,.72)!important;box-shadow:0 22px 70px rgba(27,63,42,.11)!important;backdrop-filter:blur(20px) saturate(1.25);-webkit-backdrop-filter:blur(20px) saturate(1.25)}.hero-panel{background:radial-gradient(circle at 16% 0%,rgba(255,255,255,.78),transparent 35%),linear-gradient(135deg,rgba(255,255,255,.62),rgba(255,255,255,.34))!important}.btn,button,input[type=submit]{border-radius:14px!important;min-height:42px!important;display:inline-flex;align-items:center;justify-content:center;gap:8px}.btn.tiny,button.tiny{min-height:32px!important;border-radius:11px!important;padding:7px 10px!important}.actions,.row-actions{gap:8px!important;flex-wrap:wrap}input,select,textarea{max-width:100%;border-radius:14px!important}table{width:100%}.table-actions-col{min-width:150px}.smart-hidden,[data-smart-field].smart-hidden{display:none!important}@media(max-width:760px){.content{padding:14px 12px 88px!important}.page-head{display:grid!important;grid-template-columns:1fr!important;gap:14px!important}.page-head .actions,.page-head .order-view-actions,.actions,.row-actions{display:grid!important;grid-template-columns:1fr!important;width:100%!important}.page-head .btn,.page-head button,.actions .btn,.actions button,.row-actions .btn,.row-actions button{width:100%!important}.form-grid,.filters,.filters.wide,.stats-grid{grid-template-columns:1fr!important}.panel,.form-card{border-radius:22px!important;padding:16px!important}table:not(.report-table):not(.orders-table):not(.work-types-table):not(.bonus-table):not(.order-calc-table){min-width:0!important}thead{display:none}tbody tr{display:grid;gap:8px;padding:12px;border-radius:18px;margin-bottom:10px;background:rgba(255,255,255,.56);border:1px solid rgba(255,255,255,.7)}tbody td{display:grid!important;grid-template-columns:minmax(110px,.45fr) 1fr!important;gap:10px!important;border:0!important;padding:4px 0!important;text-align:left!important}tbody td::before{content:attr(data-label);font-size:12px;font-weight:900;color:var(--muted);text-transform:none}.orders-panel,.report-table-wrap,.work-types-table-wrap,.bonus-table-wrap,.order-table-wrap{overflow-x:visible!important}.orders-table,.report-table,.work-types-table,.bonus-table,.order-calc-table{min-width:0!important}.orders-table thead,.report-table thead,.work-types-table thead,.bonus-table thead,.order-calc-table thead{display:none}.orders-table tr,.report-table tr,.work-types-table tr,.bonus-table tr,.order-calc-table tr{display:grid;gap:8px;padding:12px;border-radius:18px;margin-bottom:10px;background:rgba(255,255,255,.56);border:1px solid rgba(255,255,255,.7)}.orders-table td,.report-table td,.work-types-table td,.bonus-table td,.order-calc-table td,.orders-table th,.report-table th,.work-types-table th,.bonus-table th,.order-calc-table th{display:grid!important;grid-template-columns:minmax(115px,.45fr) 1fr!important;gap:10px!important;border:0!important;padding:4px 0!important;text-align:left!important}.orders-table td::before,.report-table td::before,.work-types-table td::before,.bonus-table td::before,.order-calc-table td::before{content:attr(data-label);font-size:12px;font-weight:900;color:var(--muted)}}


/* === Liquid glass 2.2: общая полировка и мобильная адаптация === */
html,body{max-width:100%;overflow-x:hidden!important}
body{font-family:Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;background:radial-gradient(circle at 10% 0%,rgba(139,194,137,.28),transparent 360px),radial-gradient(circle at 90% 8%,rgba(245,192,103,.20),transparent 420px),linear-gradient(180deg,#f7f8f2,#eef5e9 58%,#f9f6ec)}
body:before{content:"";position:fixed;inset:0;pointer-events:none;background:linear-gradient(135deg,rgba(255,255,255,.45),transparent 42%),radial-gradient(circle at 50% 0%,rgba(255,255,255,.58),transparent 520px);z-index:-1}
.topbar{background:rgba(255,255,255,.58)!important;border-bottom:1px solid rgba(255,255,255,.72)!important;box-shadow:0 18px 54px rgba(32,63,43,.08);backdrop-filter:blur(22px) saturate(1.28);-webkit-backdrop-filter:blur(22px) saturate(1.28)}
.sidebar{background:linear-gradient(180deg,rgba(255,255,255,.42),rgba(255,255,255,.18))!important;backdrop-filter:blur(20px) saturate(1.18);-webkit-backdrop-filter:blur(20px) saturate(1.18)}
.panel,.form-card,.stat-card,.auth-card{background:linear-gradient(145deg,rgba(255,255,255,.78),rgba(255,255,255,.42))!important;border:1px solid rgba(255,255,255,.72)!important;box-shadow:0 24px 70px rgba(31,63,42,.10),inset 0 1px 0 rgba(255,255,255,.75)!important;backdrop-filter:blur(18px) saturate(1.22);-webkit-backdrop-filter:blur(18px) saturate(1.22)}
.panel.hero-panel{background:linear-gradient(145deg,rgba(255,255,255,.70),rgba(255,255,255,.36))!important;color:var(--text)!important;border:1px solid rgba(255,255,255,.74)!important;position:relative;overflow:hidden}
.panel.hero-panel:before{content:"";position:absolute;inset:-40% -10% auto auto;width:420px;height:420px;background:radial-gradient(circle,rgba(108,165,107,.18),transparent 70%);pointer-events:none}.hero-panel h1,.hero-panel .lead{color:var(--text)!important}.hero-panel .eyebrow{color:var(--gold)!important}
button,.btn{border-radius:16px!important;min-height:42px;transition:transform .18s ease,box-shadow .18s ease,filter .18s ease;background:linear-gradient(135deg,#2f7a4b,#185b34)!important;box-shadow:0 14px 28px rgba(36,91,57,.18)!important}.btn.muted,button.muted{background:rgba(255,255,255,.72)!important;color:var(--green)!important;border:1px solid rgba(255,255,255,.82)!important;box-shadow:0 10px 24px rgba(32,63,43,.08)!important}.btn.gold,button.gold{background:linear-gradient(135deg,#e2aa50,#c88724)!important}.btn.danger,button.danger{background:linear-gradient(135deg,#cf4a3e,#9f281e)!important}.btn.tiny,button.tiny{min-height:34px!important;padding:8px 12px!important;border-radius:12px!important;font-size:12px!important}
input,select,textarea{background:rgba(255,255,255,.78)!important;border:1px solid rgba(20,43,27,.13)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.72)}
input:focus,select:focus,textarea:focus{border-color:rgba(36,91,57,.45)!important;box-shadow:0 0 0 4px rgba(36,91,57,.10),inset 0 1px 0 rgba(255,255,255,.8)!important}
.row-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.inline-delete{margin:0}.table-actions-col{width:1%;white-space:nowrap}.small-muted{color:var(--muted);font-size:13px;font-weight:700}.money-strong{font-weight:1000;color:var(--green)}
.mobile-tabbar{display:none}
@media(max-width:980px){.layout{grid-template-columns:1fr!important}.sidebar{display:none!important}.content{padding:22px 16px 96px!important;max-width:100%!important}.topbar{padding:10px 14px!important}.brand-logo-img{max-width:150px;height:auto}.user-pill{display:none}.mobile-tabbar{position:fixed;left:10px;right:10px;bottom:10px;z-index:50;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;padding:8px;border-radius:24px;background:rgba(255,255,255,.70);border:1px solid rgba(255,255,255,.82);box-shadow:0 20px 60px rgba(20,43,27,.18);backdrop-filter:blur(22px) saturate(1.25);-webkit-backdrop-filter:blur(22px) saturate(1.25)}.mobile-tabbar a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:52px;border-radius:18px;color:var(--muted);font-size:10px;font-weight:900;overflow:hidden}.mobile-tabbar a.active{background:rgba(36,91,57,.10);color:var(--green)}.mobile-tabbar .nav-ico{width:19px;height:19px}.page-head{display:grid!important;grid-template-columns:1fr!important}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.form-grid,.details{grid-template-columns:1fr!important}.filters,.filters.wide{grid-template-columns:1fr!important}.actions,.row-actions{display:grid!important;grid-template-columns:1fr!important}.actions .btn,.actions button,.row-actions .btn,.row-actions button{width:100%!important}table:not(.no-mobile-table){min-width:760px}}
@media(max-width:620px){h1{font-size:28px!important}.stats-grid{grid-template-columns:1fr!important}.panel,.form-card{padding:16px!important;border-radius:22px!important}.top-actions{gap:8px}.top-logout{padding:9px 12px!important;min-height:36px!important}.mobile-tabbar{left:6px;right:6px;bottom:6px;border-radius:20px}.mobile-tabbar a{min-height:49px}.lead{font-size:14px!important;margin-top:0!important}}
