*{box-sizing:border-box}
body{margin:0;background:#F4F5F7;font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;color:#15171A;font-size:15px}
a{color:#2457D6}a:hover{color:#173C9E}
button,input,select,textarea{font-family:inherit;color:#15171A}
input::placeholder,textarea::placeholder{color:#7A7F88}
.mono{font-family:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.hidden{display:none!important}

.wrap{max-width:1180px;margin:0 auto;padding:36px 24px 72px;display:flex;flex-direction:column;gap:24px}
.top{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:16px}
.top h1{margin:0;font-size:32px;font-weight:700;letter-spacing:-.02em}
.sub{margin:6px 0 0;font-size:15px;color:#565B64}
.actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.search{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #D9DCE1;border-radius:12px;padding:0 14px;height:44px;min-width:260px}
.search input{border:none;outline:none;background:transparent;font-size:15px;flex:1;min-width:0}
.btn{height:44px;padding:0 18px;border-radius:12px;font-size:15px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #D9DCE1;background:#fff}
.btn.dark{border:none;background:#15171A;color:#fff}
.btn.dark:disabled{background:#C9CDD3;color:#3A3F47;cursor:not-allowed}
.btn.ghost{border:none;background:transparent;color:#8A2E0B}
.who{display:flex;align-items:center;gap:8px;font-size:14px;color:#565B64}
.who button{height:36px;padding:0 12px;border-radius:10px;border:1px solid #D9DCE1;background:#fff;cursor:pointer;font-size:14px}

.panel{background:#fff;border:1px solid #E3E5E9;border-radius:18px;padding:20px 22px;display:flex;flex-direction:column;gap:14px}
.panel-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:8px}
.panel-head h2{margin:0;font-size:17px;font-weight:600}
.hint{font-size:13px;color:#565B64}
.chips{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.chip{height:36px;padding:0 14px;border-radius:99px;font-size:14px;font-weight:500;cursor:pointer;border:1px solid #D9DCE1;background:#fff;display:inline-flex;align-items:center;gap:8px}
.chip.big{height:40px}
.chip[aria-pressed="true"]{border-color:#15171A;background:#15171A;color:#fff}
.chip[aria-pressed="true"] .dot{background:#fff!important}
.dot{width:9px;height:9px;border-radius:99px;display:inline-block;flex-shrink:0}
.svc-telegram{background:#229ED9}.svc-apple{background:#15171A}.svc-google{background:#D9480F}
.svc-mail{background:#2457D6}.svc-appsflyer{background:#1F8A4C}.svc-other{background:#8A8F98}
.summary{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;padding-top:4px;font-size:14px}
.summary .free{display:inline-flex;align-items:center;gap:6px;color:#14633A;font-weight:600}
.summary .busy{display:inline-flex;align-items:center;gap:6px;color:#8A2E0B;font-weight:600}
.summary .free .dot{background:#1F8A4C;width:10px;height:10px}
.summary .busy .dot{background:#C2410C;width:10px;height:10px}
.only{margin-left:auto;display:inline-flex;align-items:center;gap:8px;cursor:pointer;min-height:44px}
.only input{width:18px;height:18px;accent-color:#15171A}

.filters{display:flex;flex-wrap:wrap;gap:14px 28px;align-items:center}
.filters .label{font-size:13px;color:#565B64;margin-right:4px}

.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));gap:16px;align-items:start}
@media (max-width:420px){.grid{grid-template-columns:1fr}.search{min-width:0;flex:1}}
.card{background:#fff;border:1px solid #E3E5E9;border-radius:18px;padding:18px 20px;display:flex;flex-direction:column;gap:14px}
.card-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.num{display:flex;align-items:center;gap:4px}
.num span{font-size:19px;white-space:nowrap;font-weight:600;letter-spacing:-.01em}
.icon-btn{width:36px;height:36px;border-radius:10px;border:none;background:transparent;cursor:pointer;display:flex;align-items:center;justify-content:center}
.status{flex-shrink:0;font-size:12px;font-weight:600;padding:5px 10px;border-radius:99px}
.st-ok{background:#E3F3EA;color:#14633A}.st-check{background:#FFF0D1;color:#6E4300}.st-reissue{background:#E2EBFF;color:#1E3A8A}
.avail{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:12px;font-size:14px;font-weight:600}
.avail.free{background:#E3F3EA;color:#14633A}.avail.busy{background:#FDE8DA;color:#8A2E0B}
.facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.facts div{display:flex;flex-direction:column;gap:2px}
.facts .k{font-size:12px;color:#565B64}.facts .v{font-size:14px;font-weight:500;overflow-wrap:anywhere}
.uses{display:flex;flex-direction:column;gap:8px}
.uses-title{font-size:12px;font-weight:600;color:#565B64;text-transform:uppercase;letter-spacing:.04em}
.use{background:#F6F7F9;border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:4px}
.use-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.badge{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;padding:3px 8px;border-radius:6px;background:#fff;border:1px solid #E3E5E9}
.badge.hi{border-color:#15171A}
.badge .dot{width:8px;height:8px}
.use-what{font-size:14px;font-weight:600}
.use-acc{font-size:13px;color:#3A3F47;overflow-wrap:anywhere}
.use-note{font-size:13px;color:#565B64;white-space:pre-line}
.muted{font-size:13px;color:#565B64}
.note{font-size:13px;color:#3A3F47;background:#FFF8E6;border-radius:10px;padding:8px 12px;white-space:pre-line}
.meta{font-size:12px;color:#7A7F88}
.edit{height:40px;border-radius:10px;border:1px solid #D9DCE1;background:#fff;font-size:14px;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px}
.empty{background:#fff;border:1px dashed #C9CDD3;border-radius:18px;padding:40px 24px;text-align:center;font-size:15px;color:#565B64}

.backdrop{position:fixed;inset:0;background:rgba(21,23,26,.38)}
.drawer{position:fixed;top:0;right:0;bottom:0;width:100%;max-width:580px;background:#fff;overflow-y:auto;box-shadow:-12px 0 40px rgba(21,23,26,.18);display:flex;flex-direction:column}
.drawer-head{position:sticky;top:0;background:#fff;border-bottom:1px solid #E3E5E9;padding:18px 24px;display:flex;justify-content:space-between;align-items:center;gap:12px;z-index:1}
.drawer-head h2{margin:0;font-size:20px;font-weight:700}
.close{width:44px;height:44px;border-radius:12px;border:none;background:#F1F2F4;cursor:pointer;display:flex;align-items:center;justify-content:center}
.drawer-body{padding:22px 24px;display:flex;flex-direction:column;gap:22px;flex:1}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.field{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600;color:#3A3F47}
.field.span2{grid-column:span 2}
.field input,.field select,.field textarea{border:1px solid #D9DCE1;border-radius:10px;font-size:15px;background:#fff;font-weight:400}
.field input,.field select{height:44px;padding:0 12px}
.field textarea{padding:10px 12px;font-size:14px;resize:vertical}
.field input.mono{font-size:16px}
.uses-head{display:flex;justify-content:space-between;align-items:center;gap:8px}
.uses-head h3{margin:0;font-size:16px;font-weight:700}
.use-form{border:1px solid #E3E5E9;border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:10px;background:#FAFBFC}
.use-form .row{display:flex;gap:10px;align-items:flex-end}
.use-form .field{font-size:12px;flex:1}
.use-form .field input,.use-form .field select{height:42px}
.use-form .field input.mono{font-size:14px}
.trash{width:42px;height:42px;border-radius:10px;border:1px solid #D9DCE1;background:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.add-use{height:44px;border-radius:12px;border:1.5px dashed #B9BEC6;background:#fff;font-size:14px;font-weight:600;cursor:pointer}
.drawer-foot{position:sticky;bottom:0;background:#fff;border-top:1px solid #E3E5E9;padding:14px 24px;display:flex;gap:10px;flex-wrap:wrap}
.drawer-foot .btn{height:46px}
.drawer-foot .ghost{margin-left:auto}
.form-error{background:#FDE8DA;color:#8A2E0B;border-radius:12px;padding:12px 14px;font-size:14px;font-weight:600}

.toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);background:#15171A;color:#fff;padding:12px 18px;border-radius:12px;font-size:14px;font-weight:500;max-width:calc(100% - 32px)}
.toast.err{background:#8A2E0B}

/* вход */
.login{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}
.login form{width:100%;max-width:380px;background:#fff;border:1px solid #E3E5E9;border-radius:18px;padding:28px;display:flex;flex-direction:column;gap:16px}
.login h1{margin:0;font-size:26px;font-weight:700;letter-spacing:-.02em}
.login p{margin:0;font-size:14px;color:#565B64}
.login .btn{width:100%;height:46px}
