*{margin:0;padding:0;box-sizing:border-box}
        html,body{width:100%;max-width:100%;overflow-x:clip}
        body{font-family:'DM Sans',sans-serif;background:#0B0D13;color:#E2E4EA;min-height:100dvh;overflow-x:clip;position:relative}
        button,input{max-width:100%}
        .break-anywhere{overflow-wrap:anywhere;word-break:break-word}

        .brand-main{min-width:0;flex:1 1 auto;overflow:hidden}
        .brand-icon{flex:0 0 auto}
        .brand-text{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
        .user-mini{width:34px;height:34px;border-radius:999px;background:#1A1E28;border:1px solid #1E2230;color:#E2E4EA;display:inline-flex;align-items:center;justify-content:center;font-family:'Space Grotesk',sans-serif;font-weight:700;font-size:14px;flex:0 0 auto;text-transform:uppercase}
        .user-full{max-width:220px}
        @media(max-width:640px){.user-full{display:none!important}.header-actions{gap:8px}.brand-text{display:inline!important;font-size:16px}.user-mini{display:inline-flex}}
        @media(max-width:430px){.brand-main{gap:0}.brand-icon{display:none!important}.brand-text{display:inline!important}}
        @media(max-width:340px){.brand-main{flex:0 0 auto}.brand-icon{display:inline-block!important}.brand-text{display:none!important}}
        @media(min-width:641px){.user-mini{display:none}}

        /* Стабилизация sticky-шапки на мобильных браузерах без изменения внешнего вида */
        .app-header{
            -webkit-backdrop-filter:blur(16px);
            backface-visibility:hidden;
            -webkit-backface-visibility:hidden;
            transform:translateZ(0);
            -webkit-transform:translateZ(0);
            will-change:transform;
        }
        @media(max-width:640px){
            .app-header{
                position:-webkit-sticky;
                top:0;
            }
        }


        /* Фоновые blob'ы */
        .bg-blob{position:fixed;border-radius:50%;filter:blur(130px);opacity:.12;pointer-events:none;z-index:0}
        .bg-blob-1{width:min(520px, 90vw);height:min(520px, 90vw);background:#FF6347;top:-160px;right:-120px;animation:bf1 22s ease-in-out infinite}
        .bg-blob-2{width:min(420px, 80vw);height:min(420px, 80vw);background:#34D399;bottom:-120px;left:-120px;animation:bf2 26s ease-in-out infinite}
        @keyframes bf1{0%,100%{transform:translate(0,0) scale(1)}33%{transform:translate(-70px,55px) scale(1.1)}66%{transform:translate(45px,-35px) scale(.92)}}
        @keyframes bf2{0%,100%{transform:translate(0,0) scale(1)}33%{transform:translate(55px,-45px) scale(.9)}66%{transform:translate(-35px,35px) scale(1.08)}}

        /* Скроллбар */
        ::-webkit-scrollbar{width:5px}::-webkit-scrollbar-track{background:#0B0D13}::-webkit-scrollbar-thumb{background:#2A2E3E;border-radius:3px}

        /* Единый компонент сегментированных вкладок */
        .segment-tabs{position:relative;display:inline-flex;background:#14171F;border:1px solid #1E2230;border-radius:12px;padding:4px;width:fit-content;max-width:100%;overflow:hidden}
        .segment-tabs .seg-ind{position:absolute;top:4px;left:4px;width:calc(50% - 4px);height:calc(100% - 8px);background:#FF6347;border-radius:9px;transition:transform .3s cubic-bezier(.4,0,.2,1)!important;z-index:0;pointer-events:none;will-change:transform}
        .segment-tabs .seg-ind.r{transform:translateX(100%)}
        .segment-tabs button{position:relative;z-index:1;padding:10px 18px;border:none;background:transparent;color:#5C6178;border-radius:9px;font-family:'Space Grotesk',sans-serif;font-weight:600;font-size:14px;cursor:pointer;transition:color .25s;white-space:nowrap;min-width:0}
        .segment-tabs button:hover{color:#E2E4EA}
        .segment-tabs button.on{color:#fff;cursor:default;pointer-events:none}
        .role-sw button{padding-left:22px;padding-right:22px}
        .hist-row{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;padding:12px 14px;background:#14171F;border:1px solid #1E2230;border-radius:12px;margin-bottom:8px}
        .hist-row .meta{font-size:12px;color:#5C6178;line-height:1.5;overflow-wrap:anywhere}

        /* Модалки */
        .mo{position:fixed;inset:0;background:rgba(0,0,0,.6);backdrop-filter:blur(8px);z-index:100;display:flex;align-items:center;justify-content:center;padding:16px;opacity:0;visibility:hidden;transition:opacity .25s,visibility .25s;overflow-y:auto}
        .mo.open{opacity:1;visibility:visible}
        .mc{background:#14171F;border:1px solid #1E2230;border-radius:16px;padding:28px;max-width:520px;width:100%;max-width:min(520px,calc(100% - 32px));max-height:85vh;overflow-y:auto;overflow-x:clip;transform:scale(.92) translateY(18px);transition:transform .3s cubic-bezier(.4,0,.2,1);overflow-wrap:anywhere}
        .mo.open .mc{transform:scale(1) translateY(0)}

        /* Статичный экран входа */
        .welcome-screen{position:relative;z-index:10;min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:20px;background:transparent;overflow-x:clip}
        .welcome-screen:not(.open){display:none}
        .welcome-card{background:#14171F;border:1px solid #1E2230;border-radius:16px;padding:28px;width:100%;max-width:min(420px,calc(100% - 24px));text-align:center;box-shadow:0 18px 60px rgba(0,0,0,.28);overflow:hidden;overflow-wrap:anywhere}

        /* Сетка часов */
        .hg{display:grid;grid-template-columns:repeat(6,1fr);gap:8px}
        @media(max-width:480px){.hg{grid-template-columns:repeat(3,1fr)}}
        .hb{padding:8px 4px;border:1px solid #1E2230;border-radius:8px;background:0 0;color:#5C6178;font-family:'Space Grotesk',sans-serif;font-size:13px;cursor:pointer;transition:all .15s;text-align:center}
        .hb:hover{border-color:#FF6347;color:#E2E4EA}
        .hb.sel{background:rgba(255,99,71,.14);border-color:#FF6347;color:#FF6347}
        .hb.bk{background:rgba(248,113,113,.08);border-color:rgba(248,113,113,.25);color:#F87171;cursor:not-allowed;opacity:.7}
        .hb.exp{background:rgba(92,97,120,.08);border-color:rgba(92,97,120,.18);color:#5C6178;cursor:not-allowed;opacity:.45}

        /* Тосты */
        .tc{position:fixed;top:20px;right:20px;z-index:200;display:flex;flex-direction:column;gap:8px;pointer-events:none}
        .tt{background:#1A1E28;border:1px solid #1E2230;border-radius:12px;padding:12px 20px;font-size:14px;color:#E2E4EA;display:flex;align-items:center;gap:10px;pointer-events:auto;animation:ti .35s cubic-bezier(.4,0,.2,1) forwards;max-width:360px;box-shadow:0 8px 32px rgba(0,0,0,.35)}
        .tt.rm{animation:to .25s cubic-bezier(.4,0,.2,1) forwards}
        .tt .ti{font-size:16px;flex-shrink:0}
        .tt.ok .ti{color:#34D399}.tt.er .ti{color:#F87171}.tt.in .ti{color:#60A5FA}
        @keyframes ti{from{opacity:0;transform:translateX(36px) scale(.96)}to{opacity:1;transform:translateX(0) scale(1)}}
        @keyframes to{from{opacity:1;transform:translateX(0) scale(1)}to{opacity:0;transform:translateX(36px) scale(.96)}}

        /* Анимация карточек */
        .ce{animation:ce .4s cubic-bezier(.4,0,.2,1) both}
        @keyframes ce{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}

        /* Инпуты */
        .inp{width:100%;padding:12px 16px;background:#0B0D13;border:1px solid #1E2230;border-radius:10px;color:#E2E4EA;font-family:'DM Sans',sans-serif;font-size:16px;outline:none;transition:border-color .2s}
        .inp:focus{border-color:#FF6347}.inp::placeholder{color:#3A3E4E}
        input[type="date"]{color-scheme:dark}

        /* Кнопки */
        .bp{padding:10px 20px;background:#FF6347;color:#fff;border:none;border-radius:10px;font-family:'Space Grotesk',sans-serif;font-weight:600;font-size:14px;cursor:pointer;transition:all .15s}
        .bp:hover{background:#E5533A;transform:translateY(-1px)}.bp:active{transform:translateY(0) scale(.98)}
        .bs{padding:10px 20px;background:0 0;color:#5C6178;border:1px solid #1E2230;border-radius:10px;font-family:'Space Grotesk',sans-serif;font-weight:600;font-size:14px;cursor:pointer;transition:all .15s}
        .bs:hover{border-color:#5C6178;color:#E2E4EA}
        .bd{padding:8px 14px;background:rgba(248,113,113,.08);color:#F87171;border:1px solid rgba(248,113,113,.18);border-radius:8px;font-family:'DM Sans',sans-serif;font-size:13px;cursor:pointer;transition:all .15s}
        .bd:hover{background:rgba(248,113,113,.18)}

        /* Бейджи */
        .bg-a{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:6px;font-size:12px;font-weight:500}
        .bg-av{background:rgba(52,211,153,.1);color:#34D399}
        .bg-bk{background:rgba(248,113,113,.1);color:#F87171}
        .bg-pn{background:rgba(96,165,250,.12);color:#60A5FA}

        /* Пустое состояние */
        .es{text-align:center;padding:48px 24px;color:#5C6178}
        .es i{font-size:44px;margin-bottom:14px;opacity:.25;display:block}.es p{font-size:15px;line-height:1.6}



        /* Точечный фикс поля даты на вкладке арендатора: не даёт date input растягивать экран телефона */
        .renter-filter-head{width:100%;max-width:100%;min-width:0}
        .renter-filter-head>*{min-width:0}
        #dFilter.date-filter{box-sizing:border-box;flex:0 1 180px;width:180px;max-width:100%;min-width:0}
        @media(max-width:640px){
            #dFilter.date-filter{display:block;width:100%!important;max-width:100%!important;min-width:0!important;flex-basis:auto;-webkit-appearance:none;appearance:none}
        }

        @media(max-width:640px){
            .bg-blob-1{width:min(300px, 85vw);height:min(300px, 85vw);top:-120px;right:-140px}
            .bg-blob-2{width:min(280px, 80vw);height:min(280px, 80vw);bottom:-120px;left:-140px}
            .mo{padding:12px;align-items:center}
            .mc{padding:22px 16px;border-radius:14px;max-width:calc(100% - 24px)}
            .welcome-screen{padding:12px;align-items:center}
            .welcome-card{padding:22px 16px;border-radius:14px;max-width:calc(100% - 24px)}
            .tc{left:12px;right:12px;top:12px}
            .tt{max-width:none;width:100%;padding:11px 14px}
            .segment-tabs{width:100%;display:flex}
            .role-sw{max-width:360px}
            .segment-tabs .seg-ind{width:calc(50% - 4px)}
            .segment-tabs button{flex:1;font-size:13px;padding:9px 8px}
            .role-sw button{padding-left:10px;padding-right:10px}
            .hist-row{grid-template-columns:1fr}
            header .max-w-4xl{gap:10px}
            header .flex.items-center.gap-3{min-width:0}
            #dFilter{width:100%!important;min-width:0!important}
            .bp,.bs{padding-left:14px;padding-right:14px}
            main{padding-left:12px!important;padding-right:12px!important}
            .grid{min-width:0}
        }



        /* Адаптивность для узких экранов и встроенных браузеров (Telegram/iOS WebView) */
        #app, header, main, footer, section{max-width:100%;overflow-x:clip}
        header > div, main{width:100%;max-width:min(56rem,100vw)}
        .flex,.grid,.bg-card,.rounded-xl,.rounded-2xl,.hist-row,.es{min-width:0;max-width:100%}
        .bg-card,.rounded-xl,.rounded-2xl,.hist-row{overflow:hidden}
        p,span,div,h1,h2,h3,label,button{overflow-wrap:anywhere}
        .font-display{min-width:0}
        footer{padding-left:12px;padding-right:12px;line-height:1.55}
        input,select,textarea,button{font-size:16px}

        @media(max-width:430px){
            header > div{padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
            .header-actions{flex:0 0 auto;gap:6px!important}
            .brand-main{flex:1 1 auto;min-width:0;gap:8px!important}
            .brand-text{font-size:15px!important;max-width:40vw}
            .user-mini{width:30px;height:30px;font-size:13px}
            #profileBtn{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center}
            #outBtn{padding:8px 9px!important;min-width:auto;white-space:nowrap}
            .segment-tabs{gap:0}
            .segment-tabs button{white-space:normal;line-height:1.15;min-width:0;padding:9px 6px;font-size:12px}
            .bg-a{max-width:100%;white-space:normal}
            .flex.items-start.justify-between{gap:10px}
            .flex.items-start.justify-between > *{min-width:0}
        }

        @media(max-width:360px){
            .brand-text{max-width:34vw;font-size:14px!important}
            #outBtn{font-size:0!important;width:32px;height:32px;padding:0!important;display:inline-flex;align-items:center;justify-content:center}
            #outBtn::before{content:"⎋";font-size:15px;line-height:1}
            .user-mini{width:28px;height:28px;font-size:12px}
            .role-sw{max-width:100%}
            .segment-tabs button i{margin-right:0!important}
            main{padding-left:10px!important;padding-right:10px!important}
        }

        @media(max-width:300px){
            .brand-text{display:none!important}
            .brand-icon{display:inline-block!important}
            .header-actions{gap:4px!important}
        }
        
/* iOS viewport height fix */
.welcome-screen {
    min-height: 100dvh;
    min-height: calc(var(--vh, 1vh) * 100);
}

/* Touch feedback and elimination of 300ms delay */
button, .bp, .bs, .bd, .tab-btn, .hb, [data-action] {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.1s ease;
}

/* Prevent pull-to-refresh and overscroll on iOS */
body {
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}

/* Improve touch targets for small elements */
.hb {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure modals don't get hidden under iOS keyboard */
.mo {
    align-items: flex-start;
    padding-top: max(16px, env(safe-area-inset-top));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
}

/* Fix for iOS Safari bottom bar */
footer {
    padding-bottom: max(32px, env(safe-area-inset-bottom));
}

/* Prevent text selection on rapid taps */
button, .bp, .bs, .bd, .tab-btn, .hb, .segment-tabs button {
    -webkit-user-select: none;
    user-select: none;
}

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

/* Fix for iOS input zoom on focus */
input, select, textarea {
    font-size: 16px;
}

/* Ensure date input doesn't zoom on iOS */
input[type="date"] {
    font-size: 16px;
    min-height: 44px;
}

/* Improve readability on small screens */
@media (max-width: 360px) {
    .font-display {
        font-size: 15px;
    }
    .text-sm {
        font-size: 13px;
    }
    .text-xs {
        font-size: 11px;
    }
}

@media(prefers-reduced-motion:reduce){
    *,*::before,*::after{
        animation-duration:.01ms!important;
        animation-iteration-count:1!important;
        scroll-behavior:auto!important;
        transition-duration:.01ms!important;
    }
    .bg-blob,.skel-line,.skel-pill{animation:none!important}
    .ce{animation:none!important}
}
/* Админка */
.admin-search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;width:100%;max-width:100%}
.admin-list{display:grid;gap:8px;width:100%}
.admin-user-row{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;text-align:left;background:#14171F;border:1px solid #1E2230;border-radius:12px;padding:13px 14px;color:#E2E4EA;cursor:pointer;transition:all .15s;font-family:'DM Sans',sans-serif}
.admin-user-row:hover{border-color:#FF6347;background:#1A1E28;transform:translateY(-1px)}
.admin-user-row b{display:block;font-family:'Space Grotesk',sans-serif;font-size:15px;overflow-wrap:anywhere}
.admin-user-row small{display:block;color:#5C6178;font-size:12px;line-height:1.5;overflow-wrap:anywhere;margin-top:2px}
.admin-section{margin-top:28px;min-width:0;max-width:100%}
.admin-stat{background:#0B0D13;border:1px solid #1E2230;border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:2px;min-width:0}
.admin-stat b{font-family:'Space Grotesk',sans-serif;font-size:20px;color:#E2E4EA}
.admin-stat span{font-size:12px;color:#5C6178;line-height:1.35}
@media(max-width:640px){.admin-search-row{grid-template-columns:1fr}.admin-search-row .bp{width:100%}.admin-user-row{padding:12px}.admin-section{margin-top:24px}}

/* Admin dashboard */
.admin-dashboard{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:100%;max-width:100%}
.admin-info-card{width:100%;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;text-align:left;background:#14171F;border:1px solid #1E2230;border-radius:16px;padding:16px;color:#E2E4EA;cursor:pointer;transition:all .15s;font-family:'DM Sans',sans-serif;min-width:0}
.admin-info-card:hover{border-color:#FF6347;background:#1A1E28;transform:translateY(-1px)}
.admin-info-icon{width:42px;height:42px;border-radius:12px;background:rgba(255,99,71,.12);color:#FF6347;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;font-size:18px}
.admin-info-body{display:flex;flex-direction:column;gap:1px;min-width:0}
.admin-info-body b{font-family:'Space Grotesk',sans-serif;font-size:26px;line-height:1;color:#E2E4EA}
.admin-info-body span{font-family:'Space Grotesk',sans-serif;font-size:14px;font-weight:700;color:#E2E4EA}
.admin-info-body small{font-size:12px;color:#5C6178;line-height:1.35;overflow-wrap:anywhere}
.admin-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;max-width:100%}
.admin-pager{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.admin-pager button:disabled{opacity:.45;cursor:not-allowed;transform:none!important}
.admin-filter-card{background:#14171F;border:1px solid #1E2230;border-radius:16px;padding:16px;min-width:0;max-width:100%;overflow:hidden}
.admin-check{display:inline-flex;align-items:center;gap:9px;color:#E2E4EA;font-size:14px;font-weight:600;margin-bottom:14px;cursor:pointer}
.admin-check input{width:18px;height:18px;accent-color:#FF6347;flex:0 0 auto}
.admin-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;min-width:0}
.admin-filter-grid label{display:flex;flex-direction:column;gap:6px;min-width:0;color:#5C6178;font-size:12px;font-weight:500}
.admin-filter-grid .inp:disabled{opacity:.45;cursor:not-allowed}
.admin-row-actions{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end;min-width:0}
.admin-booking-row,.admin-booking-row,.admin-spot-row{grid-template-columns:minmax(0,1fr) auto}
@media(max-width:720px){.admin-dashboard{grid-template-columns:1fr}.admin-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-panel-head{align-items:flex-start;flex-direction:column}.admin-pager{justify-content:flex-start}.admin-booking-row,.admin-spot-row{grid-template-columns:1fr}.admin-row-actions{justify-content:flex-start;margin-top:4px}}
@media(max-width:420px){.admin-filter-grid{grid-template-columns:1fr}.admin-info-card{padding:14px;grid-template-columns:auto minmax(0,1fr) auto}.admin-info-body b{font-size:22px}}

/* Сворачиваемые блоки */
.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;max-width:100%}
.section-title-toggle{min-width:0;display:inline-flex;align-items:center;gap:8px;padding:0;border:0;background:transparent;color:#E2E4EA;cursor:pointer;text-align:left;line-height:1.2}
.section-title-toggle:hover .section-chevron{color:#FF6347;border-color:#FF6347}
.section-title-toggle span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.section-chevron{width:26px;height:26px;border:1px solid #1E2230;border-radius:999px;color:#5C6178;display:inline-flex!important;align-items:center;justify-content:center;font-size:11px;flex:0 0 auto;transition:transform .18s ease,color .18s ease,border-color .18s ease,background .18s ease}
.section-title-toggle[aria-expanded="true"] .section-chevron{transform:rotate(180deg);color:#FF6347;border-color:rgba(255,99,71,.45);background:rgba(255,99,71,.08)}
.houses-head .houses-add{white-space:nowrap;flex:0 0 auto}
.houses-list.hidden,#ownerSpotsBody.hidden,#ownerHistoryBody.hidden,#renterHistoryBody.hidden{display:none!important}
@media(max-width:430px){.section-head{gap:8px}.section-title-toggle{gap:6px}.section-chevron{width:24px;height:24px;font-size:10px}.houses-head .houses-add{font-size:12px;padding-left:10px;padding-right:10px}}
@media(max-width:340px){.houses-head .houses-add{font-size:0;width:36px;height:36px;padding:0;display:inline-flex;align-items:center;justify-content:center}.houses-head .houses-add i{font-size:14px;margin:0!important}}
        

/* Свернутый блок домов */
.houses-head{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:12px;width:100%;max-width:100%}
.houses-head .houses-add{justify-self:end;white-space:nowrap}
.houses-toggle{justify-self:center;width:42px;height:38px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:999px}
.houses-toggle i{transition:transform .18s ease}
.houses-toggle[aria-expanded="true"] i{transform:rotate(180deg)}
.houses-list.hidden{display:none!important}
@media(max-width:430px){.houses-head{grid-template-columns:minmax(0,1fr) 40px auto;gap:8px}.houses-head .houses-add{font-size:12px;padding-left:10px;padding-right:10px}.houses-toggle{width:38px;height:36px}}
@media(max-width:340px){.houses-head .houses-add{font-size:0;width:36px;height:36px;padding:0;display:inline-flex;align-items:center;justify-content:center}.houses-head .houses-add i{font-size:14px;margin:0!important}}


/* Fix: center toast notifications instead of top-right */
.tc{
    position:fixed!important;
    top:50%!important;
    left:50%!important;
    right:auto!important;
    transform:translate(-50%,-50%)!important;
    z-index:200!important;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:8px;
    width:min(420px,calc(100vw - 24px));
    pointer-events:none;
}
.tt{
    width:100%;
    max-width:420px;
    justify-content:flex-start;
    animation:toastCenterIn .25s cubic-bezier(.4,0,.2,1) forwards!important;
}
.tt.rm{animation:toastCenterOut .2s cubic-bezier(.4,0,.2,1) forwards!important}
@keyframes toastCenterIn{from{opacity:0;transform:translateY(12px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes toastCenterOut{from{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(12px) scale(.96)}}

/* Fix: compact and stable header for the Houses section */
.houses-head{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:10px!important;
    width:100%!important;
    max-width:100%!important;
}
.houses-head .section-title-toggle,
.houses-head .houses-toggle{
    justify-self:start!important;
}
.houses-head .houses-add{
    justify-self:end!important;
    max-width:100%!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
}
@media(max-width:430px){
    .houses-head{grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important}
    .houses-head .houses-add{padding-left:12px!important;padding-right:12px!important;font-size:13px!important;max-width:150px!important}
}
@media(max-width:360px){
    .houses-head .houses-add{max-width:118px!important;padding-left:10px!important;padding-right:10px!important}
}
@media(max-width:330px){
    .houses-head .houses-add{font-size:0!important;width:42px!important;height:42px!important;padding:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}
    .houses-head .houses-add i{font-size:16px!important;margin:0!important}
}

/* Role/tabs visibility after moving Renter/Owner order */
.segment-tabs .seg-ind{pointer-events:none}
#ownerSpotsPane.hidden,#ownerHousesPane.hidden,#pOwn.hidden,#pRen.hidden{display:none!important}

/* Custom switch rows for paid / approval settings */
.pay-switch-row{display:flex;align-items:center;gap:11px;padding:10px 12px;background:transparent;color:#E2E4EA;border:1px solid #1E2230;border-radius:12px;font-family:'Space Grotesk',sans-serif;font-weight:600;font-size:14px;cursor:pointer;transition:all .15s;text-align:left}
.pay-switch-row:hover{border-color:#5C6178;color:#fff}
.pay-switch-row .pay-switch{width:50px;height:28px;border-radius:999px;background:#2A2F3D;position:relative;flex:0 0 auto;box-shadow:inset 0 1px 2px rgba(0,0,0,.22);transition:.2s ease}
.pay-switch-row .pay-switch:after{content:"";width:22px;height:22px;border-radius:999px;background:#fff;position:absolute;left:3px;top:3px;box-shadow:0 2px 8px rgba(0,0,0,.25);transition:.2s ease}
.pay-switch-row.on .pay-switch{background:#FF6347}
.pay-switch-row.on .pay-switch:after{transform:translateX(22px)}
.pay-switch-row .pay-switch-text{line-height:1.25}
.bg-pending{background:rgba(96,165,250,.12);color:#60A5FA}
.hb.pending{background:rgba(96,165,250,.08);border-color:rgba(96,165,250,.25);color:#60A5FA;cursor:not-allowed;opacity:.85}

/* Background refresh + first-load skeletons */
.tab-refresh{display:flex;align-items:center;justify-content:center;gap:8px;width:max-content;max-width:100%;margin:-18px auto 18px;padding:8px 12px;border:1px solid rgba(96,165,250,.24);border-radius:999px;background:rgba(96,165,250,.08);color:#60A5FA;font-family:'Space Grotesk',sans-serif;font-size:13px;font-weight:700;line-height:1;box-shadow:0 10px 28px rgba(0,0,0,.12)}
.tab-refresh.hidden{display:none!important}
.tab-refresh-spinner{width:22px;height:22px;display:inline-grid;place-items:center;flex:0 0 auto}
.tab-refresh svg{width:22px;height:22px;display:block}
.skel-grid{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}
.skel-card{border:1px solid #1E2230;background:#121622;border-radius:16px;padding:16px;overflow:hidden;position:relative}
.skel-line{height:12px;border-radius:999px;background:linear-gradient(90deg,#1B2030 0%,#293044 48%,#1B2030 100%);background-size:220% 100%;animation:skel-shimmer 1.15s ease-in-out infinite;margin-bottom:10px}
.skel-line.w80{width:80%}.skel-line.w60{width:60%}.skel-line.w45{width:45%}.skel-line.w30{width:30%}
.skel-pill{width:84px;height:24px;border-radius:999px;background:linear-gradient(90deg,#1B2030 0%,#293044 48%,#1B2030 100%);background-size:220% 100%;animation:skel-shimmer 1.15s ease-in-out infinite;margin-top:14px}
@keyframes skel-shimmer{0%{background-position:140% 0}100%{background-position:-80% 0}}
@media(max-width:640px){.skel-grid{grid-template-columns:1fr}.tab-refresh{margin-top:-12px}}

/* Labels row inside renter slot cards */
.slot-labels-row{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;margin-bottom:10px;width:100%;clear:both}


/* Segment tabs animation fix: restore original top switch and mirror animation for subtabs */
.role-sw{position:relative!important;display:inline-flex!important;background:#14171F!important;border-radius:12px!important;padding:4px!important;border:1px solid #1E2230!important;width:fit-content;max-width:100%;overflow:hidden}
.role-sw .ind{position:absolute!important;top:4px!important;left:4px!important;width:calc(50% - 4px)!important;height:calc(100% - 8px)!important;background:#FF6347!important;border-radius:9px!important;transition:transform .3s cubic-bezier(.4,0,.2,1)!important;z-index:0!important;pointer-events:none!important;will-change:transform}
.role-sw .ind.r{transform:translateX(100%)!important}
.role-sw button{position:relative!important;z-index:1!important;padding:10px 22px!important;border:none!important;background:transparent!important;color:#5C6178!important;border-radius:9px!important;font-family:'Space Grotesk',sans-serif!important;font-weight:600!important;font-size:14px!important;cursor:pointer!important;transition:color .25s!important;white-space:nowrap!important;min-width:0}
.role-sw button:hover{color:#E2E4EA!important}
.role-sw button.on{color:#fff!important;background:transparent!important;cursor:default!important;pointer-events:none!important}

.tabs.role-like-tabs{position:relative!important;display:inline-flex!important;background:#14171F!important;border:1px solid #1E2230!important;border-radius:12px!important;padding:4px!important;width:fit-content;max-width:100%;overflow:hidden!important;gap:0!important}
.tabs.role-like-tabs .tab-ind{position:absolute!important;top:4px!important;left:4px!important;width:calc(50% - 4px)!important;height:calc(100% - 8px)!important;background:#FF6347!important;border-radius:9px!important;transition:transform .3s cubic-bezier(.4,0,.2,1)!important;z-index:0!important;pointer-events:none!important;will-change:transform}
.tabs.role-like-tabs .tab-btn{position:relative!important;z-index:1!important;padding:10px 18px!important;border:none!important;background:transparent!important;color:#5C6178!important;border-radius:9px!important;font-family:'Space Grotesk',sans-serif!important;font-weight:600!important;font-size:14px!important;cursor:pointer!important;transition:color .25s!important;white-space:nowrap!important;min-width:0}
.tabs.role-like-tabs .tab-btn:hover{color:#E2E4EA!important;background:transparent!important}
.tabs.role-like-tabs .tab-btn.on{color:#fff!important;background:transparent!important;cursor:default!important;pointer-events:none!important}
@media(max-width:768px){.role-sw{width:100%!important;max-width:360px!important}.role-sw button{flex:1!important;padding:9px 10px!important;font-size:13px!important}.tabs.role-like-tabs{width:100%!important;display:flex!important}.tabs.role-like-tabs .tab-ind{width:calc(50% - 4px)!important}.tabs.role-like-tabs .tab-btn{flex:1!important;font-size:13px!important;padding:9px 8px!important}}
@media(max-width:420px){.role-sw button,.tabs.role-like-tabs .tab-btn{white-space:normal!important;line-height:1.15!important;min-width:0!important;padding:9px 6px!important;font-size:12px!important}}
@media(max-width:360px){.role-sw{max-width:100%!important}.role-sw button i,.tabs.role-like-tabs .tab-btn i{margin-right:0!important}}


/* Subtabs use the exact same moving indicator as the top role switch, but keep their own width rules. */
.subtab-sw{max-width:100%!important}
.subtab-sw .ind{transition:transform .3s cubic-bezier(.4,0,.2,1)!important}
.subtab-sw .ind.r{transform:translateX(100%)!important}
.subtab-sw .tab-btn.on{pointer-events:none!important;cursor:default!important}
@media(max-width:768px){.subtab-sw{width:100%!important;max-width:100%!important}}


/* Adaptive subtabs: same indicator animation as role switch, wider responsive container for long labels */
.subtab-sw.role-like-tabs{width:min(100%,380px)!important;max-width:100%!important;display:flex!important;flex:0 1 auto!important}
.subtab-sw.owner-subtabs{width:min(100%,360px)!important}
.subtab-sw.renter-subtabs{width:min(100%,420px)!important}
.subtab-sw.role-like-tabs .tab-btn{flex:1 1 0!important;min-width:0!important;text-align:center!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
.subtab-sw.role-like-tabs .tab-ind{width:calc(50% - 4px)!important;transition:transform .3s cubic-bezier(.4,0,.2,1)!important}
.subtab-sw.role-like-tabs .tab-ind.r{transform:translateX(100%)!important}
.subtab-sw.role-like-tabs .tab-btn.on{pointer-events:none!important;cursor:default!important}
@media(max-width:768px){.subtab-sw.role-like-tabs{width:100%!important;max-width:100%!important}.subtab-sw.role-like-tabs .tab-btn{font-size:13px!important;padding:9px 8px!important}}
@media(max-width:380px){.subtab-sw.role-like-tabs .tab-btn{font-size:12px!important;padding:9px 6px!important;letter-spacing:-.01em!important}}

/* Owner spot cards: separated info, labels, and soft slots panel */

.owner-spots-grid{display:grid;grid-template-columns:1fr;gap:16px;align-items:start}
@media(min-width:768px){.owner-spots-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.owner-spots-grid .owner-spot-card{margin-bottom:0}}
.owner-spot-card{overflow:hidden}
.owner-spot-head{display:block;margin-bottom:0}
.owner-spot-main{min-width:0;display:grid;gap:10px}
.owner-spot-title{line-height:1.2}
.owner-spot-info{display:grid;gap:5px;min-width:0}
.owner-spot-labels{display:flex;flex-wrap:wrap;gap:6px;min-width:0}
.owner-spot-actions{display:flex;gap:8px;align-items:center;flex-wrap:nowrap;flex:0 0 auto}
.owner-spot-actions-row{margin-top:14px;padding-top:14px;border-top:1px solid rgba(107,123,161,.16);display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center}
.owner-spot-action-slots{justify-content:center;min-width:0}
.owner-spot-action-icon{min-width:38px}
.owner-slots-panel{margin-top:16px;border:1px solid rgba(120,135,170,.13);border-radius:16px;background:linear-gradient(180deg,rgba(8,11,18,.42),rgba(8,11,18,.24));padding:14px;min-width:0}
.owner-slots-stats{display:flex;gap:14px;flex-wrap:wrap;font-size:14px;padding-bottom:12px;border-bottom:1px solid rgba(120,135,170,.12)}
.owner-slots-list{margin-top:2px;min-width:0}
.owner-slots-empty{margin-top:0}
@media(max-width:640px){.owner-spot-actions-row{grid-template-columns:minmax(0,1fr) auto auto;gap:9px;margin-top:14px}.owner-spot-action-icon{min-width:44px}.owner-slots-panel{margin-top:14px;padding:13px;border-radius:15px}.owner-slots-stats{gap:10px;font-size:13px}.owner-spot-main{gap:9px}}

/* Keep animated background static on phones to reduce mobile GPU/CPU load */
@media(max-width:768px){
    .bg-blob{
        filter:blur(72px);
        opacity:.08;
        animation:none!important;
        transform:none!important;
        will-change:auto;
    }
    .bg-blob-1{width:min(260px,70vw);height:min(260px,70vw);top:-100px;right:-120px}
    .bg-blob-2{width:min(240px,68vw);height:min(240px,68vw);bottom:-100px;left:-120px}
    .app-header{
        -webkit-backdrop-filter:none!important;
        backdrop-filter:none!important;
        background:rgba(11,13,19,.94)!important;
        will-change:auto;
    }
    .mo{
        -webkit-backdrop-filter:none!important;
        backdrop-filter:none!important;
        background:rgba(0,0,0,.72);
    }
}

/*
 * Essential application layout. Keep the primary screen usable if the optional
 * utility stylesheet is not delivered by the web server or is still cached.
 */
body{
    font-size:14px;
    color:#B5BBC8;
}
#app{min-height:100dvh}
.app-header{
    width:100%;
    max-width:56rem!important;
    margin:0 auto;
    color:#B9C0CE;
}
.app-header>div{
    box-sizing:border-box;
    width:100%;
    max-width:56rem;
    margin:0 auto;
    padding:11px 16px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
}
.brand-main{display:flex;align-items:center;gap:9px}
.brand-text{font-size:16px!important;line-height:1.25;color:#BFC5D2;font-weight:600}
.brand-icon{font-size:17px;color:#FF6347}
.header-actions{display:flex;align-items:center;gap:10px}
#hUser{font-size:13px;color:#858CA0}
#profileBtn{color:#858CA0}
#outBtn{font-size:13px;padding:8px 14px}
main{
    box-sizing:border-box;
    width:100%!important;
    max-width:56rem!important;
    margin:0 auto;
    padding:20px 16px 32px;
}
main>.flex.justify-center{
    display:flex;
    justify-content:center;
    margin-bottom:24px;
}
.renter-filter-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:18px;
}
.role-sw button,.tabs.role-like-tabs .tab-btn{
    font-size:13px!important;
    color:#70788C!important;
}
.role-sw button.on,.tabs.role-like-tabs .tab-btn.on{
    color:#F4F5F7!important;
}
#dFilter.date-filter{
    color:#B9C0CE;
    font-size:14px;
}
.es{
    padding:42px 20px;
    color:#69748B;
}
.es p{font-size:13px;line-height:1.55}
.site-footer{
    box-sizing:border-box;
    width:100%;
    max-width:56rem;
    margin:12px auto 0;
    padding:22px 16px 30px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    flex-wrap:nowrap;
    color:#737B8D;
    font-size:12px;
    line-height:1.55;
}
.footer-muted-line{display:inline;min-width:0}
.footer-help-page{
    color:#737B8D;
    text-decoration:underline;
    text-decoration-thickness:1px;
    text-decoration-color:currentColor;
    text-underline-offset:4px;
    transition:color .18s ease,text-decoration-color .18s ease,text-decoration-thickness .18s ease;
}
.footer-help-page:hover,
.footer-help-page:active,
.footer-help-page:focus-visible{
    color:#fff;
    text-decoration-color:#fff;
    text-decoration-thickness:2px;
    outline:none;
}
.footer-help-link{
    flex:0 0 auto;
    border:0;
    background:transparent;
    color:#FF6347;
    font:inherit;
    font-weight:800;
    cursor:pointer;
    padding:2px 4px;
    border-radius:7px;
    text-decoration:underline;
    text-decoration-thickness:1px;
    text-underline-offset:4px;
    transition:color .18s ease,background-color .18s ease,text-decoration-color .18s ease;
}
.footer-help-link::before{
    content:"·";
    color:#737B8D;
    font-weight:400;
    margin-right:8px;
    text-decoration:none;
    display:inline-block;
}
.footer-help-link:hover,
.footer-help-link:active,
.footer-help-link:focus-visible{
    color:#fff;
    background:rgba(255,255,255,.08);
    text-decoration-color:#fff;
    outline:none;
}
.welcome-card{
    max-width:380px;
    padding:25px 25px 24px;
    color:#B8BFCD;
}
.welcome-card h1{
    margin:0 0 6px;
    color:#C6CCD7;
    font-size:22px;
    line-height:1.3;
    font-weight:600;
}
.welcome-card p{
    margin:0 0 18px;
    color:#8991A2;
    font-size:13px;
    line-height:1.55!important;
}
.welcome-card .inp{
    box-sizing:border-box;
    display:block;
    width:100%;
    margin-bottom:12px;
    padding:11px 14px;
    color:#BAC1CE;
    font-size:14px;
}
.welcome-card .bp,.welcome-card .bs{
    box-sizing:border-box;
    display:block;
    width:100%;
    font-size:13px;
    padding:10px 16px;
}
#sendCodeBtn{margin-bottom:10px}
#changeEmailBtn{margin-top:10px}
#codeHint{margin-top:10px;color:#858DA0;font-size:12px;line-height:1.45}
@media(max-width:640px){
    main{padding-top:16px}
    .renter-filter-head{flex-direction:column;align-items:stretch}
    .site-footer{
        padding-top:18px;
        flex-wrap:wrap;
        gap:4px;
        text-align:center;
    }
    .footer-muted-line{flex:0 0 100%}
    .footer-help-link{
        flex:0 0 auto;
        margin:5px auto 0;
    }
    .footer-help-link::before{content:""}
}

/* Тарифы машиноместа: бейдж цены и поля ввода в модалке */
.bg-price{background:rgba(251,191,36,.12);color:#FBBF24}
.price-wrap{display:flex;align-items:center;gap:10px}
.price-wrap .price-label{flex:1}
.price-wrap .inp{text-align:right;max-width:160px}
.price-suffix{color:#5C6178;font-size:14px;white-space:nowrap}
.price-off{font-size:12px;color:#FBBF24}
.price-hint{font-size:12px;color:#737B8D;margin-top:6px;line-height:1.5}
.wd-row{display:flex;gap:4px;flex-wrap:wrap}
.wd-row .hb{flex:1 1 0;min-width:0;padding:8px 2px;font-size:13px}
@media(max-width:380px){.wd-row{gap:3px}.wd-row .hb{font-size:12px}}
.sl-summary{background:rgba(96,165,250,.08);border:1px solid rgba(96,165,250,.25);color:#60A5FA;border-radius:10px;padding:10px 14px;font-size:13px;line-height:1.55}
.cal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.cal-nav{width:36px;height:36px;border:1px solid #1E2230;border-radius:9px;background:transparent;color:#B5BBC8;cursor:pointer;font-size:14px;flex:0 0 auto}
.cal-nav:hover:not(:disabled){border-color:#FF6347;color:#FF6347}
.cal-nav:disabled{opacity:.35;cursor:not-allowed}
.cal-title{font-family:'Space Grotesk',sans-serif;font-weight:600;font-size:14px;color:#E2E4EA}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.cal-wd{text-align:center;font-size:11px;color:#5C6178;padding:4px 0}
.cal-day{min-height:38px;border:1px solid #1E2230;border-radius:8px;background:transparent;color:#B5BBC8;font-size:13px;cursor:pointer;transition:all .15s;display:flex;align-items:center;justify-content:center;font-family:'DM Sans',sans-serif}
.cal-day:hover:not(:disabled){border-color:#FF6347;color:#E2E4EA}
.cal-day.sel{background:rgba(255,99,71,.14);border-color:#FF6347;color:#FF6347}
.cal-day:disabled{opacity:.3;cursor:not-allowed}
.cal-day.busy{color:#F87171;opacity:.55;cursor:not-allowed;text-decoration:line-through}
.cal-day.off{color:#5C6178;opacity:.35;cursor:not-allowed}
.cal-day.empty{border:none;background:none;cursor:default}
.wd-note{background:rgba(251,191,36,.10);border:1px solid rgba(251,191,36,.40);color:#FBBF24;border-radius:10px;padding:10px 12px;font-size:13px;line-height:1.5}
.wd-note b{color:#FFD166}
.tabs-3 .seg-ind{width:calc(33.333% - 4px)!important}
.tabs-3 .seg-ind.p1{transform:translateX(0)!important}
.tabs-3 .seg-ind.p2{transform:translateX(100%)!important}
.tabs-3 .seg-ind.p3{transform:translateX(200%)!important}
.tabs-3 button:disabled{opacity:.4;cursor:not-allowed}
.tabs-3 button:disabled:hover{color:#5C6178}
.bp:disabled{opacity:.5;cursor:not-allowed;transform:none!important}
@media(max-width:430px){
    .price-wrap{flex-wrap:wrap;row-gap:6px}
    .price-wrap .price-label{flex:1 1 100%}
    .price-wrap .inp{flex:1;max-width:none}
}
