:root{--bg:#f3f6fd;--panel:#fff;--ink:#071b3a;--muted:#6c7891;--line:#dfe7f5;--line2:#e9eef8;--blue:#315df4;--blue2:#6b5cff;--soft:#eef3ff;--green:#0aa35c;--orange:#e08b2c;--red:#ef4444;--cyan:#eaf8ff;--radius:18px}*{box-sizing:border-box}html,body{min-height:100%}body{margin:0;background:linear-gradient(180deg,#eef3ff 0,#f7f9fe 330px,#f7f9fe 100%);font-family:Inter,system-ui,-apple-system,Segoe UI,Arial,sans-serif;color:var(--ink);font-size:15px}.page-shell{width:100%;max-width:1920px;margin:0 auto;padding:42px 24px 56px}.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:22px;margin-bottom:28px}.head-title h1{margin:0;color:#315df4;font-weight:900;font-size:32px;line-height:1;letter-spacing:-.045em}.head-title p{margin:12px 0 0;color:#63708a;font-weight:500}.head-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}.round-action{position:relative;width:50px;height:50px;border:1px solid #d9e4fb;border-radius:16px;background:#edf3ff;color:#2859df;display:grid;place-items:center;font-size:18px;transition:.16s}.round-action:hover{background:#fff;transform:translateY(-1px)}.badge-dot{position:absolute;right:-4px;top:-6px;background:#e9274f;color:#fff;border:2px solid #eef3ff;border-radius:999px;min-width:20px;height:20px;display:grid;place-items:center;font-size:11px;font-weight:900}.btn{font-weight:800;border:0}.primary-pill{height:50px;border-radius:16px;padding:0 22px;background:linear-gradient(135deg,var(--blue),var(--blue2));color:#fff!important;display:inline-flex;align-items:center;gap:9px;box-shadow:none}.primary-pill:hover{filter:brightness(.98);transform:translateY(-1px)}.light-pill{height:50px;border-radius:16px;padding:0 22px;background:#fff0f2;color:#8b2433;border:1px solid #ead5da}.week-card{background:rgba(255,255,255,.95);border:1px solid #edf1fa;border-radius:22px;padding:24px;margin-bottom:30px;box-shadow:none}.week-top{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.week-card h2{margin:0;font-size:24px;font-weight:900;letter-spacing:-.04em;color:#071b3a}.week-card h2 span{font-size:15px;color:#6b7792;font-weight:700;letter-spacing:0}.week-card p{margin:9px 0 0;color:#66748d}.week-buttons{display:flex;gap:10px;white-space:nowrap}.mini-pill{height:42px;border:0;background:#edf3ff;color:#173166;border-radius:14px;padding:0 18px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;font-weight:800}.today-line{margin-top:18px;border:1px solid #e0e8f7;background:#fafcff;border-radius:14px;height:52px;padding:0 14px;display:flex;align-items:center;gap:10px;color:#62718b}.today-line b{background:#edf3ff;border-radius:999px;color:#173166;padding:6px 12px}.stats-row{display:grid;grid-template-columns:repeat(7,minmax(150px,1fr));gap:10px;margin:0 14px 26px}.stat-card{height:48px;background:#fff;border:1px solid #dde6f5;border-radius:13px;text-decoration:none;color:#061a3a;display:flex;align-items:center;gap:13px;padding:0 16px;box-shadow:none;transition:.14s;overflow:hidden}.stat-card:hover,.stat-card.active{transform:translateY(-1px);border-color:#b9c7ff;background:#fff}.stat-card.active{box-shadow:inset 4px 0 0 #86a2ff}.stat-card i{color:#315df4;width:18px;text-align:center}.stat-card span{font-size:13px;line-height:1.05;font-weight:700;flex:1}.stat-card b{font-size:16px;font-weight:900}.stat-accepted i,.stat-issued i{color:#16a56d}.stat-correction i{color:#db8a28}.stat-rejected i{color:#ef4444}.data-card{background:#fff;border:1px solid #eef2fa;border-radius:24px;padding:18px;box-shadow:none}.toolbar{display:grid;grid-template-columns:1fr 240px 112px;gap:12px;margin-bottom:18px}.live-search{height:52px;border:1px solid #dde6f5;border-radius:16px;background:#fff;display:flex;align-items:center;gap:12px;padding:0 16px;color:#8a95aa}.live-search:focus-within{border-color:#b5c3ff}.live-search input{width:100%;border:0;outline:0;background:transparent;color:#071b3a}.status-filter{height:52px;border:1px solid #dde6f5;border-radius:16px;background:#fff;color:#071b3a;padding:0 16px;font-weight:600}.reset-btn{height:52px;border-radius:16px;background:#edf3ff;color:#173166;text-decoration:none;font-weight:900;display:grid;place-items:center}.table-scroll{overflow:auto;max-height:calc(100vh - 360px);padding-right:4px}.modern-table{width:100%;border-collapse:separate;border-spacing:0}.modern-table th{position:sticky;top:0;z-index:1;background:#fff;color:#74809a;font-size:12px;text-transform:uppercase;letter-spacing:.08em;font-weight:900;padding:14px 16px;border-bottom:1px solid #e5ecf8;white-space:nowrap}.modern-table td{padding:18px 16px;border-bottom:1px solid #e9eef8;vertical-align:middle}.modern-table tr:last-child td{border-bottom:0}.modern-table tbody tr:hover td{background:#fbfdff}.client-cell{display:flex;gap:14px;align-items:center;min-width:330px}.client-avatar{width:38px;height:38px;border-radius:13px;background:#edf3ff;color:#315df4;display:grid;place-items:center;font-weight:900}.client-cell strong{display:block;font-weight:900;color:#071b3a}.client-cell small{display:block;margin-top:5px;color:#63708a}.client-cell em{display:inline-flex;margin-top:7px;background:#f3f6fd;border-radius:8px;padding:2px 8px;color:#52617b;font-style:normal;font-size:12px}.date-stack b{font-weight:700;color:#14284a}.date-stack span,.muted{display:block;color:#65738c;font-size:13px;margin-top:4px}.status-chip{appearance:none;border-radius:999px;border:0;padding:9px 14px;font-weight:800;font-size:12px;min-width:156px;text-align:center;cursor:pointer;background:#edf3ff;color:#1750c7}.chip-muted{background:#f4f6fb;color:#6b7890}.chip-blue{background:#eaf8ff;color:#0877a8}.chip-green{background:#eafbf2;color:#07935c}.chip-dark{background:#eef3ff;color:#315df4}.chip-orange{background:#fff4e8;color:#b86616}.chip-red{background:#fff1f1;color:#d33a3a}.receipt-box{display:inline-flex;flex-direction:column;gap:4px;background:#eafbf2;border-radius:12px;padding:8px 12px;color:#07935c}.receipt-box span{font-size:12px}.receipt-box b{font-size:13px}.doc-link{width:42px;height:42px;border:1px solid #dfe7f5;border-radius:14px;color:#315df4;background:#fff;display:grid;place-items:center;text-decoration:none;font-size:21px}.doc-link:hover,.icon-btn:hover{background:#edf3ff}.icon-btn{width:40px;height:40px;border:1px solid #dfe7f5;border-radius:14px;color:#02a66a;background:#fff;display:grid;place-items:center;text-decoration:none}.empty-state{padding:70px 20px;text-align:center;display:grid;place-items:center;gap:8px;color:#66748d}.empty-state i{font-size:38px;color:#b8c4d9}.empty-state b{font-size:18px;color:#071b3a}.modal-content.crm-modal{border:0;border-radius:24px;overflow:hidden;box-shadow:none}.modal-header{padding:22px 24px;border-bottom:1px solid #e9eef8;background:#fff}.modal-header h5{margin:0;color:#071b3a;font-weight:900;letter-spacing:-.035em}.modal-header p{margin:5px 0 0;color:#66748d}.compact-body{padding:20px 24px;background:#fbfdff}.modal-footer{border-top:1px solid #e9eef8;background:#fff;padding:16px 24px}.form-block{background:#fff;border:1px solid #e5ecf8;border-radius:18px;padding:16px;margin-bottom:12px}.form-block h6{display:flex;align-items:center;gap:9px;margin:0 0 14px;font-weight:900;color:#071b3a}.form-block h6 span{width:24px;height:24px;background:#edf3ff;color:#315df4;border-radius:9px;display:grid;place-items:center;font-size:12px}.form-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:12px}.col-12{grid-column:span 12}.col-8{grid-column:span 8}.col-6{grid-column:span 6}.col-4{grid-column:span 4}.col-3{grid-column:span 3}.field{display:block}.field span{display:block;margin-bottom:6px;color:#5b6880;font-size:13px;font-weight:800}.form-control,.form-select{height:46px;border:1px solid #dfe7f5;border-radius:14px;background:#fff;color:#071b3a}.form-control:focus,.form-select:focus{border-color:#9cb2ff;box-shadow:0 0 0 .2rem rgba(49,93,244,.08)}textarea.form-control{height:auto;min-height:76px}.hint-box{border:1px solid #dbe6ff;background:#f1f5ff;color:#315df4;border-radius:14px;padding:13px;font-size:13px;font-weight:800;align-self:end}.dropzone{position:relative;border:1.5px dashed #b9c6dc;border-radius:18px;background:#f8fbff;min-height:94px;padding:18px;display:flex;align-items:center;gap:14px;cursor:pointer}.dropzone:hover,.dropzone.drag{background:#edf3ff;border-color:#315df4}.dropzone i{font-size:28px;color:#315df4}.dropzone b{display:block;color:#071b3a}.dropzone small{display:block;color:#66748d;margin-top:3px}.dropzone input{position:absolute;inset:0;opacity:0;cursor:pointer}.big-search{height:54px;font-size:16px}.result-list{display:grid;gap:8px;margin-top:12px}.result-item{width:100%;text-align:left;background:#fff;border:1px solid #dfe7f5;border-radius:14px;padding:12px}.result-item:hover{background:#f8fbff;border-color:#b5c3ff}.result-item b{display:block}.result-item span,.result-hint{display:block;color:#66748d;font-size:13px}.selected-pill{background:#eafbf2;border:1px solid #b8efd6;color:#07935c;border-radius:14px;padding:12px;font-weight:900}.calendar-input{cursor:pointer}.install-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:var(--bg)}.install-card{width:min(520px,100%);background:#fff;border:1px solid var(--line);border-radius:24px;padding:28px}.install-card h1{margin:0 0 8px;font-weight:900;color:#071b3a}.install-card p{color:var(--muted);margin:0 0 20px}.brand-dot{width:44px;height:44px;border-radius:15px;background:linear-gradient(135deg,var(--blue),var(--blue2));margin-bottom:16px}.stack{display:grid;gap:12px}.success-box{border:1px solid #b8efd6;background:#eafbf2;color:#07935c;border-radius:16px;padding:14px;font-weight:900}@media(max-width:1280px){.stats-row{grid-template-columns:repeat(4,1fr)}}@media(max-width:900px){.page-shell{padding:24px 14px}.page-head,.week-top{display:block}.head-actions{justify-content:flex-start;margin-top:18px}.toolbar{grid-template-columns:1fr}.stats-row{margin-left:0;margin-right:0;grid-template-columns:repeat(2,1fr)}.table-scroll{max-height:none}.form-grid{grid-template-columns:1fr}.col-12,.col-8,.col-6,.col-4,.col-3{grid-column:auto}}@media(max-width:560px){.round-action{display:none}.stats-row{grid-template-columns:1fr}.head-actions .btn{width:100%;justify-content:center}.week-buttons{margin-top:14px}.today-line{height:auto;align-items:flex-start;padding:14px;flex-wrap:wrap}.data-card{padding:12px}.modern-table td,.modern-table th{padding:14px 10px}}

/* user compact redesign 20260612 */
body{background:#f4f6fb;color:#071b3a;font-weight:400!important}.page-shell{padding:36px 24px 48px}.page-head{margin-bottom:22px;align-items:center}.head-title h1{font-size:31px;font-weight:500!important;letter-spacing:-.03em}.head-title p{font-weight:400!important;margin-top:10px}.head-actions{gap:12px}.head-actions .round-action,.week-card{display:none!important}.btn,.primary-pill,.light-pill,.mini-pill,.reset-btn,.status-filter,.stat-card span,.stat-card b,.modern-table th,.client-cell strong,.date-stack b,.receipt-box b,.form-block h6,.field span,.dropzone b,.hint-box,.empty-state b,.result-item b,.selected-pill,.modal-header h5{font-weight:400!important}.primary-pill,.light-pill{height:46px;border-radius:14px;padding:0 18px;box-shadow:none}.primary-pill{background:#5267f6}.light-pill{background:#fff;color:#243455;border:1px solid #dfe7f5}.stats-row{margin:0 12px 22px;gap:10px}.stat-card{height:46px;border-radius:12px;padding:0 14px;background:#fff}.data-card{border-radius:22px;padding:18px 18px 8px}.toolbar{grid-template-columns:1fr 220px 104px;gap:10px;margin-bottom:12px}.live-search,.status-filter,.reset-btn{height:48px;border-radius:14px}.modern-table th{font-size:11px;padding:13px 14px}.modern-table td{padding:15px 14px}.client-cell{min-width:270px;gap:0}.client-avatar{display:none!important}.client-cell strong{font-size:15px;line-height:1.25}.client-cell small{margin-top:4px}.client-cell em{margin-top:6px}.date-stack span{font-size:12px}.receipt-box{padding:0;background:transparent;color:#071b3a;border-radius:0}.receipt-box b{font-size:14px}.status-chip{font-weight:400!important;padding:8px 12px;min-width:140px}.modal-dialog.modal-lg{max-width:900px}.modal-content.crm-modal{border-radius:22px}.modal-header{padding:18px 22px}.modal-header h5{font-size:20px}.modal-header p{font-size:13px;margin-top:4px}.compact-body{padding:16px;background:#f7f9fe}.form-block{border-radius:16px;padding:14px;margin-bottom:10px}.form-block h6{margin-bottom:10px;font-size:14px;color:#315df4}.form-block h6 span{display:none}.form-grid{gap:10px}.field span{font-size:12px;margin-bottom:5px;color:#647089}.form-control,.form-select{height:42px;border-radius:12px;font-size:14px}.form-control::placeholder{color:#9aa6bb}textarea.form-control{min-height:58px}.hint-box{padding:11px;border-radius:12px;font-size:12px;line-height:1.25}.dropzone{min-height:74px;border-radius:14px;padding:13px}.dropzone i{font-size:22px}.dropzone small{font-size:12px}.modal-footer{padding:13px 22px}.big-search{height:46px}.result-item{border-radius:12px;padding:10px 12px}.doc-link,.icon-btn{width:38px;height:38px;border-radius:12px}@media(max-width:900px){.toolbar{grid-template-columns:1fr}.form-grid{grid-template-columns:repeat(12,1fr)}.col-12{grid-column:span 12}.col-8{grid-column:span 8}.col-6{grid-column:span 6}.col-4{grid-column:span 4}.col-3{grid-column:span 3}}@media(max-width:680px){.form-grid{grid-template-columns:1fr}.col-12,.col-8,.col-6,.col-4,.col-3{grid-column:auto}.page-head{display:block}.head-actions{margin-top:16px}.head-actions .btn{width:100%}}


/* clean correction 20260612: нормальная ширина главной и формы */
.page-shell{width:100%;max-width:1920px;margin:0 auto;padding:34px 24px 48px!important}.data-card{width:100%;padding:18px 18px 10px!important;border-radius:24px;background:#fff}.toolbar-clean{display:grid!important;grid-template-columns:minmax(520px,1fr) 290px 96px 112px!important;gap:12px!important;margin-bottom:16px!important;align-items:center}.toolbar-clean .live-search,.toolbar-clean .status-filter,.toolbar-clean .filter-btn,.toolbar-clean .reset-btn{height:50px!important;border-radius:16px!important}.toolbar-clean .status-filter{width:100%;min-width:0}.filter-btn{border:0;background:#5267f6;color:#fff;text-decoration:none;display:grid;place-items:center;font-weight:400!important}.reset-btn{background:#edf3ff;color:#173166;text-decoration:none;display:grid;place-items:center;font-weight:400!important}.table-scroll{max-height:calc(100vh - 300px)!important}.modern-table{min-width:1160px}.modern-table th,.modern-table td{padding-left:16px!important;padding-right:16px!important}.modern-table th:first-child,.modern-table td:first-child{width:30%}.client-cell{min-width:260px!important}.client-cell em,.date-stack span.extra-line{display:none!important}.date-stack b{font-size:14px;font-weight:400!important}.receipt-box{background:transparent!important;border:0!important;padding:0!important;color:#071b3a!important}.receipt-box b{font-weight:400!important}.actions-inline{display:flex;gap:8px;align-items:center;white-space:nowrap}.icon-btn,.doc-link{width:38px!important;height:38px!important;border-radius:13px!important}.modal-dialog.modal-xl{max-width:1040px!important}.crm-modal{border-radius:24px!important}.compact-body{padding:18px!important;background:#f7f9fe!important}.form-block{padding:18px!important;border-radius:18px!important;margin-bottom:12px!important}.form-block h6{margin-bottom:14px!important;color:#315df4!important;font-size:15px!important;font-weight:400!important}.form-grid{display:grid!important;grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:14px!important;align-items:end!important}.form-grid > *{min-width:0!important;width:100%!important;max-width:none!important;flex:none!important}.span-12{grid-column:span 12!important}.span-8{grid-column:span 8!important}.span-7{grid-column:span 7!important}.span-6{grid-column:span 6!important}.span-5{grid-column:span 5!important}.span-4{grid-column:span 4!important}.span-3{grid-column:span 3!important}.span-2{grid-column:span 2!important}.field span{font-size:13px!important;color:#5f6c84!important;margin-bottom:7px!important;font-weight:400!important}.form-control,.form-select{height:48px!important;border-radius:14px!important;padding:0 14px!important;font-size:15px!important;width:100%!important}.form-select{padding-right:36px!important}textarea.form-control{min-height:76px!important;padding-top:12px!important;line-height:1.35}.age-preview{min-height:48px!important;border-radius:14px!important;display:flex!important;align-items:center!important;padding:12px 14px!important;background:#f1f5ff!important;color:#315df4!important;font-size:14px!important;line-height:1.25}.dropzone{min-height:86px!important;border-radius:18px!important}.modal-header{padding:22px 24px!important}.modal-footer{padding:16px 24px!important}.head-actions .primary-pill,.head-actions .light-pill{min-width:170px;justify-content:center}.status-chip{min-width:148px!important}
@media(max-width:1100px){.toolbar-clean{grid-template-columns:1fr 240px 90px 104px!important}.modern-table{min-width:1040px}.span-6,.span-7{grid-column:span 12!important}.span-4,.span-3{grid-column:span 6!important}.span-2{grid-column:span 4!important}}
@media(max-width:760px){.toolbar-clean{grid-template-columns:1fr!important}.form-grid{grid-template-columns:1fr!important}.span-12,.span-8,.span-7,.span-6,.span-5,.span-4,.span-3,.span-2{grid-column:auto!important}.page-shell{padding:22px 12px 36px!important}.modal-dialog.modal-xl{max-width:calc(100% - 18px)!important}}

/* final interaction and 45-years patch */
a,a:visited,a:hover,a:focus,a:active,
button,button:hover,button:focus,
.stat-card:hover,.stat-card.active,.primary-pill:hover,.light-pill:hover,.round-action:hover,.doc-link:hover,.icon-btn:hover,.result-item:hover{
  color:inherit;
  text-decoration:none!important;
  box-shadow:none!important;
  transform:none!important;
  filter:none!important;
}
a:hover,button:hover,.btn:hover,.stat-card:hover,.doc-link:hover,.icon-btn:hover,.result-item:hover,select:hover{cursor:pointer}
.stat-card:hover,.modern-table tbody tr:hover td,.doc-link:hover,.icon-btn:hover,.result-item:hover{background:inherit!important;border-color:inherit!important}
.primary-pill:hover{background:#5267f6!important;color:#fff!important}.light-pill:hover{background:#fff!important;color:#243455!important}
.toolbar.toolbar-clean{grid-template-columns:1fr 260px 112px!important}.filter-btn{display:none!important}
.name-line{display:inline-flex;align-items:center;gap:7px;line-height:1.25}.warn45{font-size:14px;vertical-align:middle}.warn45-gray{color:#9aa3b2}.warn45-red{color:#ef4444}.dirty-note{display:block;margin-top:6px;color:#ef4444!important;font-size:12px!important}.actions-inline{display:flex;align-items:center;gap:8px;white-space:nowrap}.icon-btn.edit{color:#315df4}.icon-btn.good{color:#02a66a}.receipt-box{display:inline-flex!important;padding:0!important;background:transparent!important}.receipt-box b{font-size:14px!important;color:#071b3a!important}.age-preview{min-height:46px;display:flex;align-items:center;border:1px solid #dfe7f5;background:#f8fbff;border-radius:14px;padding:10px 14px;color:#53617a;font-size:13px;line-height:1.25}.age-preview.age-warn{border-color:#fecaca;background:#fff1f1;color:#b91c1c}.age-preview.age-warn-soft{border-color:#d8dee9;background:#f7f8fb;color:#5b6472}.modal-dialog.modal-xl{max-width:1040px}.compact-body{padding:18px 20px!important}.form-block{padding:18px!important;margin-bottom:12px!important}.form-grid{grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:14px!important}.span-12{grid-column:span 12}.span-8{grid-column:span 8}.span-6{grid-column:span 6}.span-4{grid-column:span 4}.span-3{grid-column:span 3}.span-2{grid-column:span 2}.form-control,.form-select{height:48px!important;border-radius:14px!important;padding-left:14px!important;padding-right:14px!important}.field span{font-size:13px!important;margin-bottom:7px!important}.form-block h6{font-size:15px!important;margin-bottom:14px!important}.data-card{padding:18px!important}.table-scroll{max-height:calc(100vh - 300px)!important}.client-cell{min-width:300px!important}.modern-table th,.modern-table td{padding-left:16px!important;padding-right:16px!important}@media(max-width:900px){.toolbar.toolbar-clean{grid-template-columns:1fr!important}.form-grid{grid-template-columns:1fr!important}.span-12,.span-8,.span-6,.span-4,.span-3,.span-2{grid-column:auto!important}}

/* mail/settings patch */
a, a:hover, a:focus, a:active,
button, button:hover, button:focus, button:active,
.stat-card:hover,.stat-card.active,.doc-link:hover,.icon-btn:hover,.primary-pill:hover,.light-pill:hover,.round-action:hover,.result-item:hover{
  text-decoration:none!important;
}
a:hover, a:focus, a:active{color:inherit!important;background:inherit!important;box-shadow:none!important;filter:none!important;transform:none!important}
button:hover, .btn:hover, .primary-pill:hover, .light-pill:hover, .round-action:hover, .icon-btn:hover, .doc-link:hover{filter:none!important;transform:none!important;box-shadow:none!important}
.modern-table tbody tr:hover td{background:#fbfcff!important;border-bottom-color:#e9eef8!important;text-decoration:none!important}
.modern-table tbody tr:hover *{text-decoration:none!important}
.settings-action{display:grid!important;background:#edf3ff!important;border:1px solid #d9e4fb!important;color:#2859df!important;flex:0 0 auto}
.settings-action:hover{background:#edf3ff!important;color:#2859df!important;border-color:#d9e4fb!important}
.actions-inline{display:flex;align-items:center;gap:8px;white-space:nowrap}.icon-btn.send{color:#315df4}.icon-btn.edit{color:#315df4}.icon-btn.good{color:#07935c}.attach-list{display:grid;gap:8px}.attach-item{min-height:46px;border:1px solid #dfe7f5;border-radius:14px;background:#fff;display:flex;align-items:center;gap:10px;padding:0 14px;cursor:pointer}.attach-item:hover{background:#fff!important;border-color:#dfe7f5!important}.attach-item span{display:flex;align-items:center;gap:9px;color:#071b3a}.attach-item input{width:16px;height:16px}.head-actions .round-action{width:46px;height:46px;border-radius:14px}

/* settings dropdown + archive/tourists pages */
.settings-dropdown{display:inline-flex;position:relative}.crm-dropdown{border:1px solid #d9e4fb;border-radius:16px;padding:8px;box-shadow:none;background:#fff;min-width:210px}.crm-dropdown .dropdown-item{border-radius:12px;min-height:40px;display:flex;align-items:center;gap:10px;color:#071b3a!important;font-weight:400}.crm-dropdown .dropdown-item:hover,.crm-dropdown .dropdown-item:focus{background:#f7f9fe!important;color:#071b3a!important}.crm-dropdown .dropdown-item i{width:18px;color:#315df4;text-align:center}.icon-btn.archive{color:#6b7890}.toolbar-clean:has(.reset-btn):not(:has(.status-filter)){grid-template-columns:1fr 112px!important}.status-chip{display:inline-flex;align-items:center;justify-content:center;text-decoration:none!important}.modern-table tbody tr:hover td{background:#fbfcff!important}.modern-table tbody tr:hover a,.modern-table tbody tr:hover button,.modern-table tbody tr:hover span,.modern-table tbody tr:hover strong{ text-decoration:none!important}.round-action.settings-action{width:46px!important;height:46px!important;border-radius:14px!important;background:#edf3ff!important;border:1px solid #d9e4fb!important;color:#2859df!important}.round-action.settings-action:hover,.round-action.settings-action:focus{background:#edf3ff!important;border-color:#d9e4fb!important;color:#2859df!important;transform:none!important;filter:none!important;box-shadow:none!important}


/* settings icon restore */
.head-title h1 strong{font-weight:700!important;}
.head-actions .settings-dropdown{display:inline-flex!important;position:relative!important;}
.head-actions .settings-dropdown .round-action,
.head-actions .settings-dropdown .settings-action{
  display:grid!important;
  place-items:center!important;
  width:46px!important;
  height:46px!important;
  min-width:46px!important;
  border-radius:14px!important;
  background:#edf3ff!important;
  border:1px solid #d9e4fb!important;
  color:#2859df!important;
  padding:0!important;
  opacity:1!important;
  visibility:visible!important;
  cursor:pointer!important;
}
.head-actions .settings-dropdown .round-action:hover,
.head-actions .settings-dropdown .round-action:focus,
.head-actions .settings-dropdown .settings-action:hover,
.head-actions .settings-dropdown .settings-action:focus{
  background:#edf3ff!important;
  border-color:#d9e4fb!important;
  color:#2859df!important;
  transform:none!important;
  filter:none!important;
  box-shadow:none!important;
}
.settings-action i{font-size:18px!important;line-height:1!important;display:block!important;}
.crm-dropdown{
  margin-top:10px!important;
  min-width:245px!important;
  border:1px solid #dfe7f5!important;
  border-radius:18px!important;
  padding:12px 0!important;
  box-shadow:none!important;
  background:#fff!important;
}
.crm-dropdown .dropdown-item{
  min-height:50px!important;
  padding:0 24px!important;
  display:flex!important;
  align-items:center!important;
  gap:0!important;
  border-radius:0!important;
  font-size:15px!important;
  font-weight:400!important;
  color:#071b3a!important;
  background:#fff!important;
}
.crm-dropdown .dropdown-item:hover,
.crm-dropdown .dropdown-item:focus{
  background:#fff!important;
  color:#071b3a!important;
  text-decoration:none!important;
}
.crm-dropdown .dropdown-item i{display:none!important;}
@media(max-width:560px){.head-actions .settings-dropdown .round-action{display:grid!important;}}


/* final hover/home-button polish */
.modern-table tbody tr:hover td{
  background:#fbfcff!important;
  color:inherit!important;
  text-decoration:none!important;
}
.modern-table tbody tr:hover a,
.modern-table tbody tr:hover button,
.modern-table tbody tr:hover i,
.modern-table tbody tr:hover span,
.modern-table tbody tr:hover strong,
.modern-table tbody tr:hover b{
  text-decoration:none!important;
}
.modern-table tbody tr:hover .doc-link,
.modern-table tbody tr:hover .icon-btn{
  background:#fff!important;
  border-color:#dfe7f5!important;
}
.modern-table tbody tr:hover .doc-link,
.modern-table tbody tr:hover .doc-link i{color:#315df4!important;}
.modern-table tbody tr:hover .icon-btn.edit,
.modern-table tbody tr:hover .icon-btn.edit i{color:#315df4!important;}
.modern-table tbody tr:hover .icon-btn.good,
.modern-table tbody tr:hover .icon-btn.good i{color:#07935c!important;}
.modern-table tbody tr:hover .icon-btn.send,
.modern-table tbody tr:hover .icon-btn.send i{color:#315df4!important;}
.modern-table tbody tr:hover .icon-btn.archive,
.modern-table tbody tr:hover .icon-btn.archive i{color:#6b7890!important;}
.back-home-pill{
  height:46px;
  border:1px solid #d9e4fb;
  border-radius:14px;
  background:#edf3ff;
  color:#2859df!important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  padding:0 18px;
  min-width:150px;
  line-height:1;
  text-decoration:none!important;
  font-size:14px;
  font-weight:400!important;
  white-space:nowrap;
}
.back-home-pill i{font-size:14px;color:#2859df!important;line-height:1;}
.back-home-pill:hover,
.back-home-pill:focus,
.back-home-pill:active{
  background:#edf3ff!important;
  color:#2859df!important;
  border-color:#d9e4fb!important;
  text-decoration:none!important;
  transform:none!important;
  filter:none!important;
  box-shadow:none!important;
}
.back-home-pill:hover i,
.back-home-pill:focus i{color:#2859df!important;}


/* fixed unique soft-red delete icon, no conflicts */
.actions-inline .delete-action-btn,
.modern-table .actions-inline .delete-action-btn,
.modern-table tbody tr:hover .actions-inline .delete-action-btn,
.modern-table tbody tr:hover .actions-inline .delete-action-btn:link,
.modern-table tbody tr:hover .actions-inline .delete-action-btn:visited,
.modern-table tbody tr:hover .actions-inline .delete-action-btn:hover,
.modern-table tbody tr:hover .actions-inline .delete-action-btn:focus,
.modern-table tbody tr:hover .actions-inline .delete-action-btn:active{
  background:#fff!important;
  border-color:#dfe7f5!important;
  color:#c87474!important;
  box-shadow:none!important;
  outline:none!important;
  filter:none!important;
  transform:none!important;
}
.actions-inline .delete-action-btn i,
.modern-table .actions-inline .delete-action-btn i,
.modern-table tbody tr:hover .actions-inline .delete-action-btn i,
.modern-table tbody tr:hover .actions-inline .delete-action-btn:hover i,
.modern-table tbody tr:hover .actions-inline .delete-action-btn:focus i,
.modern-table tbody tr:hover .actions-inline .delete-action-btn:active i{
  color:#c87474!important;
}

/* edit tourist file manager */
.edit-file-list{display:grid;gap:10px;margin-bottom:14px}
.edit-file-row{display:grid;grid-template-columns:minmax(240px,1fr) minmax(220px,320px) auto;gap:10px;align-items:center;background:#fff;border:1px solid #dfe7f5;border-radius:14px;padding:10px 12px}
.edit-file-name{display:flex;align-items:center;gap:10px;min-width:0;color:#071b3a;font-size:14px}
.edit-file-name i{color:#315df4!important;flex:0 0 auto}
.edit-file-name span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.edit-file-replace{display:flex;align-items:center;gap:9px;margin:0;color:#647089;font-size:13px}
.edit-file-replace input{width:100%;font-size:13px;color:#647089}
.edit-file-delete{height:38px;display:flex;align-items:center;gap:7px;margin:0;padding:0 12px;border:1px solid #dfe7f5;border-radius:12px;background:#fff;color:#c87474;font-size:13px;white-space:nowrap;cursor:pointer}
.edit-file-delete input{accent-color:#c87474}
.edit-dropzone{margin-top:12px}
@media(max-width:760px){.edit-file-row{grid-template-columns:1fr}.edit-file-replace{display:block}.edit-file-replace span{display:block;margin-bottom:6px}}


/* mobile adaptive layout 20260612 */
@media (max-width: 820px){
  html, body{
    width:100% !important;
    max-width:100% !important;
    overflow-x:hidden !important;
    -webkit-text-size-adjust:100%;
  }
  body{
    background:#f4f6fb !important;
    font-size:14px !important;
  }
  .page-shell{
    width:100% !important;
    max-width:100% !important;
    padding:16px 10px 28px !important;
  }
  .page-head{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:14px !important;
    align-items:stretch !important;
    margin-bottom:16px !important;
  }
  .head-title h1{
    font-size:25px !important;
    line-height:1.08 !important;
    letter-spacing:-.03em !important;
  }
  .head-title p{
    margin-top:7px !important;
    font-size:13px !important;
    line-height:1.35 !important;
  }
  .head-actions{
    width:100% !important;
    display:grid !important;
    grid-template-columns:46px minmax(0,1fr) !important;
    gap:9px !important;
    justify-content:stretch !important;
    align-items:center !important;
  }
  .head-actions .settings-dropdown{
    width:46px !important;
    min-width:46px !important;
  }
  .head-actions .settings-action,
  .head-actions .round-action{
    width:46px !important;
    height:46px !important;
    min-width:46px !important;
  }
  .head-actions .primary-pill,
  .head-actions .light-pill,
  .head-actions .back-home-pill{
    width:100% !important;
    min-width:0 !important;
    height:46px !important;
    border-radius:14px !important;
    justify-content:center !important;
    padding:0 12px !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    font-size:14px !important;
  }
  .head-actions .light-pill{
    grid-column:1 / -1 !important;
  }
  .head-actions .back-home-pill{
    grid-column:1 / -1 !important;
  }
  .crm-dropdown{
    position:absolute !important;
    left:0 !important;
    right:auto !important;
    min-width:min(280px, calc(100vw - 20px)) !important;
    max-width:calc(100vw - 20px) !important;
    border-radius:16px !important;
  }

  .stats-row{
    display:flex !important;
    gap:8px !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    margin:0 -10px 14px !important;
    padding:0 10px 4px !important;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
  }
  .stats-row::-webkit-scrollbar{display:none;}
  .stat-card{
    flex:0 0 138px !important;
    height:54px !important;
    padding:0 12px !important;
    border-radius:14px !important;
    scroll-snap-align:start;
  }
  .stat-card span{
    font-size:12px !important;
    line-height:1.15 !important;
  }
  .stat-card b{
    font-size:15px !important;
  }

  .data-card{
    width:100% !important;
    border-radius:18px !important;
    padding:12px !important;
    overflow:hidden !important;
  }
  .toolbar,
  .toolbar-clean{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:9px !important;
    margin-bottom:12px !important;
  }
  .live-search,
  .status-filter,
  .reset-btn,
  .filter-btn{
    width:100% !important;
    min-width:0 !important;
    height:46px !important;
    border-radius:14px !important;
  }
  .live-search input{
    min-width:0 !important;
    font-size:14px !important;
  }

  .table-scroll{
    max-height:none !important;
    overflow:visible !important;
    padding:0 !important;
  }
  .modern-table{
    min-width:0 !important;
    width:100% !important;
    border-collapse:separate !important;
    border-spacing:0 10px !important;
  }
  .modern-table thead{
    display:none !important;
  }
  .modern-table tbody,
  .modern-table tr,
  .modern-table td{
    display:block !important;
    width:100% !important;
    min-width:0 !important;
  }
  .modern-table tbody tr{
    background:#fff !important;
    border:1px solid #e3eaf6 !important;
    border-radius:16px !important;
    overflow:hidden !important;
  }
  .modern-table tbody tr:hover td{
    background:#fff !important;
  }
  .modern-table td{
    padding:10px 12px !important;
    border-bottom:1px solid #eef2fa !important;
  }
  .modern-table td:last-child{
    border-bottom:0 !important;
  }
  .modern-table td:empty{display:none!important;}
  .modern-table td::before{
    display:block;
    margin-bottom:5px;
    color:#8a95aa;
    font-size:11px;
    line-height:1.1;
    text-transform:uppercase;
    letter-spacing:.06em;
  }
  .modern-table td:nth-child(1)::before{content:'Турист';}
  .modern-table td:nth-child(2)::before{content:'Дата / возраст';}
  .modern-table td:nth-child(3)::before{content:'Срок пропуска';}
  .modern-table td:nth-child(4)::before{content:'Статус / документ';}
  .modern-table td:nth-child(5)::before{content:'Получение / адрес';}
  .modern-table td:nth-child(6)::before{content:'Заявление / действие';}
  .modern-table td:nth-child(7)::before{content:'Действия';}
  .client-cell{
    min-width:0 !important;
    width:100% !important;
  }
  .client-cell strong,
  .name-line{
    max-width:100% !important;
    overflow-wrap:anywhere !important;
  }
  .date-stack b,
  .date-stack span,
  .muted{
    overflow-wrap:anywhere !important;
  }
  .status-chip{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    height:42px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
  }
  .receipt-box{
    display:block !important;
    width:100% !important;
  }
  .doc-link{
    width:42px !important;
    height:42px !important;
  }
  .actions-inline{
    display:grid !important;
    grid-template-columns:repeat(5, minmax(42px,1fr)) !important;
    gap:8px !important;
    width:100% !important;
    white-space:normal !important;
  }
  .actions-inline .icon-btn{
    width:100% !important;
    height:42px !important;
    min-width:0 !important;
    border-radius:13px !important;
  }

  .modal-dialog,
  .modal-dialog.modal-lg,
  .modal-dialog.modal-xl{
    width:calc(100% - 16px) !important;
    max-width:calc(100% - 16px) !important;
    margin:8px auto !important;
  }
  .modal-content.crm-modal{
    max-height:calc(100vh - 16px) !important;
    border-radius:18px !important;
    overflow:hidden !important;
  }
  .modal-header{
    padding:15px 16px !important;
    align-items:flex-start !important;
    gap:10px !important;
  }
  .modal-header h5{
    font-size:19px !important;
    line-height:1.15 !important;
  }
  .modal-header p{
    font-size:12px !important;
    line-height:1.3 !important;
  }
  .compact-body{
    padding:12px !important;
    overflow:auto !important;
  }
  .modal-footer{
    padding:12px !important;
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:8px !important;
  }
  .modal-footer .btn{
    width:100% !important;
    justify-content:center !important;
  }
  .form-block{
    padding:13px !important;
    border-radius:16px !important;
    margin-bottom:10px !important;
  }
  .form-block h6{
    font-size:14px !important;
    margin-bottom:11px !important;
  }
  .form-grid{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:10px !important;
  }
  .form-grid > *,
  .span-12,.span-8,.span-7,.span-6,.span-5,.span-4,.span-3,.span-2,
  .col-12,.col-8,.col-6,.col-4,.col-3{
    grid-column:auto !important;
    width:100% !important;
    min-width:0 !important;
  }
  .field span{
    font-size:12px !important;
    margin-bottom:6px !important;
  }
  .form-control,
  .form-select{
    width:100% !important;
    min-width:0 !important;
    height:46px !important;
    border-radius:13px !important;
    font-size:16px !important; /* iOS без авто-зума */
    padding-left:12px !important;
    padding-right:12px !important;
  }
  textarea.form-control{
    min-height:70px !important;
    padding-top:10px !important;
  }
  .age-preview{
    min-height:46px !important;
    border-radius:13px !important;
    padding:11px 12px !important;
  }
  .dropzone{
    min-height:86px !important;
    border-radius:15px !important;
    padding:14px !important;
    align-items:flex-start !important;
  }
  .dropzone i{
    font-size:23px !important;
    margin-top:2px !important;
  }
  .dropzone b,
  .dropzone small{
    line-height:1.25 !important;
  }
  .result-list,
  .attach-list,
  .edit-file-list{
    width:100% !important;
    min-width:0 !important;
  }
  .result-item,
  .attach-item,
  .edit-file-row{
    width:100% !important;
    min-width:0 !important;
    overflow:hidden !important;
  }
  .edit-file-row{
    grid-template-columns:1fr !important;
    gap:9px !important;
  }
  .edit-file-name span{
    white-space:normal !important;
    overflow-wrap:anywhere !important;
  }
  .edit-file-replace{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:6px !important;
  }
  .edit-file-delete{
    width:100% !important;
    justify-content:center !important;
  }
  .empty-state{
    padding:34px 12px !important;
  }
}

@media (max-width: 380px){
  .page-shell{padding-left:8px!important;padding-right:8px!important;}
  .head-actions{grid-template-columns:44px minmax(0,1fr)!important;gap:7px!important;}
  .head-actions .settings-action,.head-actions .round-action{width:44px!important;height:44px!important;min-width:44px!important;}
  .actions-inline{grid-template-columns:repeat(3, minmax(42px,1fr)) !important;}
  .stat-card{flex-basis:126px!important;}
}


/* mobile refinements requested */
@media (max-width: 820px){
  /* на мобильном убираем верхнюю строку счетчиков */
  .stats-row{
    display:none !important;
  }

  /* карточки туристов не слипаются */
  .modern-table{
    border-spacing:0 !important;
  }
  .modern-table tbody{
    display:grid !important;
    gap:16px !important;
    width:100% !important;
  }
  .modern-table tbody tr{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
    gap:0 !important;
    margin:0 !important;
  }
  .modern-table tbody tr:hover td{
    background:transparent !important;
  }
  .modern-table tbody tr:hover{
    background:#fff !important;
  }

  .modern-table td{
    background:transparent !important;
  }

  /* основные строки на всю ширину */
  .modern-table td:nth-child(1),
  .modern-table td:nth-child(2),
  .modern-table td:nth-child(3),
  .modern-table td:nth-child(6),
  .modern-table td:nth-child(7){
    grid-column:1 / -1 !important;
  }

  /* статус и получение в две колонки */
  .modern-table td:nth-child(4){
    grid-column:1 / 2 !important;
    border-right:1px solid #eef2fa !important;
  }
  .modern-table td:nth-child(5){
    grid-column:2 / 3 !important;
  }

  .modern-table td:nth-child(4)::before{content:'Статус';}
  .modern-table td:nth-child(5)::before{content:'Получение';}
  .modern-table td:nth-child(6)::before{content:'Заявление';}

  /* фон и обводка только у бейджа статуса, не у всей строки */
  .status-chip{
    width:auto !important;
    min-width:0 !important;
    max-width:100% !important;
    height:34px !important;
    min-height:34px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding:0 12px !important;
    border:1px solid currentColor !important;
    border-radius:999px !important;
    background-clip:padding-box !important;
    white-space:nowrap !important;
  }

  .receipt-box{
    width:auto !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    background:transparent !important;
    padding:0 !important;
    border-radius:0 !important;
    color:#071b3a !important;
  }
  .receipt-box span{
    display:none !important;
  }
  .receipt-box b{
    font-size:14px !important;
    line-height:34px !important;
    color:#071b3a !important;
  }

  /* в мобильной карточке заявление отдельно, действия остаются внизу */
  .modern-table td:nth-child(6){
    display:flex !important;
    align-items:center !important;
    gap:10px !important;
  }
  .modern-table td:nth-child(6)::before{
    margin:0 8px 0 0 !important;
    min-width:82px !important;
  }

  /* даты по центру поля */
  input[type="date"].form-control,
  input[type="date"].form-select,
  .form-control[type="date"],
  .form-select[type="date"],
  .calendar-input{
    height:46px !important;
    line-height:46px !important;
    padding-top:0 !important;
    padding-bottom:0 !important;
    display:flex !important;
    align-items:center !important;
  }
  input[type="date"]::-webkit-date-and-time-value{
    min-height:46px !important;
    line-height:46px !important;
    display:flex !important;
    align-items:center !important;
    text-align:left !important;
  }
  input[type="date"]::-webkit-datetime-edit{
    line-height:46px !important;
    padding:0 !important;
  }
}


/* unified add-tourist flow */
.existing-files-preview{display:none;grid-column:1 / -1;}
.existing-files-preview.show{display:block;background:#f8fbff;border:1px solid #dfe7f5;border-radius:14px;padding:12px 14px;color:#52617b;}
.existing-files-title{display:flex;align-items:center;gap:8px;margin-bottom:8px;color:#315df4;font-size:14px;}
.existing-files-list{display:flex;flex-wrap:wrap;gap:8px;}
.existing-files-list span{display:inline-flex;align-items:center;gap:6px;background:#fff;border:1px solid #e5ecf8;border-radius:999px;padding:7px 10px;font-size:13px;color:#52617b;}

@media(max-width:820px){
  .head-actions{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:8px!important;width:100%!important;}
  .settings-dropdown{flex:0 0 42px!important;}
  .settings-action,.round-action{width:42px!important;height:42px!important;min-width:42px!important;border-radius:14px!important;}
  .head-actions .primary-pill{flex:1 1 auto!important;height:42px!important;min-width:0!important;padding:0 12px!important;font-size:13px!important;white-space:nowrap!important;justify-content:center!important;}
  .head-actions .light-pill{display:none!important;}
  .head-actions .primary-pill i{font-size:13px!important;}
  .duplicate-warning.show,.existing-files-preview.show{padding:12px!important;border-radius:13px!important;}
  .existing-files-list{gap:6px!important;}
  .existing-files-list span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
}


/* Existing tourist success notice + live suggestions */
.duplicate-warning.show{
    display:block !important;
    background:#eefaf3 !important;
    color:#2f6b4f !important;
    border:0 !important;
    border-radius:14px !important;
    padding:13px 15px !important;
}
.duplicate-warning-inline{
    display:flex;
    align-items:center;
    gap:8px;
    color:#2f6b4f !important;
    line-height:1.35;
    font-size:14px;
}
.duplicate-warning-inline i{
    color:#3ba66b !important;
    flex:0 0 auto;
}
.duplicate-warning-title,
.duplicate-warning-text{
    display:none !important;
}
.duplicate-warning-link{
    display:none !important;
}
.field{
    position:relative;
}
.tourist-suggest-box{
    position:absolute;
    left:0;
    right:0;
    top:calc(100% + 7px);
    z-index:1065;
    background:#fff;
    border:1px solid #dfe7f5;
    border-radius:14px;
    padding:7px;
    box-shadow:0 14px 34px rgba(15,35,75,.10);
}
.tourist-suggest-box[hidden]{
    display:none !important;
}
.tourist-suggest-item{
    width:100%;
    border:0;
    background:#fff;
    border-radius:11px;
    padding:10px 11px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    text-align:left;
    cursor:pointer;
    color:#071b3a;
}
.tourist-suggest-item:hover,
.tourist-suggest-item:focus,
.tourist-suggest-item:active{
    background:#f7f9fe !important;
    color:#071b3a !important;
    outline:0 !important;
    box-shadow:none !important;
}
.tourist-suggest-item span{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.tourist-suggest-item small{
    flex:0 0 auto;
    color:#66748d;
    font-size:13px;
}
@media(max-width:820px){
    .tourist-suggest-box{
        position:static;
        margin-top:8px;
        box-shadow:none;
    }
    .tourist-suggest-item{
        padding:11px 10px;
    }
}


/* collective permit UI */
.pass-variant-block{margin-bottom:12px!important}
.variant-switch{display:flex;gap:10px;flex-wrap:wrap}
.variant-option{height:42px;display:inline-flex;align-items:center;justify-content:center;padding:0 18px;border:1px solid #dfe7f5;border-radius:14px;background:#fff;color:#071b3a;cursor:pointer;user-select:none}
.variant-option input{display:none}
.variant-option.active{background:#eef3ff;border-color:#cbd8ff;color:#315df4}
.person-card{border:1px solid #e6edf8;border-radius:20px;background:#fff;padding:12px;margin-bottom:14px}
.primary-person{border-color:transparent;padding:0;margin-bottom:0;background:transparent}
.person-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;padding:10px 12px;border-radius:14px;background:#f7f9fe;color:#071b3a}
.remove-person{width:34px;height:34px;border:0;border-radius:12px;background:#fff;color:#c87474;display:grid;place-items:center;cursor:pointer}
.collective-add-wrap{display:none;justify-content:center;margin:16px 0 4px}
.add-person-btn{height:44px;border-radius:14px;padding:0 20px;background:#eef3ff;color:#315df4;border:1px solid #d9e4fb}
.collapsible-block{position:relative;padding-top:15px!important}
.collapse-toggle{position:absolute;right:14px;top:12px;width:30px;height:30px;border:1px solid #dfe7f5;border-radius:10px;background:#fff;color:#315df4;display:grid;place-items:center;cursor:pointer}
.collapsible-block h6{padding-right:44px}
.collapse-summary{display:none;color:#66748d;font-size:14px;margin-top:-2px}
.collapsible-block.collapsed .collapsible-content{display:none!important}
.collapsible-block.collapsed .collapse-summary{display:block}
.group-toggle{width:30px;height:30px;border:1px solid #dfe7f5;border-radius:10px;background:#fff;color:#315df4;display:grid;place-items:center;margin-right:10px;cursor:pointer;flex:0 0 auto}
.group-toggle.open{background:#eef3ff}
.group-child-row td{background:#fbfcff!important}
.child-client{padding-left:8px}
.child-indent{width:28px;height:1px;border-top:1px solid #cbd8ff;display:inline-block;flex:0 0 28px}
.group-count{display:block;margin-top:5px;color:#66748d}
.duplicate-warning.show{display:block!important;background:#eefaf3!important;color:#2f6b4f!important;border:0!important;border-radius:14px!important;padding:13px 15px!important}
.duplicate-warning-inline{display:flex;align-items:center;gap:8px;color:#2f6b4f!important;line-height:1.35;font-size:14px}
.duplicate-warning-inline i{color:#3ba66b!important;flex:0 0 auto}
.field{position:relative}
.tourist-suggest-box{position:absolute;left:0;right:0;top:calc(100% + 7px);z-index:1065;background:#fff;border:1px solid #dfe7f5;border-radius:14px;padding:7px;box-shadow:0 14px 34px rgba(15,35,75,.10)}
.tourist-suggest-box[hidden]{display:none!important}
.tourist-suggest-item{width:100%;border:0;background:#fff;border-radius:11px;padding:10px 11px;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;cursor:pointer;color:#071b3a}
.tourist-suggest-item:hover,.tourist-suggest-item:focus,.tourist-suggest-item:active{background:#f7f9fe!important;color:#071b3a!important;outline:0!important;box-shadow:none!important}
.tourist-suggest-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tourist-suggest-item small{flex:0 0 auto;color:#66748d;font-size:13px}
@media(max-width:820px){
  .variant-switch{display:grid;grid-template-columns:1fr 1fr}
  .variant-option{height:40px;padding:0 10px;font-size:13px}
  .person-card{padding:10px;border-radius:16px;margin-bottom:16px}
  .primary-person{padding:0}
  .collapse-toggle{right:10px;top:10px}
  .collective-add-wrap{margin:14px 0}
  .add-person-btn{width:100%;justify-content:center}
  .group-toggle{width:28px;height:28px;margin-right:8px}
  .group-child-row{margin-top:-10px!important}
  .group-child-row td:nth-child(4),.group-child-row td:nth-child(5),.group-child-row td:nth-child(6){display:none!important}
  .tourist-suggest-box{position:static;margin-top:8px;box-shadow:none}
}


/* group warning/name toggle + mobile group/status fixes */
.parent-name-open{display:none!important}
.group-parent-row.group-open .parent-name-closed{display:none!important}
.group-parent-row.group-open .parent-name-open{display:inline!important}

.status-chip,
.status-chip:hover,
.status-chip:focus,
.status-chip:active{
    border:0!important;
    outline:0!important;
    box-shadow:none!important;
}

@media(max-width:820px){
  .group-child-row{
      display:none!important;
  }
  .group-child-row.child-visible{
      display:grid!important;
  }
  .status-chip,
  .status-chip:hover,
  .status-chip:focus,
  .status-chip:active{
      border:0!important;
      outline:0!important;
      box-shadow:none!important;
  }
}


/* FINAL mobile collective group toggle fix */
@media (max-width:820px){
  .modern-table tbody tr.group-child-row,
  .modern-table tbody tr.group-child-row[style],
  .modern-table tbody .group-child-row{
      display:none !important;
      visibility:hidden !important;
      height:0 !important;
      min-height:0 !important;
      overflow:hidden !important;
      margin:0 !important;
      padding:0 !important;
  }

  .modern-table tbody tr.group-child-row.child-visible,
  .modern-table tbody tr.group-child-row.is-open,
  .modern-table tbody .group-child-row.child-visible,
  .modern-table tbody .group-child-row.is-open{
      display:grid !important;
      visibility:visible !important;
      height:auto !important;
      min-height:0 !important;
      overflow:visible !important;
      margin:0 0 16px 0 !important;
      padding:0 !important;
  }

  .modern-table tbody tr.group-child-row:not(.child-visible):not(.is-open) td{
      display:none !important;
  }

  .modern-table tbody tr.group-child-row.child-visible td,
  .modern-table tbody tr.group-child-row.is-open td{
      display:flex !important;
  }

  .modern-table tbody tr.group-child-row.child-visible td:nth-child(4),
  .modern-table tbody tr.group-child-row.child-visible td:nth-child(5),
  .modern-table tbody tr.group-child-row.child-visible td:nth-child(6),
  .modern-table tbody tr.group-child-row.is-open td:nth-child(4),
  .modern-table tbody tr.group-child-row.is-open td:nth-child(5),
  .modern-table tbody tr.group-child-row.is-open td:nth-child(6){
      display:none !important;
  }
}


/* Mobile collective expanded row refinements */
@media (max-width:820px){
  /* В раскрытых участниках коллективного пропуска отводим возраст/дату рождения от правого края */
  .modern-table tbody tr.group-child-row.child-visible td:nth-child(2),
  .modern-table tbody tr.group-child-row.is-open td:nth-child(2){
      padding-right:18px !important;
      align-items:flex-start !important;
  }

  .modern-table tbody tr.group-child-row.child-visible td:nth-child(2) .date-stack,
  .modern-table tbody tr.group-child-row.is-open td:nth-child(2) .date-stack{
      width:100% !important;
      padding-right:10px !important;
      box-sizing:border-box !important;
  }

  /* В раскрытых участниках действия переносим под заголовок "Действия" */
  .modern-table tbody tr.group-child-row.child-visible td:nth-child(7),
  .modern-table tbody tr.group-child-row.is-open td:nth-child(7){
      display:block !important;
      grid-column:1 / -1 !important;
      padding-top:12px !important;
  }

  .modern-table tbody tr.group-child-row.child-visible td:nth-child(7)::before,
  .modern-table tbody tr.group-child-row.is-open td:nth-child(7)::before{
      display:block !important;
      content:'Действия' !important;
      margin:0 0 10px 0 !important;
      color:#74809a !important;
      font-size:12px !important;
      text-transform:uppercase !important;
      letter-spacing:.06em !important;
      line-height:1 !important;
  }

  .modern-table tbody tr.group-child-row.child-visible td:nth-child(7) .actions-inline,
  .modern-table tbody tr.group-child-row.is-open td:nth-child(7) .actions-inline{
      display:flex !important;
      justify-content:flex-start !important;
      gap:8px !important;
      flex-wrap:wrap !important;
      margin-top:0 !important;
      padding-left:0 !important;
  }
}


/* Tour leader column and autocomplete */
.leader-cell{display:inline-flex;align-items:center;color:#52617b;font-size:14px;line-height:1.25}
.tour-leader-block .tourist-suggest-box,
.leader-suggest-box{z-index:1080}
.toolbar-clean{grid-template-columns:1fr 220px 220px 104px!important}
.modern-table th:first-child,
.modern-table td:first-child{width:24%}
.modern-table th:nth-child(2),
.modern-table td:nth-child(2){width:13%}

/* Collective mobile after adding Tour leader column */
@media(max-width:820px){
  .toolbar-clean{grid-template-columns:1fr!important}
  .modern-table tbody tr{
      grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  }

  /* 8 columns:
     1 tourist, 2 leader, 3 age, 4 permit term, 5 status, 6 receipt, 7 statement, 8 actions */
  .modern-table td:nth-child(1),
  .modern-table td:nth-child(2),
  .modern-table td:nth-child(4),
  .modern-table td:nth-child(7),
  .modern-table td:nth-child(8){
      grid-column:1 / -1!important;
  }

  .modern-table td:nth-child(3){
      grid-column:1 / -1!important;
  }

  .modern-table td:nth-child(5){
      grid-column:1 / 2!important;
      border-right:1px solid #eef2fa!important;
  }

  .modern-table td:nth-child(6){
      grid-column:2 / 3!important;
  }

  .modern-table td:nth-child(2)::before{content:'Турлидер'!important;}
  .modern-table td:nth-child(3)::before{content:'Возраст'!important;}
  .modern-table td:nth-child(4)::before{content:'Срок пропуска'!important;}
  .modern-table td:nth-child(5)::before{content:'Статус'!important;}
  .modern-table td:nth-child(6)::before{content:'Получение'!important;}
  .modern-table td:nth-child(7)::before{content:'Заявление'!important;}
  .modern-table td:nth-child(8)::before{content:'Действия'!important;}

  .modern-table tbody tr.group-child-row.child-visible td:nth-child(4),
  .modern-table tbody tr.group-child-row.is-open td:nth-child(4){
      padding-left:18px!important;
  }

  /* In expanded collective rows keep action icons in one normal line */
  .modern-table tbody tr.group-child-row.child-visible td:nth-child(8),
  .modern-table tbody tr.group-child-row.is-open td:nth-child(8){
      display:flex!important;
      align-items:flex-start!important;
      flex-direction:column!important;
      grid-column:1 / -1!important;
      padding-top:12px!important;
  }

  .modern-table tbody tr.group-child-row.child-visible td:nth-child(8)::before,
  .modern-table tbody tr.group-child-row.is-open td:nth-child(8)::before{
      display:block!important;
      content:'Действия'!important;
      margin:0 0 10px 0!important;
      color:#74809a!important;
      font-size:12px!important;
      text-transform:uppercase!important;
      letter-spacing:.06em!important;
      line-height:1!important;
  }

  .modern-table tbody tr.group-child-row.child-visible td:nth-child(8) .actions-inline,
  .modern-table tbody tr.group-child-row.is-open td:nth-child(8) .actions-inline{
      display:flex!important;
      flex-direction:row!important;
      align-items:center!important;
      justify-content:flex-start!important;
      gap:8px!important;
      flex-wrap:nowrap!important;
      margin-top:0!important;
      padding-left:0!important;
      width:auto!important;
  }

  .modern-table tbody tr.group-child-row.child-visible td:nth-child(5),
  .modern-table tbody tr.group-child-row.child-visible td:nth-child(6),
  .modern-table tbody tr.group-child-row.child-visible td:nth-child(7),
  .modern-table tbody tr.group-child-row.is-open td:nth-child(5),
  .modern-table tbody tr.group-child-row.is-open td:nth-child(6),
  .modern-table tbody tr.group-child-row.is-open td:nth-child(7){
      display:none!important;
  }
}

@media(max-width:1080px){
  .toolbar-clean{grid-template-columns:1fr 190px 190px 100px!important}
}
@media(max-width:900px){
  .toolbar-clean{grid-template-columns:1fr!important}
}


/* Tour leader filter layout and inline leader */
.toolbar-clean{
    grid-template-columns:minmax(360px,1fr) 205px 205px 96px !important;
}
.leader-under-name{
    display:block;
    margin-top:5px;
    color:#66748d;
    font-size:12px;
    line-height:1.25;
}
.leader-cell{font-size:13px;color:#66748d}
@media(max-width:1180px){
  .toolbar-clean{
      grid-template-columns:minmax(300px,1fr) 190px 190px 92px !important;
  }
}
@media(max-width:900px){
  .toolbar-clean{
      grid-template-columns:1fr !important;
  }
}

/* Mobile columns after removing separate tour leader column:
   1 tourist, 2 age, 3 permit term, 4 status, 5 receipt, 6 statement, 7 actions */
@media(max-width:820px){
  .modern-table td:nth-child(1),
  .modern-table td:nth-child(3),
  .modern-table td:nth-child(6),
  .modern-table td:nth-child(7){
      grid-column:1 / -1!important;
  }

  .modern-table td:nth-child(2){
      grid-column:1 / -1!important;
  }

  .modern-table td:nth-child(4){
      grid-column:1 / 2!important;
      border-right:1px solid #eef2fa!important;
  }

  .modern-table td:nth-child(5){
      grid-column:2 / 3!important;
  }

  .modern-table td:nth-child(2)::before{content:'Возраст'!important;}
  .modern-table td:nth-child(3)::before{content:'Срок пропуска'!important;}
  .modern-table td:nth-child(4)::before{content:'Статус'!important;}
  .modern-table td:nth-child(5)::before{content:'Получение'!important;}
  .modern-table td:nth-child(6)::before{content:'Заявление'!important;}
  .modern-table td:nth-child(7)::before{content:'Действия'!important;}

  .modern-table tbody tr.group-child-row.child-visible td:nth-child(3),
  .modern-table tbody tr.group-child-row.is-open td:nth-child(3){
      padding-left:18px!important;
  }

  .modern-table tbody tr.group-child-row.child-visible td:nth-child(7),
  .modern-table tbody tr.group-child-row.is-open td:nth-child(7){
      display:flex!important;
      align-items:flex-start!important;
      flex-direction:column!important;
      grid-column:1 / -1!important;
      padding-top:12px!important;
  }

  .modern-table tbody tr.group-child-row.child-visible td:nth-child(7)::before,
  .modern-table tbody tr.group-child-row.is-open td:nth-child(7)::before{
      display:block!important;
      content:'Действия'!important;
      margin:0 0 10px 0!important;
      color:#74809a!important;
      font-size:12px!important;
      text-transform:uppercase!important;
      letter-spacing:.06em!important;
      line-height:1!important;
  }

  .modern-table tbody tr.group-child-row.child-visible td:nth-child(7) .actions-inline,
  .modern-table tbody tr.group-child-row.is-open td:nth-child(7) .actions-inline{
      display:flex!important;
      flex-direction:row!important;
      align-items:center!important;
      justify-content:flex-start!important;
      gap:8px!important;
      flex-wrap:nowrap!important;
      margin-top:0!important;
      padding-left:0!important;
      width:auto!important;
  }

  .modern-table tbody tr.group-child-row.child-visible td:nth-child(4),
  .modern-table tbody tr.group-child-row.child-visible td:nth-child(5),
  .modern-table tbody tr.group-child-row.child-visible td:nth-child(6),
  .modern-table tbody tr.group-child-row.is-open td:nth-child(4),
  .modern-table tbody tr.group-child-row.is-open td:nth-child(5),
  .modern-table tbody tr.group-child-row.is-open td:nth-child(6){
      display:none!important;
  }
}


/* tighter desktop toolbar so Reset fits */
.toolbar-clean{
    grid-template-columns:minmax(240px,0.82fr) 205px 205px 92px !important;
    align-items:center !important;
}
.live-search{
    min-width:0 !important;
}
.reset-btn{
    min-width:92px !important;
    white-space:nowrap !important;
}
@media(max-width:1280px){
  .toolbar-clean{
      grid-template-columns:minmax(220px,0.8fr) 190px 190px 88px !important;
  }
}
@media(max-width:1080px){
  .toolbar-clean{
      grid-template-columns:1fr 1fr !important;
  }
  .reset-btn{
      min-width:0 !important;
  }
}
@media(max-width:900px){
  .toolbar-clean{
      grid-template-columns:1fr !important;
  }
}


/* Reset button on same row as search and filters */
@media (min-width:901px){
  .toolbar,
  .toolbar-clean{
    display:flex !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    gap:10px !important;
  }

  .toolbar .live-search,
  .toolbar-clean .live-search{
    flex:1 1 auto !important;
    min-width:180px !important;
    max-width:none !important;
  }

  .toolbar .status-filter,
  .toolbar-clean .status-filter{
    flex:0 0 190px !important;
  }

  .toolbar .reset-btn,
  .toolbar-clean .reset-btn{
    flex:0 0 auto !important;
    margin-left:auto !important;
    white-space:nowrap !important;
  }
}


/* reset button width 160px */
.toolbar .reset-btn,
.toolbar-clean .reset-btn{
    width:160px !important;
    min-width:160px !important;
    max-width:160px !important;
}


/* mobile fixes */
@media (max-width:820px){
  .reset-btn{
    display:none !important;
  }

  /* collective expanded actions icons same size as regular */
  .group-child-row .actions-inline .action-btn,
  .group-child-row .actions-inline a,
  .group-child-row .actions-inline button{
    width:36px !important;
    height:36px !important;
    min-width:36px !important;
    font-size:14px !important;
  }

  /* spacing for permit term and receipt date */
  .modern-table td:nth-child(3),
  .modern-table td:nth-child(5){
    padding-top:10px !important;
    padding-bottom:10px !important;
  }

  .date-stack{
    row-gap:6px !important;
  }
}


/* mobile: labels and values on one line */
@media (max-width:820px){

  /* hide reset button on mobile */
  .reset-btn{
      display:none !important;
  }

  /* age / permit term / receipt in one row */
  .modern-table td:nth-child(2),
  .modern-table td:nth-child(3),
  .modern-table td:nth-child(5){
      display:flex !important;
      align-items:center !important;
      justify-content:space-between !important;
      gap:12px !important;
  }

  .modern-table td:nth-child(2)::before,
  .modern-table td:nth-child(3)::before,
  .modern-table td:nth-child(5)::before{
      display:inline-block !important;
      margin:0 !important;
      flex:0 0 auto !important;
  }

  .modern-table td:nth-child(2) .date-stack,
  .modern-table td:nth-child(3) .date-stack,
  .modern-table td:nth-child(5) .receipt-box{
      margin-left:auto !important;
      text-align:right !important;
  }

  .modern-table td:nth-child(2) .date-stack span,
  .modern-table td:nth-child(3) .date-stack span{
      margin-top:0 !important;
  }

  /* collective expanded actions same icon size as normal permits */
  .group-child-row.child-visible .actions-inline .icon-btn,
  .group-child-row.is-open .actions-inline .icon-btn{
      width:38px !important;
      height:38px !important;
      min-width:38px !important;
  }
}
