:root{--green:#15803D;--green-soft:#DCFCE7;--yellow:#FACC15;--red:#DC2626;--slate:#0F172A;}
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;background:#F1F5F9;color:#0F172A}
button{cursor:pointer;font-family:inherit}
input,select,textarea{font-family:inherit;font-size:14px}
.hidden{display:none!important}

/* Вход */
.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:16px}
.login-card{background:#fff;border-radius:16px;box-shadow:0 10px 40px rgba(0,0,0,.08);padding:32px;width:100%;max-width:360px}
.login-card h1{font-size:20px;text-align:center;margin-bottom:4px}
.login-card .sub{text-align:center;color:#64748B;font-size:13px;margin-bottom:20px}
.login-card label{display:block;font-size:12px;font-weight:600;color:#475569;margin:12px 0 4px}
.login-card input{width:100%;padding:10px 12px;border:1px solid #E2E8F0;border-radius:10px}
.login-card input:focus{outline:2px solid var(--green)}
.login-card button{width:100%;margin-top:18px;padding:12px;background:var(--green);color:#fff;border:none;border-radius:10px;font-weight:700}
.err{color:var(--red);font-size:13px;margin-top:10px;text-align:center}
.logo{width:40px;height:40px;border-radius:10px;background:var(--yellow);color:var(--green);font-weight:900;font-size:22px;display:flex;align-items:center;justify-content:center;margin:0 auto 12px}

/* Шапка */
header{background:var(--green);color:#fff;padding:12px 16px;display:flex;align-items:center;justify-content:space-between}
header .brand{display:flex;align-items:center;gap:8px}
header .brand .logo{width:32px;height:32px;font-size:18px;margin:0}
header .brand b{font-size:15px}
header .brand span{font-size:11px;opacity:.8;display:block}
header .right{display:flex;align-items:center;gap:12px;font-size:13px}
header button{background:rgba(255,255,255,.2);color:#fff;border:none;padding:6px 12px;border-radius:8px;font-weight:600}

/* Вкладки */
nav.tabs{background:#fff;display:flex;border-bottom:1px solid #E2E8F0;overflow-x:auto}
nav.tabs button{flex:1;min-width:110px;padding:12px;background:none;border:none;font-weight:600;color:#94A3B8;border-bottom:2px solid transparent}
nav.tabs button.active{color:var(--green);border-bottom-color:var(--green)}

main{max-width:680px;margin:0 auto;padding:16px}
h2{font-size:18px;margin-bottom:4px}
.muted{color:#64748B;font-size:13px;margin-bottom:14px}

/* Фильтры */
.chips{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.chips button{font-size:12px;font-weight:600;padding:6px 12px;border-radius:999px;border:1px solid #E2E8F0;background:#fff;color:#64748B}
.chips button.active{background:var(--green);color:#fff;border-color:var(--green)}
.search{position:relative;margin-bottom:12px}
.search input{width:100%;padding:10px 12px;border:1px solid #E2E8F0;border-radius:10px}
.search input:focus{outline:2px solid var(--green)}

/* Карточки */
.card{background:#fff;border:1px solid #E2E8F0;border-radius:12px;padding:16px;margin-bottom:12px}
.card .top{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;margin-bottom:6px}
.card .nm{font-weight:600}
.card a.tel{color:var(--green);font-weight:600;font-size:14px;text-decoration:none}
.card .addr{color:#64748B;font-size:14px;margin:4px 0}
.card .meta{color:#94A3B8;font-size:12px;margin-bottom:8px}
.badge{font-size:12px;font-weight:600;padding:2px 8px;border-radius:999px;white-space:nowrap}
textarea.comment{width:100%;border:1px solid #E2E8F0;border-radius:8px;padding:8px;font-size:14px;resize:vertical;min-height:48px;margin-top:4px}
textarea.comment:focus{outline:2px solid var(--green)}
.row-btns{display:flex;gap:8px;margin-top:8px;flex-wrap:wrap}
.row-btns button{font-size:13px;font-weight:600;padding:8px 12px;border-radius:8px;border:none;color:#fff;background:var(--green)}
.row-btns button.ghost{background:#fff;color:#475569;border:1px solid #E2E8F0}
.order{background:var(--green-soft);border-radius:8px;padding:10px;margin-top:8px;font-size:14px}
.order pre{white-space:pre-wrap;font-family:inherit;color:#334155;margin-bottom:8px}
.sums{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;text-align:center}
.sums div{background:#fff;border-radius:8px;padding:6px}
.sums .k{font-size:11px;color:#94A3B8}
.sums .v{font-weight:700;font-size:14px}

/* Форма */
.form{background:#fff;border:1px solid #E2E8F0;border-radius:12px;padding:20px}
.form h2{text-align:center;margin-bottom:16px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.form label{display:block;font-size:12px;font-weight:600;color:#475569;margin:12px 0 4px}
.form input,.form select,.form textarea{width:100%;padding:9px 11px;border:1px solid #E2E8F0;border-radius:8px}
.form input:focus,.form select:focus,.form textarea:focus{outline:2px solid var(--green)}
.form .submit{width:100%;margin-top:16px;padding:12px;background:var(--green);color:#fff;border:none;border-radius:10px;font-weight:700;font-size:15px}
.form .submit:disabled{opacity:.4}
.empty{text-align:center;color:#94A3B8;font-size:14px;padding:40px 0}

/* Статус-меню */
.status-btn{position:relative}
.status-btn>button{display:flex;align-items:center;gap:4px;font-size:12px;font-weight:600;padding:6px 10px;border-radius:8px;border:1px solid #cbd5e1;background:#fff}
.status-menu{position:absolute;right:0;top:110%;background:#fff;border:1px solid #E2E8F0;border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.12);z-index:20;width:180px;overflow:hidden}
.status-menu button{display:block;width:100%;text-align:left;padding:9px 12px;background:none;border:none;font-size:14px;font-weight:500}
.status-menu button:hover{background:#F1F5F9}

.toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:#1E293B;color:#fff;padding:10px 16px;border-radius:10px;font-size:14px;z-index:50}
