*{
box-sizing:border-box;
}

:root{
--espresso:#5C2A14;
--espresso-light:#91401C;
--brass:#237FB3;
--brass-light:#76BDE4;
--parchment:#F0F4F7;
--surface:#FCFDFE;
--ink:#37231B;
--ink-dark:#CFDFE8;
--rule:#DAE2E7;
--status-new:#5B7FA6;
--status-progress:#6E8B5A;
--status-waiting:#C68A3D;
--status-closed:#A8544A;
}

body[data-theme="woodland-sky"]{
--espresso:#5C2A14;
--espresso-light:#91401C;
--brass:#237FB3;
--brass-light:#76BDE4;
--parchment:#F0F4F7;
--surface:#FCFDFE;
--ink:#37231B;
--ink-dark:#CFDFE8;
--rule:#DAE2E7;
}

body[data-theme="placid-blue"]{
--espresso:#7C1C2D;
--espresso-light:#B1243D;
--brass:#3068A6;
--brass-light:#90B5DF;
--parchment:#F0F3F7;
--surface:#FCFDFE;
--ink:#371B20;
--ink-dark:#CFDBE8;
--rule:#DAE0E7;
}

body[data-theme="blush-petal"]{
--espresso:#440019;
--espresso-light:#81002F;
--brass:#A63071;
--brass-light:#DF90BC;
--parchment:#F7F0F4;
--surface:#FEFCFD;
--ink:#371B25;
--ink-dark:#E8CFDD;
--rule:#E7DAE1;
}

body[data-theme="dark-brown"]{
--espresso:#2C180F;
--espresso-light:#5B301D;
--brass:#768627;
--brass-light:#B7CD51;
--parchment:#F6F7F0;
--surface:#FEFEFC;
--ink:#37231B;
--ink-dark:#E4E8CF;
--rule:#E5E7DA;
}

body[data-theme="green-brown"]{
--espresso:#1C3E4B;
--espresso-light:#2B6479;
--brass:#A66B30;
--brass-light:#DAAD81;
--parchment:#F7F3F0;
--surface:#FEFDFC;
--ink:#1B2F37;
--ink-dark:#E8DBCF;
--rule:#E7E0DA;
}

body[data-theme="chocolate-sun"]{
--espresso:#644130;
--espresso-light:#8F5B42;
--brass:#A58108;
--brass-light:#F4C529;
--parchment:#F7F5F0;
--surface:#FEFDFC;
--ink:#37241B;
--ink-dark:#E8E2CF;
--rule:#E7E4DA;
}

body[data-theme="blue-green"]{
--espresso:#005B70;
--espresso-light:#008DAD;
--brass:#13979B;
--brass-light:#37E2E7;
--parchment:#F0F7F7;
--surface:#FCFEFE;
--ink:#1B3237;
--ink-dark:#CFE7E8;
--rule:#DAE7E7;
}

body[data-theme="olive-truffle"]{
--espresso:#57262E;
--espresso-light:#833743;
--brass:#868127;
--brass-light:#CDC651;
--parchment:#F7F7F0;
--surface:#FEFEFC;
--ink:#371B1F;
--ink-dark:#E8E6CF;
--rule:#E7E6DA;
}

body{
margin:0;
min-height:100dvh;
font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;
background:var(--parchment);
color:var(--ink);
transition:0.54s;
}

h1,h2,.stat-number,.donut-hole strong{
font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;
}

.crm-layout{
display:flex;
min-height:100dvh;
}

.sidebar{
width:240px;
height:100dvh;
position:fixed;
left:0;
top:0;
background:var(--espresso);
color:var(--ink-dark);
padding:30px 20px;
display:flex;
flex-direction:column;
}

.logo{
width:100%;
height:auto;
min-height:78px;
margin:0 auto 50px;
padding:10px 8px;
box-sizing:border-box;
display:flex;
align-items:center;
justify-content:center;
overflow:hidden;
background:var(--surface);
border-radius:14px;
}

.logo-img{
width:100%;
max-width:190px;
height:auto;
max-height:78px;
object-fit:contain;
display:block;
}

.menu{
display:flex;
flex-direction:column;
gap:10px;
}

.menu-item{
display:flex;
align-items:center;
gap:12px;
padding:14px 15px;
border-radius:4px;
cursor:pointer;
border-left:3px solid transparent;
transition:0.45s;
}

.menu-item span{
font-size:12px;
letter-spacing:0;
font-weight:500;
}

.menu-item:hover{
background:var(--espresso-light);
}

.menu-item.active{
background:var(--espresso-light);
border-left:3px solid var(--brass);
}

.sidebar-profile-card{
margin-top:auto;
margin-bottom:24px;
padding-top:16px;
border-top:1px solid var(--espresso-light);
}

.sidebar-profile-avatar-wrap{
flex:0 0 auto;
}

.sidebar-profile-avatar-wrap .presence-dot{
border-color:var(--espresso);
}

.sidebar-profile-avatar{
width:38px;
height:38px;
flex:0 0 auto;
border-radius:50%;
overflow:hidden;
display:flex;
align-items:center;
justify-content:center;
background:var(--espresso-light);
border:1px solid var(--brass);
color:var(--brass-light);
font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;
font-size:15px;
}

.sidebar-profile-avatar.has-photo{
background:transparent;
}

.sidebar-profile-avatar img{
width:100%;
height:100%;
object-fit:cover;
display:block;
}

.sidebar-profile-info{
display:flex;
flex-direction:column;
gap:2px;
min-width:0;
}

.sidebar-profile-card .sidebar-profile-name{
font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;
font-size:13px;
font-weight:600;
text-transform:none;
letter-spacing:0;
color:var(--ink-dark);
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
max-width:150px;
}

.sidebar-profile-card .sidebar-profile-position{
font-size:11px;
letter-spacing:0;
text-transform:none;
font-weight:400;
opacity:.6;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
max-width:150px;
}

.menu-icon{
width:20px;
height:20px;

filter:
brightness(0)
saturate(100%)
invert(78%)
sepia(24%)
saturate(645%)
hue-rotate(357deg);
}

.menu-icon-wrap{
position:relative;
display:inline-flex;
align-items:center;
justify-content:center;
flex:0 0 auto;
}

.menu-badge{
position:absolute;
top:-3px;
right:-5px;
width:9px;
height:9px;
border-radius:50%;
background:var(--status-closed);
box-shadow:0 0 0 2px var(--espresso);
opacity:0;
transform:scale(.4);
transition:0.36s;
pointer-events:none;
}

.menu-badge.active{
opacity:1;
transform:scale(1);
}

.theme-btn{
padding:9px 18px;
background:var(--surface);
box-shadow:0 2px 10px rgba(36,28,21,.12);
color:var(--ink);
border:1px solid var(--brass);
border-radius:20px;
font-size:12px;
letter-spacing:0;
cursor:pointer;
flex-shrink:0;
transition:0.45s;
}

.top-actions-bar{
position:fixed;
top:0;
left:240px;
right:0;
height:74px;
display:flex;
align-items:center;
justify-content:flex-end;
gap:10px;
padding:0 40px;
background:var(--parchment);
border-bottom:1px solid var(--rule);
z-index:30;
transition:left 0.45s;
}

.theme-btn:hover{
background:var(--brass);
color:var(--surface);
}

.toast-stack{
position:fixed;
top:20px;
right:20px;
z-index:80;
display:flex;
flex-direction:column;
gap:10px;
width:300px;
max-width:calc(100vw - 40px);
pointer-events:none;
}

.toast{
pointer-events:auto;
display:flex;
flex-direction:column;
gap:3px;
position:relative;
padding:13px 30px 13px 16px;
background:var(--surface);
border:1px solid var(--rule);
border-left:3px solid var(--brass);
border-radius:10px;
box-shadow:0 10px 28px rgba(36,28,21,.16);
animation:toastIn 0.45s ease forwards;
}

.toast.toast-hide{
animation:toastOut 0.36s ease forwards;
}

.toast-clickable{
cursor:pointer;
}

.toast-title{
font-size:13px;
color:var(--ink);
}

.toast-text{
font-size:12px;
opacity:.7;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}

.toast-close{
position:absolute;
top:8px;
right:10px;
border:none;
background:transparent;
color:var(--ink);
opacity:.4;
font-size:16px;
line-height:1;
cursor:pointer;
padding:2px;
}

.toast-close:hover{
opacity:.8;
}

@keyframes toastIn{
from{opacity:0; transform:translateX(16px);}
to{opacity:1; transform:translateX(0);}
}

@keyframes toastOut{
from{opacity:1; transform:translateX(0);}
to{opacity:0; transform:translateX(16px);}
}

.notif-bell-btn{
position:relative;
width:40px;
height:40px;
padding:0;
display:flex;
align-items:center;
justify-content:center;
}

.notif-bell-icon{
width:18px;
height:18px;
fill:none;
stroke:currentColor;
stroke-width:1.6;
stroke-linecap:round;
stroke-linejoin:round;
}

.notif-bell-badge{
position:absolute;
top:3px;
right:3px;
min-width:16px;
height:16px;
padding:0 4px;
border-radius:999px;
background:#c0392b;
color:#fff;
font-size:10px;
font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;
line-height:16px;
text-align:center;
opacity:0;
transform:scale(.6);
transition:0.36s;
pointer-events:none;
}

.notif-bell-badge.active{
opacity:1;
transform:scale(1);
}

.notif-panel{
position:fixed;
top:84px;
right:150px;
width:320px;
max-width:calc(100vw - 40px);
max-height:70vh;
overflow-y:auto;
background:var(--surface);
border:1px solid var(--rule);
border-radius:12px;
box-shadow:0 16px 40px rgba(36,28,21,.18);
z-index:90;
display:none;
flex-direction:column;
}

.notif-panel.open{
display:flex;
}

.notif-panel-head{
display:flex;
align-items:center;
justify-content:space-between;
padding:14px 16px;
border-bottom:1px solid var(--rule);
flex-shrink:0;
}

.notif-panel-head strong{
font-size:12px;
letter-spacing:0;
color:var(--ink);
}

.notif-panel-clear{
border:none;
background:transparent;
color:var(--brass);
font-size:12px;
cursor:pointer;
padding:0;
}

.notif-panel-clear:hover{
text-decoration:underline;
}

.notif-panel-list{
display:flex;
flex-direction:column;
overflow-y:auto;
}

.notif-panel-empty{
padding:24px 16px;
opacity:.6;
font-size:13px;
text-align:center;
margin:0;
}

.notif-item{
display:flex;
flex-direction:column;
gap:3px;
padding:12px 16px;
border-bottom:1px solid var(--rule);
cursor:pointer;
transition:0.27s;
}

.notif-item:last-child{
border-bottom:none;
}

.notif-item:hover{
background:rgba(0,0,0,.03);
}

.notif-item.unread{
background:rgba(198,146,58,.08);
}

.notif-item-title{
font-size:13px;
font-weight:600;
color:var(--ink);
}

.notif-item-text{
font-size:12px;
opacity:.75;
}

.notif-item-time{
font-size:11px;
opacity:.5;
}

@media (max-width:640px){
.notif-panel{
right:20px;
left:20px;
width:auto;
top:116px;
}
}

.crm-container{
margin-left:240px;
width:calc(100% - 240px);
padding:60px 40px;
padding-top:114px;
}

.welcome{
text-align:center;
margin-bottom:40px;
}

.welcome h1{
font-size:38px;
font-weight:600;
animation:breathing 7.2s infinite;
}

.welcome p{
opacity:.65;
letter-spacing:0;
}

@keyframes breathing{
0%{transform:scale(1);}
50%{transform:scale(1.02);}
100%{transform:scale(1);}
}

.online-card,
.chart-card{
background:var(--surface);
border:1px solid var(--rule);
border-radius:14px;
padding:26px;
box-shadow:
0 4px 18px rgba(36,28,21,.05);
}

.online-card h2,
.chart-card h2{
font-size:19px;
font-weight:600;
margin-top:0;
}

.employee{
display:flex;
align-items:center;
gap:12px;
background:var(--parchment);
padding:14px;
border-radius:10px;
margin-bottom:12px;
}

.employee-info{
display:flex;
flex-direction:column;
}

.employee-info span{
font-size:13px;
opacity:.6;
}

@media(max-width:900px){
.sidebar{width:80px;}
.crm-container{margin-left:80px;width:calc(100% - 80px);}
.top-actions-bar{left:80px;}
}

.welcome{animation: fadeDown 1.26s ease forwards;}
.online-card{animation: slideLeft 1.44s ease forwards;}
.chart-card{animation: slideUp 1.8s ease forwards;}

@keyframes fadeDown{
from{opacity:0;transform:translateY(-40px);}
to{opacity:1;transform:translateY(0);}
}

@keyframes slideLeft{
from{opacity:0;transform:translateX(-60px);}
to{opacity:1;transform:translateX(0);}
}

@keyframes slideUp{
from{opacity:0;transform:translateY(60px);}
to{opacity:1;transform:translateY(0);}
}

.crm-table{
width:100%;
border-collapse:collapse;
margin-top:10px;
animation: fadeDown 0.9s ease forwards;
}

.crm-table th,
.crm-table td{
padding:13px 14px;
text-align:left;
border-bottom:1px solid var(--rule);
}

.crm-table th{
opacity:.55;
font-weight:600;
font-size:12px;
letter-spacing:0;
}

.crm-table tbody tr:hover{
background:color-mix(in srgb,var(--brass) 7%,transparent);
}

.users-grid{
display:grid;
grid-template-columns:repeat(auto-fill,minmax(min(240px,100%),1fr));
gap:14px;
margin-top:10px;
}

.user-card{
display:flex;
align-items:center;
gap:12px;
background:var(--parchment);
padding:14px;
border-radius:10px;
animation: slideUp 0.9s ease forwards;
}

.user-card-avatar-wrap{
position:relative;
flex-shrink:0;
}

.user-card .employee-info{
min-width:0;
flex:1;
}

.user-card .employee-info strong{
display:block;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}

.user-card-pending{
border:1px dashed var(--accent, #b08d57);
}

.btn-activate-employee{
flex-shrink:0;
margin-left:auto;
white-space:nowrap;
}

.employee-pending-badge{
flex-shrink:0;
margin-left:auto;
opacity:.6;
font-size:.85em;
white-space:nowrap;
}

.employee-position-options{
display:flex;
flex-direction:column;
gap:8px;
margin:12px 0;
max-height:260px;
overflow-y:auto;
}

.employee-position-option{
display:flex;
align-items:center;
gap:8px;
cursor:pointer;
}

.employee-photo-picker{
display:flex;
align-items:center;
gap:16px;
margin-bottom:6px;
}

.employee-photo-preview{
width:72px;
height:72px;
flex-shrink:0;

display:flex;
align-items:center;
justify-content:center;

border-radius:50%;
overflow:hidden;

background:var(--brass);
color:var(--surface);

font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;
font-size:26px;
font-weight:600;
}

.employee-photo-preview.has-photo{
background:var(--rule);
}

.employee-photo-preview img{
width:100%;
height:100%;
object-fit:cover;
}

.news-author-avatar.has-photo{
background:transparent;
overflow:hidden;
padding:0;
}

.news-author-avatar.has-photo img{
width:100%;
height:100%;
object-fit:cover;
border-radius:50%;
}

@media (max-width:560px){
}

.settings-form{
display:flex;
flex-direction:column;
gap:16px;
max-width:360px;
margin-top:10px;
}

.settings-form label{
display:flex;
flex-direction:column;
gap:6px;
font-size:12px;
letter-spacing:0;
opacity:.6;
}

.settings-form input[type="text"],
.settings-form input[type="email"]{
padding:11px 12px;
border-radius:8px;
border:1px solid var(--rule);
font-size:14px;
font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;
background:var(--surface);
}

.switch-row{
flex-direction:row !important;
align-items:center;
justify-content:space-between;
}

.settings-hint{
margin:-8px 0 0;
font-size:11px;
text-transform:none;
letter-spacing:0;
opacity:.55;
line-height:1.4;
}

.btn-secondary{
align-self:flex-start;
padding:9px 16px;
background:transparent;
color:var(--ink);
border:1px solid var(--rule);
border-radius:8px;
font-size:12px;
letter-spacing:0;
cursor:pointer;
transition:0.36s;
}

.btn-secondary:hover:not(:disabled){
border-color:var(--brass);
background:color-mix(in srgb,var(--brass) 8%,transparent);
}

.btn-secondary:disabled{
opacity:.4;
cursor:not-allowed;
}

.card-header-row{
display:flex;
justify-content:space-between;
align-items:flex-start;
gap:20px;
}

.btn-add{
width:38px;
height:38px;
border-radius:50%;
border:none;
background:var(--brass);
color:var(--surface);
font-size:20px;
line-height:1;
cursor:pointer;
flex-shrink:0;
transition:0.45s;
}

.btn-add:hover{
background:var(--brass-light);
transform:scale(1.06);
}

.btn-add-folder{
display:inline-flex;
align-items:center;
justify-content:center;
}

.btn-folder-icon-svg{
width:20px;
height:17px;
overflow:visible;
}

.btn-folder-icon-svg path{
fill:var(--surface);
}

.modal-overlay{
position:fixed;
inset:0;
background:rgba(36,28,21,.55);
display:flex;
align-items:center;
justify-content:center;
z-index:100;
animation:fadeDown 0.36s ease forwards;
}

.modal-box{
background:var(--surface);
border-radius:14px;
padding:28px;
max-width:460px;
width:90%;
max-height:80vh;
overflow-y:auto;
box-shadow:0 20px 50px rgba(0,0,0,.25);
}

.modal-header{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:14px;
}

.modal-header h2{
font-size:20px;
margin:0;
}

.modal-close{
background:none;
border:none;
font-size:22px;
cursor:pointer;
color:var(--ink);
opacity:.55;
}

.modal-close:hover{
opacity:1;
}

.crm-table tbody tr{
cursor:pointer;
}

.request-detail{
display:flex;
flex-direction:column;
gap:0;
}

.request-detail-row{
display:flex;
justify-content:space-between;
align-items:center;
font-size:14px;
padding:11px 0;
border-bottom:1px solid var(--rule);
}

.request-detail-row:last-child{
border-bottom:none;
}

.request-detail-row span:first-child{
opacity:.55;
font-size:11px;
letter-spacing:0;
}

.employee-profile-view{
display:flex;
flex-direction:column;
gap:4px;
}

.employee-profile-header{
display:flex;
align-items:center;
gap:14px;
padding-bottom:14px;
}

.employee-profile-header .news-author-avatar{
width:52px;
height:52px;
aspect-ratio:1/1;
font-size:18px;
flex-shrink:0;
flex:0 0 52px;
}

.employee-profile-header strong{
display:block;
font-size:16px;
}

.employee-profile-header span{
display:block;
opacity:.6;
font-size:13px;
margin-top:2px;
}

.employee-profile-view hr{
border:none;
border-top:1px solid var(--rule);
margin:10px 0 14px;
}

.attachment-icon{
font-size:17px;
display:inline-flex;
align-items:center;
vertical-align:middle;
}

.file-type-icon-svg{
width:19px;
height:24px;
overflow:visible;
filter:drop-shadow(0 1px 2px rgba(36,28,21,.10));
}

.file-type-icon-paper{
fill:var(--surface);
stroke:var(--rule);
stroke-width:1;
}

.file-type-icon-fold{
fill:var(--parchment);
stroke:var(--rule);
stroke-width:1;
stroke-linejoin:round;
}

.doc-breadcrumbs{
display:flex;
flex-wrap:wrap;
align-items:center;
gap:6px;
margin-top:16px;
font-size:13px;
}

.doc-breadcrumb{
opacity:.6;
cursor:pointer;
transition:0.36s;
}

.doc-breadcrumb:hover{
opacity:1;
color:var(--brass);
}

.doc-breadcrumb.current{
opacity:1;
font-weight:600;
cursor:default;
}

.doc-breadcrumb-sep{
opacity:.35;
}

.folders-grid{
display:grid;
grid-template-columns:repeat(auto-fill,minmax(min(152px,100%),1fr));
gap:16px;
margin-top:16px;
margin-bottom:8px;
}

.folder-card{
position:relative;
display:flex;
flex-direction:column;
align-items:flex-start;
gap:14px;
padding:18px 16px 16px;
border:1px solid var(--rule);
border-radius:10px;
background:var(--surface);
cursor:pointer;
transition:transform 0.36s ease, box-shadow 0.36s ease, border-color 0.36s ease;
text-align:left;
box-shadow:0 1px 2px rgba(36,28,21,.04);
}

.folder-card::before{
content:"";
position:absolute;
inset:0;
border-radius:10px;
border-top:2px solid transparent;
transition:border-color 0.36s ease;
pointer-events:none;
}

.folder-card:hover{
border-color:var(--brass-light);
transform:translateY(-3px);
box-shadow:0 10px 22px rgba(36,28,21,.10);
}

.folder-card:hover::before{
border-top-color:var(--brass);
}

.folder-card-icon{
width:44px;
height:36px;
}

.folder-icon-svg{
width:100%;
height:100%;
overflow:visible;
filter:drop-shadow(0 2px 3px rgba(36,28,21,.08));
transition:transform 0.36s ease;
}

.folder-card:hover .folder-icon-svg{
transform:translateY(-1px);
}

.folder-icon-back{
fill:var(--brass-light);
}

.folder-icon-front{
fill:var(--brass);
transition:fill 0.36s ease;
}

.folder-card:hover .folder-icon-front{
fill:var(--espresso);
}

.folder-card-name{
font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;
font-size:14px;
font-weight:600;
word-break:break-word;
line-height:1.35;
color:var(--ink);
}

.folder-card-delete{
position:absolute;
top:10px;
right:10px;
width:22px;
height:22px;
border:none;
border-radius:50%;
background:var(--surface);
color:var(--ink);
opacity:0;
font-size:14px;
line-height:1;
cursor:pointer;
transition:opacity 0.36s ease, background 0.36s ease, color 0.36s ease;
box-shadow:0 1px 3px rgba(36,28,21,.15);
}

.folder-card:hover .folder-card-delete{
opacity:.6;
}

.folder-card-delete:hover{
opacity:1 !important;
background:var(--status-closed);
color:var(--surface);
}

.preview-overlay{
z-index:200;
}

.file-preview{
display:flex;
flex-direction:column;
align-items:center;
text-align:center;
padding:30px 10px 10px;
}

.file-preview-icon{
width:90px;
height:90px;
border-radius:14px;
background:var(--parchment);
border:1px solid var(--rule);
display:flex;
align-items:center;
justify-content:center;
font-size:38px;
margin-bottom:16px;
}

.file-preview p{
font-size:13px;
opacity:.55;
max-width:260px;
line-height:1.5;
}

.preview-img{
max-width:100%;
border-radius:10px;
display:block;
margin-top:10px;
}

.preview-pdf{
width:100%;
height:420px;
border:none;
border-radius:10px;
margin-top:10px;
}

.request-form{
display:flex;
flex-direction:column;
gap:14px;
}

.request-form label{
display:flex;
flex-direction:column;
gap:6px;
font-size:12px;
letter-spacing:0;
opacity:.6;
}

.request-form input[type="text"],
.request-form input[type="datetime-local"],
.request-form select,
.request-form textarea,
.request-form input[type="file"]{
padding:10px 12px;
border-radius:8px;
border:1px solid var(--rule);
font-size:14px;
font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;
background:var(--surface);
color:var(--ink);
}

.request-form textarea{
resize:vertical;
}

.request-form input:disabled{
opacity:.6;
}

.btn-submit{
margin-top:6px;
padding:12px;
border:none;
border-radius:8px;
background:var(--brass);
color:var(--surface);
font-size:14px;
font-weight:600;
letter-spacing:0;
cursor:pointer;
transition:0.45s;
}

.btn-submit:hover{
background:var(--brass-light);
color:var(--espresso);
}

.btn-delete{
margin-top:22px;
width:100%;
padding:12px;
border:1px solid var(--status-closed);
background:transparent;
color:var(--status-closed);
border-radius:8px;
font-size:14px;
font-weight:600;
letter-spacing:0;
cursor:pointer;
transition:0.45s;
}

.btn-delete:hover{
background:var(--status-closed);
color:var(--surface);
}

.chat-page{
    display:grid;
    grid-template-columns:300px minmax(0,1fr);
    grid-template-rows:minmax(0,1fr);
    height:calc(100dvh - 120px);

    background:var(--surface);

    border:1px solid var(--rule);
    border-radius:14px;

    overflow:hidden;

    box-shadow:
        0 4px 18px rgba(36,28,21,.05);

    animation:fadeDown 0.9s ease forwards;
}

.chat-sidebar{
    min-width:0;
    min-height:0;

    display:flex;
    flex-direction:column;

    border-right:1px solid var(--rule);

    background:var(--surface);
}

.chat-header{
    display:flex;
    align-items:center;
    justify-content:space-between;

    padding:22px 20px;

    border-bottom:1px solid var(--rule);
}

.chat-header h2{
    margin:0;

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:22px;
    font-weight:600;
}

.chat-header p{
    margin:5px 0 0;

    font-size:12px;

    opacity:.55;
}

.chat-header .btn-add{
    width:36px;
    height:36px;

    font-size:20px;
}

.chat-search{
    padding:14px;

    border-bottom:1px solid var(--rule);
}

.chat-search input{
    width:100%;

    box-sizing:border-box;

    padding:11px 13px;

    border:1px solid var(--rule);
    border-radius:8px;

    background:var(--parchment);

    color:var(--ink);

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:13px;

    outline:none;

    transition:0.36s;
}

.chat-search input:focus{
    border-color:var(--brass);
}

.chat-users{
    flex:1;

    overflow-y:auto;

    padding:8px;
}

.chat-user{
    display:flex;
    align-items:center;

    gap:11px;

    padding:11px;

    border-radius:9px;

    cursor:pointer;

    transition:0.36s;
}

.chat-user:hover{
    background:color-mix(in srgb,var(--brass) 8%,transparent);
}

.chat-user.active{
    background:color-mix(in srgb,var(--brass) 14%,transparent);
}

.chat-avatar{
    width:40px;
    height:40px;

    flex:0 0 40px;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:50%;

    background:var(--brass);

    color:var(--surface);

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:17px;
    font-weight:600;
}

.chat-user-info{
    min-width:0;

    display:flex;
    flex-direction:column;

    gap:3px;
}

.chat-user-info strong{
    font-size:14px;

    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.chat-user-info span{
    font-size:11px;

    opacity:.55;
}

.chat-unread-dot{
    width:9px;
    height:9px;

    margin-left:auto;

    flex:0 0 9px;

    border-radius:50%;

    background:var(--status-closed);

    opacity:0;
    transform:scale(.4);
    transition:0.36s;
}

.chat-user.has-unread .chat-unread-dot{
    opacity:1;
    transform:scale(1);
}

.chat-main{
    min-width:0;
    min-height:0;

    display:flex;
    flex-direction:column;

    background:var(--surface);
}

.chat-main-header{
    height:73px;

    flex:0 0 73px;

    display:flex;
    align-items:center;

    padding:0 24px;

    border-bottom:1px solid var(--rule);
}

.chat-current-user{
    display:flex;
    align-items:center;

    gap:12px;
}

.chat-current-user > div{
    display:flex;
    flex-direction:column;

    gap:3px;
}

.chat-current-user strong{
    font-size:14px;
}

.chat-current-user span:not(.chat-avatar){
    font-size:11px;

    opacity:.55;
}

.chat-typing-indicator{
    font-size:11px;
    color:var(--brass);
    opacity:.9 !important;
    font-style:italic;
}

.chat-messages{
    flex:1;

    min-height:0;

    overflow-y:auto;

    padding:26px;

    display:flex;
    flex-direction:column;

    gap:12px;
}

.chat-message{
    max-width:65%;

    padding:12px 15px;

    border-radius:12px;

    font-size:14px;

    line-height:1.45;

    animation:chatMessageAppear 0.36s ease forwards;
}

.chat-message p{
    margin:0;
}

.chat-message small{
    display:block;

    margin-top:6px;

    font-size:10px;

    opacity:.5;
}

.chat-message-name{
    display:block;

    margin-bottom:5px;

    color:var(--brass);

    font-size:11px;

    font-weight:600;
}

.chat-message.received{
    align-self:flex-start;

    background:var(--parchment);

    border-bottom-left-radius:3px;
}

.chat-message.sent{
    align-self:flex-end;

    background:var(--espresso);

    color:var(--ink-dark);

    border-bottom-right-radius:3px;
}

.chat-message.sent small{
    opacity:.55;
}

.chat-empty{
    flex:1;

    display:flex;
    flex-direction:column;

    align-items:center;
    justify-content:center;

    gap:7px;

    opacity:.5;

    text-align:center;
}

.chat-empty strong{
    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:20px;
}

.chat-empty span{
    font-size:13px;
}

.chat-input-area{
    display:flex;
    flex-shrink:0;

    gap:10px;

    padding:15px;

    border-top:1px solid var(--rule);

    background:var(--surface);
}

.chat-input-area input{
    flex:1;

    min-width:0;

    padding:12px 14px;

    border:1px solid var(--rule);
    border-radius:8px;

    background:var(--surface);

    color:var(--ink);

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:13px;

    outline:none;

    transition:0.36s;
}

.chat-input-area input:focus{
    border-color:var(--brass);
}

.chat-send{
    flex:0 0 auto;

    border:none;
    border-radius:8px;

    padding:0 19px;

    background:var(--brass);

    color:var(--surface);

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:13px;
    font-weight:600;

    cursor:pointer;

    transition:0.45s;
}

.chat-send:hover{
    background:var(--brass-light);

    color:var(--espresso);
}

@media(max-width:900px){

    .chat-page{
        grid-template-columns:240px minmax(0,1fr);
    }

    .chat-message{
        max-width:75%;
    }

}

@media(max-width:700px){

    .chat-page{
        grid-template-columns:minmax(0,1fr);

        height:calc(100dvh - 100px);
    }

    .chat-sidebar{
        display:none;
    }

    .chat-message{
        max-width:85%;
    }

}

@media(max-width:500px){

    .chat-main-header{
        padding:0 15px;
    }

    .chat-messages{
        padding:15px;
    }

    .chat-input-area{
        padding:10px;
    }

    .chat-send{
        padding:0 13px;
    }

}

@keyframes chatMessageAppear{

    from{
        opacity:0;
        transform:translateY(5px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }

}

.chat-page{
    display:grid;

    grid-template-columns:
        300px
        minmax(0,1fr);

    grid-template-rows:
        minmax(0,1fr);

    height:
        calc(100dvh - 120px);

    background:
        var(--surface);

    border:
        1px solid var(--rule);

    border-radius:
        14px;

    overflow:hidden;

    box-shadow:
        0 4px 18px
        rgba(36,28,21,.05);

    animation:
        fadeDown 0.9s ease forwards;
}

.chat-sidebar{
    min-width:0;
    min-height:0;

    display:flex;
    flex-direction:column;

    border-right:
        1px solid var(--rule);

    background:
        var(--surface);
}

.chat-header{
    display:flex;

    align-items:center;
    justify-content:space-between;

    padding:
        22px 20px;

    border-bottom:
        1px solid var(--rule);
}

.chat-header h2{
    margin:0;

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:22px;
}

.chat-header p{
    margin:
        5px 0 0;

    font-size:12px;

    opacity:.55;
}

.chat-search{
    padding:
        14px;

    border-bottom:
        1px solid var(--rule);
}

.chat-search input{
    width:100%;

    box-sizing:border-box;

    padding:
        11px 13px;

    border:
        1px solid var(--rule);

    border-radius:
        8px;

    background:
        var(--parchment);

    color:
        var(--ink);

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    outline:none;

    transition:0.36s;
}

.chat-search input:focus{
    border-color:
        var(--brass);
}

.chat-users{
    flex:1;

    overflow-y:auto;

    padding:8px;
}

.chat-user{
    display:flex;

    align-items:center;

    gap:11px;

    padding:11px;

    border-radius:9px;

    cursor:pointer;

    transition:0.36s;
}

.chat-user:hover{
    background:
        color-mix(in srgb,var(--brass) 8%,transparent);
}

.chat-user.active{
    background:
        color-mix(in srgb,var(--brass) 14%,transparent);
}

.chat-avatar{
    width:40px;
    height:40px;

    flex:
        0 0 40px;

    display:flex;

    align-items:center;
    justify-content:center;

    border-radius:50%;

    background:
        var(--brass);

    color:
        var(--surface);

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:17px;

    font-weight:600;
}

.chat-user-info{
    min-width:0;

    display:flex;
    flex-direction:column;

    gap:3px;
}

.chat-user-info strong{
    font-size:14px;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;
}

.chat-user-info span{
    font-size:11px;

    opacity:.55;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;
}

.chat-no-groups{
    padding:
        8px 10px 12px;

    font-size:12px;

    opacity:.4;
}

.chat-main{
    min-width:0;
    min-height:0;

    display:flex;

    flex-direction:column;

    background:
        var(--surface);
}

.chat-main-header{
    height:73px;

    flex:
        0 0 73px;

    display:flex;

    align-items:center;

    justify-content:space-between;

    padding:
        0 24px;

    border-bottom:
        1px solid var(--rule);
}

.chat-current-user{
    display:flex;

    align-items:center;

    gap:12px;

    margin-right:auto;
}

.chat-current-user > div{
    display:flex;

    flex-direction:column;

    gap:3px;
}

.chat-current-user strong{
    font-size:14px;
}

.chat-current-user span:not(.chat-avatar){
    font-size:11px;

    opacity:.55;
}

.chat-messages{
    flex:1;

    min-height:0;

    overflow-y:auto;

    padding:
        26px;

    display:flex;

    flex-direction:column;

    gap:12px;
}

.chat-message{
    position:relative;

    max-width:
        72%;

    padding:
        12px 15px;

    border-radius:
        12px;

    font-size:14px;

    line-height:
        1.45;

    animation:
        chatMessageAppear
        0.36s ease forwards;
}

.chat-message-delete{
    position:absolute;
    top:6px;
    right:8px;

    width:18px;
    height:18px;

    border:none;
    border-radius:50%;

    background:transparent;
    color:inherit;

    font-size:14px;
    line-height:1;

    display:flex;
    align-items:center;
    justify-content:center;

    cursor:pointer;
    opacity:0;

    transition:0.36s;
}

.chat-message.sent:hover .chat-message-delete{
    opacity:.55;
}

.chat-message-delete:hover{
    opacity:1 !important;
    background:rgba(0,0,0,.18);
}

.chat-message.sent{
    padding-right:30px;
}

.chat-message p{
    margin:0;
}

.chat-message small{
    display:block;

    margin-top:6px;

    font-size:10px;

    opacity:.5;
}

.chat-message-name{
    display:block;

    margin-bottom:
        5px;

    color:
        var(--brass);

    font-size:11px;

    font-weight:600;
}

.chat-message.received{
    align-self:flex-start;

    background:
        var(--parchment);

    border-bottom-left-radius:
        3px;
}

.chat-message.sent{
    align-self:flex-end;

    background:
        var(--espresso);

    color:
        var(--ink-dark);

    border-bottom-right-radius:
        3px;
}

.chat-message-attachments{
    display:flex;
    flex-direction:column;
    gap:8px;
    margin-bottom:8px;
}

.chat-attachment-image img{
    max-width:100%;
    max-height:260px;
    width:100%;
    border-radius:10px;
    display:block;
    cursor:pointer;
    object-fit:cover;
    transition:0.36s;
}

.chat-attachment-image img:hover{
    opacity:.9;
}

.chat-attachment-video video{
    max-width:100%;
    max-height:260px;
    border-radius:10px;
    display:block;
}

.chat-attachment-audio audio{
    width:100%;
    min-width:220px;
}

.chat-attachment-file{
    display:flex;
    align-items:center;
    gap:8px;
    padding:8px 10px;
    border-radius:8px;
    background:rgba(0,0,0,.06);
    cursor:pointer;
    transition:0.36s;
}

.chat-attachment-file:hover{
    background:rgba(0,0,0,.12);
}

.chat-attachment-file .attachment-icon{
    font-size:16px;
}

.chat-attachment-file .file-type-icon-svg{
    width:16px;
    height:20px;
}

.chat-attachment-name{
    font-size:12px;
    font-weight:600;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width:150px;
}

.chat-attachment-size{
    font-size:11px;
    opacity:.65;
    white-space:nowrap;
    margin-left:auto;
}

.chat-empty{
    flex:1;

    display:flex;

    flex-direction:column;

    align-items:center;
    justify-content:center;

    gap:7px;

    opacity:.5;

    text-align:center;
}

.chat-empty strong{
    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:20px;
}

.chat-empty span{
    font-size:13px;
}

.chat-attachments{
    margin-top:
        10px;

    display:flex;

    flex-direction:column;

    gap:8px;
}

.chat-attachment{
    position:relative;

    display:flex;

    align-items:center;

    gap:10px;

    width:
        min(360px,100%);

    padding:
        9px;

    border:
        1px solid
        color-mix(in srgb,var(--brass) 25%,transparent);

    border-radius:
        9px;

    background:
        rgba(255,255,255,.05);

    cursor:pointer;

    transition:0.36s;
}

.chat-attachment:hover{
    border-color:
        var(--brass);

    transform:
        translateY(-1px);
}

.chat-input-area{
    display:flex;
    flex-shrink:0;

    align-items:flex-end;

    gap:8px;

    padding:
        12px;

    border-top:
        1px solid var(--rule);

    background:
        var(--surface);
}

.chat-attach-btn{
    width:42px;
    height:42px;

    flex:
        0 0 42px;

    border:
        1px solid var(--rule);

    border-radius:
        9px;

    background:
        transparent;

    color:
        var(--ink);

    font-size:18px;

    cursor:pointer;

    transition:0.36s;
}

.chat-attach-btn:hover{
    border-color:
        var(--brass);

    color:
        var(--brass);
}

.chat-compose-area{
    flex:1;

    min-width:0;

    display:flex;

    flex-direction:column;

    gap:6px;
}

.chat-compose-area input{
    width:100%;

    box-sizing:border-box;

    padding:
        11px 13px;

    border:
        1px solid var(--rule);

    border-radius:
        8px;

    background:
        var(--surface);

    color:
        var(--ink);

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:13px;

    outline:none;
}

.chat-compose-area input:focus{
    border-color:
        var(--brass);
}

.chat-selected-files{
    display:flex;

    gap:6px;

    overflow-x:auto;
}

.chat-selected-file{
    max-width:
        220px;

    display:flex;

    align-items:center;

    gap:6px;

    padding:
        5px 7px;

    border:
        1px solid var(--rule);

    border-radius:
        7px;

    background:
        var(--parchment);

    font-size:11px;
}

.selected-file-name{
    overflow:hidden;

    text-overflow:ellipsis;

    white-space:nowrap;
}

.remove-selected-file{
    border:none;

    background:none;

    padding:0;

    color:
        var(--status-closed);

    cursor:pointer;

    font-size:16px;

    line-height:1;
}

.chat-send{
    height:42px;

    flex:
        0 0 auto;

    border:
        none;

    border-radius:
        8px;

    padding:
        0 19px;

    background:
        var(--brass);

    color:
        var(--surface);

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:13px;

    font-weight:600;

    cursor:pointer;

    transition:0.45s;
}

.chat-send:hover{
    background:
        var(--brass-light);

    color:
        var(--espresso);
}

.chat-send:disabled{
    opacity:.65;

    cursor:
        wait;
}

.chat-preview-modal{
    max-width:
        760px;
}

.chat-download-btn{
    display:inline-flex;

    align-items:center;
    justify-content:center;

    padding:
        11px 18px;

    border-radius:
        8px;

    background:
        var(--brass);

    color:
        var(--surface);

    text-decoration:
        none;

    font-size:
        13px;

    font-weight:
        600;
}

@media(max-width:900px){

    .chat-page{
        grid-template-columns:
            240px
            minmax(0,1fr);
    }

    .chat-message{
        max-width:
            78%;
    }

}

@media(max-width:700px){

    .chat-page{
        grid-template-columns:
            minmax(0,1fr);

        height:
            calc(100dvh - 100px);
    }

    .chat-sidebar{
        display:none;
    }

    .chat-message{
        max-width:
            86%;
    }

}

@media(max-width:500px){

    .chat-main-header{
        padding:
            0 15px;
    }

    .chat-messages{
        padding:
            15px;
    }

    .chat-input-area{
        padding:
            9px;
    }

    .chat-send{
        padding:
            0 12px;
    }

    .chat-attach-btn{
        width:
            38px;

        flex-basis:
            38px;
    }

}

@keyframes chatMessageAppear{

    from{
        opacity:0;
        transform:
            translateY(5px);
    }

    to{
        opacity:1;
        transform:
            translateY(0);
    }

}

@media(max-width:600px){

}

.chat-search input,
.chat-compose-area input,
.chat-input-area input{
    text-align:left !important;
}

.chat-search input::placeholder,
.chat-compose-area input::placeholder,
.chat-input-area input::placeholder{
    text-align:left !important;
}
.chat-search input,
.chat-compose-area input{
    justify-content:flex-start;
}

.news-page{
    max-width:1100px;
    margin:0 auto;
}

.news-page-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:25px;
    margin-bottom:30px;
}

.news-page-header h1{
    margin:0 0 8px;

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:34px;
    font-weight:600;
}

.news-page-header p{
    margin:0;

    font-size:14px;

    opacity:.6;
}

.news-create-btn{
    padding:12px 18px;

    border:none;
    border-radius:8px;

    background:var(--brass);
    color:var(--surface);

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:13px;
    font-weight:600;

    cursor:pointer;

    transition:0.45s;

    white-space:nowrap;
}

.news-create-btn:hover{
    background:var(--brass-light);
    color:var(--espresso);
}

.news-feed{
    display:flex;
    flex-direction:column;
    gap:20px;
}

.news-post{
    background:var(--surface);

    border:1px solid var(--rule);

    border-radius:14px;

    padding:24px;

    box-shadow:
        0 4px 18px rgba(36,28,21,.05);

    animation:
        slideUp 0.81s ease forwards;
}

.news-post-header{
    display:flex;
    align-items:center;
    justify-content:space-between;

    margin-bottom:18px;
}

.news-author{
    display:flex;
    align-items:center;

    gap:11px;
}

.news-author-avatar{
    width:42px;
    height:42px;
    aspect-ratio:1/1;
    flex-shrink:0;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:50%;

    background:var(--brass);
    color:var(--surface);

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:17px;
    font-weight:600;
}

.news-author > div:last-child{
    display:flex;
    flex-direction:column;
    gap:3px;
}

.news-author strong{
    font-size:14px;
}

.news-author span{
    font-size:11px;
    opacity:.55;
}

.news-edit-btn{
    width:34px;
    height:34px;

    display:flex;
    align-items:center;
    justify-content:center;

    border:1px solid var(--rule);
    border-radius:8px;

    background:transparent;
    color:var(--ink);

    font-size:17px;

    cursor:pointer;

    transition:0.36s;
}

.news-edit-btn:hover{
    border-color:var(--brass);
    color:var(--brass);
}

.news-post-content h2{
    margin:0 0 10px;

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:24px;
    font-weight:600;
}

.news-post-content p{
    margin:0;

    font-size:14px;
    line-height:1.65;

    white-space:pre-wrap;
}

.news-post-stats{
    display:flex;
    align-items:center;

    gap:18px;

    margin-top:20px;
    padding-top:15px;

    border-top:1px solid var(--rule);

    font-size:12px;

    opacity:.6;
}

.news-post-actions{
    display:flex;

    gap:8px;

    margin-top:12px;
}

.news-action-btn{
    display:flex;
    align-items:center;
    gap:7px;

    padding:8px 12px;

    border:1px solid var(--rule);
    border-radius:8px;

    background:transparent;
    color:var(--ink);

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:12px;

    cursor:pointer;

    transition:0.36s;
}

.news-action-btn:hover{
    border-color:var(--brass);
    color:var(--brass);
}

.news-action-btn.liked{
    background:rgba(168,84,74,.08);
    border-color:var(--status-closed);
    color:var(--status-closed);
}

.news-empty{
    min-height:400px;

    display:flex;
    flex-direction:column;

    align-items:center;
    justify-content:center;

    text-align:center;

    background:var(--surface);

    border:1px solid var(--rule);

    border-radius:14px;
}

.news-empty > div{
    font-size:45px;
    margin-bottom:10px;
}

.news-empty h2{
    margin:0 0 8px;

    font-size:22px;
}

.news-empty p{
    margin:0;

    font-size:13px;

    opacity:.55;
}

.news-form{
    display:flex;
    flex-direction:column;

    gap:15px;
}

.news-form label{
    display:flex;
    flex-direction:column;

    gap:6px;

    font-size:12px;

    letter-spacing:0;
opacity:.7;
}

.news-form input[type="text"],
.news-form textarea{
    box-sizing:border-box;

    width:100%;

    padding:11px 12px;

    border:1px solid var(--rule);
    border-radius:8px;

    background:var(--surface);
    color:var(--ink);

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:14px;

    outline:none;
}

.news-form textarea{
    resize:vertical;
    line-height:1.5;
}

.news-form input:focus,
.news-form textarea:focus{
    border-color:var(--brass);
}

.news-audience-title{
    margin-top:4px;

    font-size:12px;

    letter-spacing:0;

opacity:.65;
}

.news-audience-option{
    display:flex !important;
    flex-direction:row !important;
    align-items:center;

    gap:8px;

    font-size:13px !important;

    text-transform:none !important;

    letter-spacing:0;

    opacity:.9 !important;

    cursor:pointer;
}

.news-audience-option input{
    accent-color:var(--brass);
}

.news-employees-select{
    display:none;

    flex-direction:column;

    gap:7px;

    padding:10px;

    border:1px solid var(--rule);

    border-radius:8px;

    background:var(--parchment);
}

.news-employees-select label{
    display:flex !important;

    flex-direction:row !important;

    align-items:center;

    gap:8px;

    text-transform:none !important;
    letter-spacing:0;

    cursor:pointer;
}

.news-employees-select input{
    accent-color:var(--brass);
}

@media(max-width:700px){

    .news-page-header{
        flex-direction:column;
        align-items:stretch;
    }

    .news-create-btn{
        width:100%;
    }

    .news-post{
        padding:18px;
    }

    .news-post-content h2{
        font-size:21px;
    }

    .news-post-actions{
        flex-wrap:wrap;
    }

}

.news-page{
    width:100%;
    max-width:920px;

    margin:0 auto;

    padding-bottom:60px;
}

.news-page-header{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;

    gap:30px;

    margin-bottom:28px;
}

.news-page-header h1{
    margin:0 0 7px;

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:36px;
    line-height:1.1;
    font-weight:600;

    color:var(--ink);
}

.news-page-header p{
    margin:0;

    font-size:13px;

    color:var(--ink);

    opacity:.55;
}

.news-create-btn{
    height:42px;

    padding:0 18px;

    border:1px solid var(--brass);
    border-radius:8px;

    background:var(--brass);

    color:var(--surface);

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:12px;
    font-weight:600;

    cursor:pointer;

    transition:
        background 0.36s,
        transform 0.36s,
        box-shadow 0.36s;
}

.news-create-btn:hover{
    background:var(--brass-light);

    color:var(--espresso);

    transform:translateY(-1px);

    box-shadow:
        0 5px 15px
        color-mix(in srgb,var(--brass) 18%,transparent);
}

.news-feed{
    display:flex;

    flex-direction:column;

    gap:18px;
}

.news-post{
    position:relative;

    background:var(--surface);

    border:1px solid var(--rule);

    border-radius:14px;

    padding:24px 26px 18px;

    box-shadow:
        0 4px 18px
        rgba(36,28,21,.05);

    transition:
        box-shadow 0.45s,
        transform 0.45s;
}

.news-post:hover{
    transform:translateY(-1px);

    box-shadow:
        0 8px 24px
        rgba(36,28,21,.08);
}

.news-post-header{
    display:flex;

    align-items:center;
    justify-content:space-between;

    margin-bottom:20px;
}

.news-author{
    display:flex;

    align-items:center;

    gap:11px;
}

.news-author-avatar{
    width:42px;
    height:42px;
    aspect-ratio:1/1;

    flex:0 0 42px;

    display:flex;

    align-items:center;
    justify-content:center;

    border-radius:50%;

    background:var(--brass);

    color:var(--surface);

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:16px;
    font-weight:600;
}

.news-author > div:last-child{
    display:flex;

    flex-direction:column;

    gap:3px;
}

.news-author strong{
    font-size:13px;

    font-weight:600;
}

.news-author span{
    font-size:11px;

    opacity:.5;
}

.news-edit-btn{
    width:34px;
    height:34px;

    display:flex;

    align-items:center;
    justify-content:center;

    border:1px solid var(--rule);
    border-radius:8px;

    background:transparent;

    color:var(--ink);

    font-size:16px;

    cursor:pointer;

    transition:0.36s;
}

.news-edit-btn:hover{
    border-color:var(--brass);

    color:var(--brass);
}

.news-post-content{
    padding:
        0 4px;
}

.news-post-content h2{
    margin:
        0 0 11px;

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:24px;
    line-height:1.2;

    font-weight:600;

    color:var(--ink);
}

.news-post-content p{
    margin:0;

    font-size:14px;

    line-height:1.7;

    white-space:pre-wrap;

    color:var(--ink);

    opacity:.88;
}

.news-post-stats{
    display:flex;

    align-items:center;

    gap:19px;

    margin-top:22px;

    padding:
        13px 4px 11px;

    border-top:
        1px solid var(--rule);

    font-size:11px;

    opacity:.55;
}

.news-post-stats span{
    display:flex;

    align-items:center;

    gap:4px;
}

.news-post-actions{
    display:flex;

    align-items:center;

    gap:6px;

    margin-top:2px;
}

.news-action-btn{
    min-height:36px;

    display:flex;

    align-items:center;

    gap:6px;

    padding:
        0 11px;

    border:
        1px solid transparent;

    border-radius:8px;

    background:transparent;

    color:var(--ink);

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:11px;

    cursor:pointer;

    transition:
        background 0.36s,
        border-color 0.36s,
        color 0.36s;
}

.news-action-btn:hover{
    background:
        color-mix(in srgb,var(--brass) 7%,transparent);

    border-color:
        var(--rule);
}

.news-action-icon{
    font-size:15px;
}

.news-action-btn.liked{
    color:var(--status-closed);

    background:
        rgba(168,84,74,.07);
}

.news-action-btn:disabled{
    opacity:1;
}

.news-empty{
    min-height:360px;

    display:flex;

    flex-direction:column;

    align-items:center;
    justify-content:center;

    text-align:center;

    background:var(--surface);

    border:
        1px solid var(--rule);

    border-radius:14px;

    box-shadow:
        0 4px 18px
        rgba(36,28,21,.05);
}

.news-empty > div{
    font-size:40px;

    margin-bottom:8px;
}

.news-empty h2{
    margin:
        0 0 7px;

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:22px;
}

.news-empty p{
    margin:0;

    font-size:12px;

    opacity:.5;
}

.news-form{
    display:flex;

    flex-direction:column;

    gap:15px;
}

.news-form label{
    display:flex;

    flex-direction:column;

    gap:6px;

    font-size:11px;

    letter-spacing:0;

opacity:.7;
}

.news-form input[type="text"],
.news-form textarea{
    width:100%;

    box-sizing:border-box;

    padding:
        11px 12px;

    border:
        1px solid var(--rule);

    border-radius:8px;

    background:var(--surface);

    color:var(--ink);

    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;

    font-size:13px;

    outline:none;
}

.news-form textarea{
    line-height:1.55;

    resize:vertical;
}

.news-form input:focus,
.news-form textarea:focus{
    border-color:var(--brass);
}

.news-audience-title{
    margin-top:2px;

    font-size:11px;

    letter-spacing:0;

opacity:.55;
}

.news-audience-option{
    display:flex !important;

    flex-direction:row !important;

    align-items:center;

    gap:8px;

    font-size:12px !important;

    text-transform:none !important;

    letter-spacing:0;

    opacity:.9 !important;

    cursor:pointer;
}

.news-audience-option input{
    accent-color:var(--brass);
}

.news-employees-select{
    display:none;

    flex-direction:column;

    gap:6px;

    padding:
        10px;

    border:
        1px solid var(--rule);

    border-radius:8px;

    background:var(--parchment);
}

.news-employees-select label{
    display:flex !important;

    flex-direction:row !important;

    align-items:center;

    gap:8px;

    text-transform:none !important;

    letter-spacing:0;

    cursor:pointer;
}

@media(max-width:900px){

    .news-page{
        max-width:100%;
    }

}

@media(max-width:650px){

    .news-page-header{
        flex-direction:column;

        align-items:stretch;
    }

    .news-create-btn{
        width:100%;
    }

    .news-post{
        padding:
            19px 17px 16px;
    }

    .news-post-content h2{
        font-size:21px;
    }

    .news-action-btn{
        padding:
            0 9px;
    }

}

.news-file-upload-row{
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}

.news-file-upload-btn{
    display:inline-flex !important;
    flex-direction:row !important;
    align-items:center;
    justify-content:center;

    width:auto !important;

    padding:9px 13px;

    border:1px solid var(--rule);
    border-radius:8px;

    background:transparent;

    color:var(--ink);

    font-size:12px !important;
    letter-spacing:0;
    text-transform:none !important;

    cursor:pointer;

    transition:0.36s;
}

.news-file-upload-btn:hover{
    border-color:var(--brass);
    color:var(--brass);
}

.news-file-upload-hint{
    font-size:11px;
    opacity:.5;
}

.news-selected-files-list{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
}

.news-selected-file-chip{
    display:inline-flex;
    align-items:center;
    gap:6px;

    padding:6px 9px;

    border:1px solid var(--rule);
    border-radius:7px;

    background:var(--parchment);

    font-size:11px;

    max-width:100%;
}

.news-selected-file-chip button{
    width:18px;
    height:18px;

    display:inline-flex;
    align-items:center;
    justify-content:center;

    border:none;
    background:transparent;

    color:var(--status-closed);

    cursor:pointer;

    padding:0;

    font-size:15px;
}

.news-post-attachments{
    display:flex;
    flex-direction:column;
    gap:9px;

    margin-top:18px;
}

.news-media-item{
    position:relative;

    width:100%;

    overflow:hidden;

    border-radius:12px;

    line-height:0;
}

.news-media-item--photo img,
.news-media-item--video video{
    display:block;

    width:100%;
    max-height:600px;

    background:#18130f;
}

.news-media-item--photo img{
    object-fit:contain;

    cursor:zoom-in;

    -webkit-user-drag:none;
    user-select:none;
}

.news-media-item--video video{
    object-fit:contain;
}

.news-attachment-card{
    position:relative;

    display:flex;
    align-items:center;

    gap:10px;

    min-height:52px;

    padding:9px 40px 9px 10px;

    border:1px solid var(--rule);

    border-radius:9px;

    background:var(--parchment);
}

.news-attachment-card > span:first-child{
    width:36px;
    height:36px;

    flex:0 0 36px;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:8px;

    background:var(--surface);

    font-size:19px;
}

.news-attachment-card > div{
    min-width:0;

    display:flex;
    flex-direction:column;

    gap:3px;
}

.news-attachment-card strong{
    font-size:12px;

    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.news-attachment-card small{
    font-size:10px;

    opacity:.5;
}

.news-attachment-card a{
    position:absolute;

    right:10px;
    top:50%;

    transform:translateY(-50%);

    width:28px;
    height:28px;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:7px;

    background:color-mix(in srgb,var(--brass) 12%,transparent);

    color:var(--brass);

    text-decoration:none;

    font-weight:600;
}

.news-attachment-card audio{
    width:100%;
    max-width:360px;
    margin-top:3px;
}

.news-existing-files-title{
    font-size:11px;

    letter-spacing:0;
opacity:.55;
}

.news-lightbox-overlay{
    position:fixed;
    inset:0;

    z-index:9999;

    display:flex;
    align-items:center;
    justify-content:center;

    padding:40px;

    background:rgba(10,8,6,.92);

    animation:newsLightboxFade 0.27s ease-out;
}

@keyframes newsLightboxFade{
    from{opacity:0;}
    to{opacity:1;}
}

.news-lightbox-img{
    max-width:100%;
    max-height:100%;

    object-fit:contain;

    border-radius:6px;

    box-shadow:0 10px 40px rgba(0,0,0,.5);

    -webkit-user-drag:none;
    user-select:none;
}

.news-lightbox-close{
    position:absolute;
    top:20px;
    right:28px;

    width:40px;
    height:40px;

    display:flex;
    align-items:center;
    justify-content:center;

    border:1px solid rgba(255,255,255,.25);
    border-radius:50%;

    background:rgba(255,255,255,.08);
    color:#fff;

    font-size:22px;
    line-height:1;

    cursor:pointer;
    transition:0.36s;
}

.news-lightbox-close:hover{
    background:rgba(255,255,255,.18);
    border-color:rgba(255,255,255,.5);
}

body:not(.crm-authed) .crm-layout,
body:not(.crm-authed) .top-actions-bar,
body:not(.crm-authed) #notifPanel{
    display:none;
}

body.crm-tenant .sidebar{
    display:none;
}

body.crm-tenant .crm-container{
    margin-left:0;
    width:100%;
}

body.crm-tenant .top-actions-bar{
    left:0;
}

.tenant-home-actions{
    display:flex;
    flex-wrap:wrap;
    gap:16px;
    justify-content:center;
    margin-top:10px;
}

.tenant-action-btn{
    padding:16px 32px;
    border-radius:8px;
    border:1px solid var(--brass);
    background:transparent;
    color:inherit;
    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;
    font-size:14px;
    font-weight:600;
    letter-spacing:0;
    cursor:pointer;
    transition:0.45s;
}

.tenant-action-btn:hover{
    background:var(--espresso-light);
}

.tenant-profile-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:14px 0;
    border-bottom:1px solid var(--brass-light, rgba(0,0,0,.08));
}

.tenant-profile-row:last-child{
    border-bottom:none;
}

.tenant-profile-label{
    opacity:.65;
    font-size:14px;
}

.auth-overlay{
    position:fixed;
    inset:0;
    z-index:1000;
    display:flex;
    align-items:center;
    justify-content:center;
    background:var(--parchment);
    padding:20px;
}

.auth-card{
    width:100%;
    max-width:380px;
    background:var(--surface);
    border:1px solid var(--rule);
    border-radius:10px;
    padding:36px 32px 30px;
    box-shadow:0 20px 50px rgba(36,28,21,.12);
}

.auth-logo{
    width:56px;
    height:56px;
    margin:0 auto 24px;
    border:1px solid var(--brass);
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
}

.auth-logo-img{
    width:78%;
    height:78%;
    object-fit:contain;
}

.auth-tabs{
    display:flex;
    gap:6px;
    margin-bottom:24px;
    border-bottom:1px solid var(--rule);
}

.auth-tab{
    flex:1;
    background:none;
    border:none;
    padding:10px 6px 12px;
    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;
    font-size:12px;
    letter-spacing:0;
font-weight:500;
    color:var(--ink);
    opacity:.5;
    cursor:pointer;
    border-bottom:2px solid transparent;
    margin-bottom:-1px;
    transition:0.36s;
}

.auth-tab.active{
    opacity:1;
    border-bottom-color:var(--brass);
}

.auth-form{
    display:none;
    flex-direction:column;
    gap:16px;
}

.auth-form.active{
    display:flex;
}

.auth-label{
    display:flex;
    flex-direction:column;
    gap:6px;
    font-size:12px;
    letter-spacing:0;
    color:var(--ink);
    opacity:.75;
}

.auth-input{
    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;
    font-size:14px;
    padding:11px 12px;
    border:1px solid var(--rule);
    border-radius:6px;
    background:var(--parchment);
    color:var(--ink);
    outline:none;
    transition:0.36s;
}

.auth-input:focus{
    border-color:var(--brass);
}

.auth-error{
    font-size:12px;
    color:var(--status-closed);
    min-height:16px;
}

.auth-submit{
    margin-top:4px;
    padding:12px 18px;
    border:none;
    border-radius:6px;
    background:var(--espresso);
    color:var(--brass-light);
    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;
    font-size:12px;
    letter-spacing:0;
font-weight:600;
    cursor:pointer;
    transition:0.36s;
}

.auth-submit:hover{
    background:var(--espresso-light);
}

.auth-restricted{
    display:none;
    flex-direction:column;
    align-items:center;
    text-align:center;
    gap:16px;
}

.auth-restricted.active{
    display:flex;
}

.auth-restricted-title{
    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;
    font-size:20px;
    color:var(--ink);
}

.auth-restricted-text{
    font-size:13px;
    line-height:1.6;
    color:var(--ink);
    opacity:.75;
    margin:0;
}

.auth-logout{
    padding:10px 22px;
    border:1px solid var(--brass);
    border-radius:6px;
    background:none;
    color:var(--ink);
    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;
    font-size:12px;
    letter-spacing:0;
font-weight:600;
    cursor:pointer;
    transition:0.36s;
}

.auth-logout:hover{
    background:var(--brass);
    color:var(--espresso);
}

.menu-icon-svg{
    width:20px;
    height:20px;
    flex:0 0 20px;
    display:block;
    fill:none;
    stroke:currentColor;
    stroke-width:1.6;
    stroke-linecap:round;
    stroke-linejoin:round;
    color:var(--brass-light);
    opacity:1;
    filter:none;
}

.menu-item:hover .menu-icon-svg,
.menu-item.active .menu-icon-svg{
    color:var(--brass-light);
}

.chat-avatar.has-photo{
    overflow:hidden;
    position:relative;
}

.chat-avatar.has-photo img{
    display:block;
    width:100%;
    height:100%;
    max-width:100%;
    max-height:100%;
    object-fit:cover;
    object-position:center;
    border-radius:50%;
}

.chat-current-user .chat-avatar.has-photo{
    width:40px;
    height:40px;
    flex:0 0 40px;
}

.chat-user > .chat-avatar{
    width:40px;
    height:40px;
    flex:0 0 40px;
}

.chat-user > .chat-avatar.has-photo img{
    width:40px;
    height:40px;
}

.menu-item .menu-icon-svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    flex: 0 0 20px !important;
    display: block !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.6 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    color: var(--brass-light) !important;
    opacity: 1 !important;
    filter: none !important;
}

.chat-avatar {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    flex: 0 0 40px !important;
    overflow: hidden !important;
    position: relative !important;
    border-radius: 50% !important;
}

.chat-avatar img {
    display: block !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 50% !important;
}

.chat-user > .chat-avatar,
.chat-current-user > .chat-avatar {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    flex: 0 0 40px !important;
}

.chat-user > .chat-avatar img,
.chat-current-user > .chat-avatar img {
    width: 40px !important;
    height: 40px !important;
}

.presence-avatar-wrap{
    position:relative;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
}

.presence-dot{
    position:absolute;
    width:9px;
    height:9px;
    right:-1px;
    bottom:1px;
    border-radius:50%;
    background:#a29a8c;
    border:2px solid var(--surface);
    box-sizing:border-box;
    z-index:3;
    opacity:0;
    transform:scale(.55);
    transition:background 0.36s ease, opacity 0.36s ease, transform 0.36s ease, box-shadow 0.36s ease;
}

.presence-dot.is-online{
    background:#32b45a;
    opacity:1;
    transform:scale(1);
    box-shadow:0 0 0 1px rgba(50,180,90,.12);
}

.presence-avatar-wrap-small{
    width:38px;
    height:38px;
}

.presence-avatar-fallback{
    width:38px;
    height:38px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    overflow:hidden;
    background:var(--brass);
    color:var(--surface);
    font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;
    font-size:16px;
    font-weight:600;
}

.presence-avatar-fallback img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.presence-avatar-wrap-small .presence-dot{
    width:9px;
    height:9px;
    right:-1px;
    bottom:0;
}

.presence-empty{
    margin:12px 0 2px;
    font-size:13px;
    opacity:.55;
}

.chat-user .presence-avatar-wrap{
    width:40px;
    height:40px;
}

.chat-user .presence-dot{
    right:-1px;
    bottom:0;
}

.chat-current-user .presence-avatar-wrap{
    width:40px;
    height:40px;
}

.chat-current-user .presence-dot{
    right:-1px;
    bottom:0;
}

.user-card-avatar-wrap.presence-avatar-wrap{
    width:56px;
    height:56px;
}

.user-card-avatar-wrap .presence-dot{
    right:0;
    bottom:0;
}

.employee-photo-preview-wrap.presence-avatar-wrap{
    width:72px;
    height:72px;
}

.employee-photo-preview-wrap .presence-dot{
    width:11px;
    height:11px;
    right:0;
    bottom:2px;
    border-width:2px;
}

.theme-picker-grid{
display:grid;
grid-template-columns:repeat(auto-fill,minmax(min(150px,100%),1fr));
gap:14px;
margin-top:14px;
}

.theme-swatch-btn{
display:flex;
flex-direction:column;
align-items:stretch;
gap:8px;
padding:10px;
background:var(--surface);
border:2px solid var(--rule);
border-radius:12px;
cursor:pointer;
transition:0.36s;
text-align:left;
font-family:inherit;
}

.theme-swatch-btn:hover{
border-color:var(--brass-light);
transform:translateY(-2px);
}

.theme-swatch-btn.active{
border-color:var(--brass);
box-shadow:0 0 0 1px var(--brass);
}

.theme-swatch-preview{
display:flex;
height:44px;
border-radius:8px;
overflow:hidden;
border:1px solid rgba(0,0,0,.08);
}

.theme-swatch-preview span{
flex:1;
}

.theme-swatch-name{
font-size:12px;
font-weight:600;
letter-spacing:0;
color:var(--ink);
}

.theme-swatch-check{
font-size:11px;
color:var(--brass);
opacity:0;
font-weight:600;
letter-spacing:0;
}

.theme-swatch-btn.active .theme-swatch-check{
opacity:1;
}

@media(max-width:900px){

    html,
    body{
        overflow-x:hidden;
    }

    .menu-item > span:last-child{
        display:none;
    }

    .menu-item{
        justify-content:center;
        padding:14px 4px;
        gap:0;
    }

    .sidebar-profile-card{
        justify-content:center;
        margin: bottom 40px;px;
    }

    .sidebar-profile-info{
        display:none;
    }

    .crm-container{
        padding:40px 20px;
    }

}

@media(max-width:700px){

    #documentsListContainer{
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
    }

    .crm-table{
        min-width:560px;
    }

}

@media(max-width:600px){

    .crm-container{
        padding:26px 14px;
    }

    .card-header-row{
        flex-wrap:wrap;
    }

    .modal-box{
        width:94%;
        padding:20px 16px;
    }

    .employee-photo-picker{
        flex-wrap:wrap;
    }

}

@media(max-width:480px){

    .sidebar{
        width:64px;
        padding:20px 10px;
    }

    .crm-container{
        margin-left:64px;
        width:calc(100% - 64px);
    }

    .logo{
        width:44px;
        height:44px;
        font-size:16px;
        margin-bottom:30px;
    }

    .welcome h1{
        font-size:28px;
    }

    .theme-btn{
        padding:8px 12px;
        font-size:11px;
    }

}

@media(max-width:900px){
    .top-actions-bar{
        height:64px;
        padding:0 20px;
    }

    .crm-container{
        padding-top:94px;
    }
}

@media(max-width:480px){
    .top-actions-bar{
        left:64px;
        height:56px;
        padding:0 12px;
        gap:8px;
    }

    .crm-container{
        padding-top:84px;
    }
}

@media(max-width:700px){
    .chat-page{
        position:relative;
        overflow:hidden;
    }

    .chat-sidebar{
        display:flex;
        width:100%;
    }

    .chat-main{
        display:none;
    }

    .chat-page.chat-mobile-open .chat-sidebar{
        display:none;
    }

    .chat-page.chat-mobile-open .chat-main{
        display:flex;
    }

    .chat-mobile-back-btn{
        display:inline-flex;
    }
}

.chat-mobile-back-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 34px;
    width:34px;
    height:34px;
    margin-right:10px;
    border:1px solid var(--rule);
    border-radius:8px;
    background:transparent;
    color:var(--ink);
    font-size:16px;
    line-height:1;
    cursor:pointer;
    transition:0.36s;
}

.chat-mobile-back-btn:hover{
    background:color-mix(in srgb,var(--brass) 10%,transparent);
}
.requests-tabs{
display:flex;
flex-wrap:wrap;
gap:8px;
margin-bottom:14px;
}

.requests-tab{
padding:8px 14px;
border-radius:20px;
border:1px solid var(--rule);
background:transparent;
color:var(--ink);
font-size:12px;
letter-spacing:0;
cursor:pointer;
transition:0.36s;
}

.requests-tab:hover{
border-color:var(--brass);
}

.requests-tab.active{
background:var(--brass);
border-color:var(--brass);
color:var(--surface);
}

.requests-toolbar{
display:flex;
flex-wrap:wrap;
gap:10px;
margin-bottom:16px;
}

.requests-search{
flex:1;
min-width:200px;
padding:9px 12px;
border-radius:8px;
border:1px solid var(--rule);
background:var(--surface);
color:var(--ink);
font-size:13px;
}

.requests-select{
padding:9px 12px;
border-radius:8px;
border:1px solid var(--rule);
background:var(--surface);
color:var(--ink);
font-size:13px;
}

.requests-grid{
display:grid;
grid-template-columns:repeat(auto-fill, minmax(min(280px,100%),1fr));
gap:14px;
}

.requests-card{
border:1px solid var(--rule);
border-radius:12px;
padding:14px;
cursor:pointer;
transition:0.36s;
display:flex;
flex-direction:column;
gap:8px;
background:var(--surface);
}

.requests-card:hover{
border-color:var(--brass);
transform:translateY(-1px);
}

.requests-card-top{
display:flex;
align-items:center;
justify-content:space-between;
}

.requests-status-pill{
padding:4px 10px;
border-radius:20px;
font-size:11px;
letter-spacing:0;
color:#fff;
}

.requests-status-pill.status-new{ background:var(--status-new); }
.requests-status-pill.status-progress{ background:var(--status-progress); }
.requests-status-pill.status-waiting{ background:var(--status-waiting); }
.requests-status-pill.status-closed{ background:var(--status-closed); }

.requests-card-creator{
font-size:12px;
opacity:.65;
}

.requests-card-desc{
font-size:13px;
margin:0;
opacity:.85;
}

.requests-card-bottom{
display:flex;
align-items:center;
justify-content:space-between;
margin-top:auto;
font-size:11px;
opacity:.7;
}

.requests-card-executor{
display:flex;
align-items:center;
gap:6px;
min-width:0;
}
.requests-card-executor > span:not(.requests-mini-avatar){
min-width:0;
overflow-wrap:anywhere;
}
.requests-card-bottom{
gap:8px;
}

.requests-card-noexec{
opacity:.5;
}

.requests-mini-avatar{
width:22px;
height:22px;
border-radius:50%;
background:var(--brass-light);
color:var(--espresso);
display:flex;
align-items:center;
justify-content:center;
font-size:11px;
font-weight:600;
overflow:hidden;
}

.requests-mini-avatar.has-photo img{
width:100%;
height:100%;
object-fit:cover;
}

.requests-executor-card{
display:flex;
align-items:center;
gap:12px;
padding:10px 12px;
border:1px solid var(--rule);
border-radius:10px;
margin-top:8px;
cursor:default;
}

.requests-executor-avatar{
width:44px;
height:44px;
border-radius:50%;
background:var(--brass-light);
color:var(--espresso);
display:flex;
align-items:center;
justify-content:center;
font-weight:700;
overflow:hidden;
flex-shrink:0;
}

.requests-executor-avatar.has-photo img{
width:100%;
height:100%;
object-fit:cover;
}

.requests-executor-position{
font-size:12px;
opacity:.6;
}

.requests-option-list{
display:flex;
flex-wrap:wrap;
gap:8px;
}

.requests-option-btn{
padding:9px 14px;
border-radius:8px;
border:1px solid var(--rule);
background:transparent;
color:var(--ink);
font-size:13px;
cursor:pointer;
transition:0.36s;
}

.requests-option-btn:hover{
border-color:var(--brass);
background:color-mix(in srgb,var(--brass) 8%,transparent);
}

.requests-history{
display:flex;
flex-direction:column;
gap:0;
margin-top:8px;
}

.requests-history-row{
display:grid;
grid-template-columns:120px 1fr 140px;
gap:8px;
font-size:12px;
padding:8px 0;
border-bottom:1px solid var(--rule);
opacity:.85;
}

.requests-history-row:last-child{
border-bottom:none;
}

.requests-parts-list{
display:flex;
flex-direction:column;
gap:4px;
margin-bottom:6px;
}

.requests-parts-row{
display:flex;
justify-content:space-between;
font-size:13px;
padding:6px 0;
border-bottom:1px dashed var(--rule);
}

.requests-part-row{
display:flex;
gap:8px;
margin-bottom:8px;
}

.requests-part-row .np-name{
flex:2;
}

.requests-part-row .np-qty{
flex:1;
}

.requests-part-row input{
padding:9px 10px;
border-radius:8px;
border:1px solid var(--rule);
background:var(--surface);
color:var(--ink);
font-size:13px;
}

.requests-part-remove{
width:34px;
border:1px solid var(--rule);
border-radius:8px;
background:transparent;
color:var(--ink);
cursor:pointer;
font-size:16px;
}

@media (max-width: 720px){
  .requests-grid{
    grid-template-columns:minmax(0,1fr);
  }
  .requests-history-row{
    grid-template-columns:minmax(0,1fr);
    gap:2px;
  }
  .requests-toolbar{
    flex-direction:column;
  }
  .requests-search,
  .requests-select{
    width:100%;
  }
}

.home-dashboard{
display:grid;
grid-template-columns:260px 1fr 300px;
grid-template-areas:
"online requests calendar"
".      chat      news";
gap:24px;
align-items:start;
}
.home-dashboard-area--online{grid-area:online;}
.home-dashboard-area--requests{grid-area:requests;}
.home-dashboard-area--calendar{grid-area:calendar;}
.home-dashboard-area--chat{grid-area:chat;}
.home-dashboard-area--news{grid-area:news;}

.home-dashboard-area{
align-self:start;
overflow-y:auto;
}
.home-dashboard-area--online,
.home-dashboard-area--requests,
.home-dashboard-area--calendar{
height:440px;
}
.home-dashboard-area--chat,
.home-dashboard-area--news{
height:200px;
}

.home-dashboard .chart-card{padding:22px;}

.home-widget-header{
display:flex;
align-items:center;
justify-content:space-between;
margin-bottom:14px;
}
.home-widget-header h2{
font-size:17px;
font-weight:600;
margin:0;
}
.home-widget-link{
font-size:13px;
color:var(--brass);
cursor:pointer;
opacity:.85;
}
.home-widget-link:hover{opacity:1;text-decoration:underline;}

.home-widget-chips{
display:flex;
flex-wrap:wrap;
gap:8px;
margin-bottom:14px;
}
.home-widget-chip{font-size:12px;}

.home-widget-list{
display:flex;
flex-direction:column;
gap:10px;
}
.home-widget-row{
display:flex;
align-items:center;
gap:10px;
padding:10px 12px;
background:var(--parchment);
border-radius:10px;
cursor:pointer;
transition:transform 0.27s ease, box-shadow 0.27s ease;
}
.home-widget-row:hover{
transform:translateY(-1px);
box-shadow:0 3px 10px rgba(36,28,21,.08);
}
.home-widget-row-body{
display:flex;
flex-direction:column;
gap:2px;
font-size:13px;
min-width:0;
}
.home-widget-row-body strong{font-size:13.5px;}
.home-widget-row-body span{
opacity:.7;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
.home-widget-row--event{
justify-content:space-between;
cursor:default;
}
.home-widget-row-delete{
background:none;
border:none;
font-size:18px;
line-height:1;
color:var(--status-closed);
cursor:pointer;
opacity:.6;
padding:0 4px;
}
.home-widget-row-delete:hover{opacity:1;}

.home-news-rotator{
display:flex;
align-items:baseline;
gap:8px;
flex-wrap:nowrap;
overflow:hidden;
padding:10px 12px;
background:var(--parchment);
border-radius:10px;
cursor:pointer;
font-size:13px;
}
.home-news-rotator strong{
flex:0 0 auto;
max-width:40%;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
.home-news-rotator .home-news-body{
flex:1 1 auto;
min-width:0;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
opacity:.75;
}
.home-news-rotator .home-news-author{
flex:0 1 auto;
min-width:0;
max-width:40%;
overflow:hidden;
text-overflow:ellipsis;
opacity:.5;
font-size:11.5px;
white-space:nowrap;
}
.home-news-sep{opacity:.35;flex:0 0 auto;}
.home-news-dots{
display:flex;
gap:5px;
margin-top:10px;
}
.home-news-dot{
width:5px;
height:5px;
border-radius:50%;
background:var(--rule);
}
.home-news-dot--active{background:var(--brass);}

@media(max-width:1100px){
.home-dashboard{
grid-template-columns:minmax(0,1fr) minmax(0,1fr);
grid-template-areas:
"online online"
"requests calendar"
"chat news";
}
}
@media(max-width:700px){
.home-dashboard{
grid-template-columns:minmax(0,1fr);
grid-template-areas:
"online"
"requests"
"calendar"
"chat"
"news";
}
.home-dashboard-area--online,
.home-dashboard-area--requests,
.home-dashboard-area--calendar,
.home-dashboard-area--chat,
.home-dashboard-area--news{
height:auto;
max-height:320px;
}
}

.home-calendar-nav{
display:flex;
align-items:center;
justify-content:space-between;
margin-bottom:10px;
}
.home-calendar-month-label{
font-size:13px;
font-weight:600;
}
.home-calendar-nav-btn{
background:var(--parchment);
border:none;
border-radius:8px;
width:26px;
height:26px;
font-size:16px;
line-height:1;
cursor:pointer;
color:var(--espresso);
}
.home-calendar-nav-btn:hover{background:var(--brass);color:#fff;}

.home-calendar-weekdays{
display:grid;
grid-template-columns:repeat(7,minmax(0,1fr));
gap:4px;
margin-bottom:4px;
}
.home-calendar-weekdays span{
text-align:center;
font-size:10.5px;
opacity:.5;
}
.home-calendar-grid{
display:grid;
grid-template-columns:repeat(7,minmax(0,1fr));
gap:4px;
}
.home-calendar-cell{
position:relative;
aspect-ratio:1;
border:none;
border-radius:8px;
background:var(--parchment);
font-size:12px;
cursor:pointer;
color:var(--espresso);
display:flex;
align-items:center;
justify-content:center;
}
.home-calendar-cell--empty{background:transparent;cursor:default;}
.home-calendar-cell:hover:not(.home-calendar-cell--empty){background:var(--surface);border:1px solid var(--brass);}
.home-calendar-cell--today{font-weight:700;border:1px solid var(--brass);}
.home-calendar-cell--selected{background:var(--brass);color:#fff;}
.home-calendar-dot{
position:absolute;
bottom:4px;
left:50%;
transform:translateX(-50%);
width:4px;
height:4px;
border-radius:50%;
background:var(--status-waiting);
}
.home-calendar-cell--selected .home-calendar-dot{background:#fff;}

@media(max-width:768px){
  input,
  select,
  textarea{
    font-size:16px !important;
  }
}

@media(max-width:650px){
  .news-post-actions{
    flex-wrap:wrap;
    row-gap:6px;
  }
}

@media(max-width:900px){
  html,
  body{
    max-width:100%;
    overflow-x:hidden;
  }
  img,
  svg{
    max-width:100%;
    height:auto;
  }
}

@media(max-width:700px){
  .modal-overlay{
    align-items:flex-end;
  }
  .modal-box{
    width:100%;
    max-width:100%;
    border-radius:16px 16px 0 0;
    max-height:88vh;
    max-height:88dvh;
  }
}

@media(max-width:400px){
  .notif-panel{
    left:10px;
    right:10px;
  }
  .toast-stack{
    right:10px;
    left:10px;
    width:auto;
  }
}

@media(max-width:700px){
  .chat-mobile-back-btn {
    position:relative;
  }
  .chat-mobile-back-btn::after {
    content:"";
    position:absolute;
    inset:-6px;
  }
}

@supports (padding: max(0px)){
  @media(max-width:900px){
    .top-actions-bar{
      padding-left:max(20px, env(safe-area-inset-left));
      padding-right:max(20px, env(safe-area-inset-right));
      height:calc(64px + env(safe-area-inset-top));
      padding-top:env(safe-area-inset-top);
    }
    .crm-container{
      padding-top:calc(94px + env(safe-area-inset-top));
    }
    .sidebar{
      padding-top:calc(20px + env(safe-area-inset-top));
      padding-bottom:calc(20px + env(safe-area-inset-bottom));
    }
  }
}

@media(max-width:900px){
  .menu-item,
  .theme-btn,
  .requests-card,
  .home-widget-row,
  button{
    -webkit-tap-highlight-color:transparent;
  }
}

.purchase-toolbar{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:16px;}
.purchase-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(310px,100%),1fr));gap:14px;}
.purchase-card{border:1px solid var(--rule);border-radius:12px;padding:16px;background:var(--surface);cursor:pointer;transition:0.36s;display:flex;flex-direction:column;gap:10px;}
.purchase-card:hover{border-color:var(--brass);transform:translateY(-1px);}
.purchase-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;}
.purchase-card-number{font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;font-size:17px;font-weight:600;}
.purchase-card-creator{font-size:12px;opacity:.62;}
.purchase-card-summary{font-size:13px;line-height:1.5;}
.purchase-card-bottom{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;margin-top:auto;}
.purchase-card-total{font-weight:700;font-size:15px;}
.purchase-status-pill{padding:4px 9px;border-radius:20px;font-size:11px;letter-spacing:0;color:#fff;white-space:nowrap;}
.purchase-status-pill.sent{background:var(--status-new);}.purchase-status-pill.review{background:var(--status-waiting);}.purchase-status-pill.approved{background:var(--status-progress);}.purchase-status-pill.rejected{background:var(--status-closed);}.purchase-status-pill.ordered{background:var(--status-waiting);}.purchase-status-pill.delivered{background:var(--status-progress);}.purchase-status-pill.issued{background:var(--status-progress);}
.purchase-items-table-wrap{overflow-x:auto;margin-top:10px;}
.purchase-items-table{width:100%;border-collapse:collapse;font-size:12px;min-width:780px;}
.purchase-items-table th,.purchase-items-table td{padding:9px 8px;text-align:left;border-bottom:1px solid var(--rule);vertical-align:top;}
.purchase-items-table th{font-size:10px;letter-spacing:0;opacity:.58;font-weight:600;}
.purchase-item-link{color:var(--brass);text-decoration:none;}.purchase-item-link:hover{text-decoration:underline;}
.purchase-price-input{box-sizing:border-box;width:110px;padding:7px 8px;border:1px solid var(--rule);border-radius:7px;background:var(--surface);color:var(--ink);font-size:12px;}
.purchase-price-input:focus{outline:none;border-color:var(--brass);}
.purchase-item-comment{font-size:11px;opacity:.58;margin-top:3px;line-height:1.35;}
.purchase-total-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:14px;}
.purchase-total-box{border:1px solid var(--rule);border-radius:10px;padding:11px 12px;background:var(--parchment);}.purchase-total-box span{display:block;font-size:10px;letter-spacing:0;opacity:.55;margin-bottom:4px;}.purchase-total-box strong{font-size:15px;}
.purchase-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px;}.purchase-actions .btn-delete{margin-top:0;width:auto;}
.purchase-modal-wide .modal-box{max-width:min(980px,96vw);width:96%;}
.purchase-form-items{display:flex;flex-direction:column;gap:10px;}
.purchase-form-head,.purchase-form-row{display:grid;grid-template-columns:minmax(170px,2.1fr) minmax(90px,.8fr) minmax(120px,1fr) minmax(180px,1.5fr) minmax(170px,1.4fr) minmax(120px,1fr) 36px;gap:8px;}
.purchase-form-head{font-size:10px;letter-spacing:0;opacity:.55;padding:0 2px;}
.purchase-form-row{align-items:start;}
.purchase-form-row input,.purchase-form-row textarea{box-sizing:border-box;width:100%;padding:9px 10px;border-radius:8px;border:1px solid var(--rule);background:var(--surface);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;font-size:13px;}
.purchase-form-row textarea{min-height:38px;resize:vertical;}.purchase-row-sum{padding:9px 8px;font-weight:700;font-size:12px;white-space:nowrap;}
.purchase-remove-row{width:36px;height:36px;border:1px solid var(--rule);border-radius:8px;background:transparent;color:var(--ink);cursor:pointer;font-size:16px;}.purchase-remove-row:hover{border-color:var(--status-closed);color:var(--status-closed);}
.purchase-form-total{display:flex;justify-content:flex-end;gap:18px;flex-wrap:wrap;padding-top:10px;margin-top:4px;border-top:1px solid var(--rule);font-size:13px;}.purchase-form-total strong{font-size:15px;}.purchase-muted{opacity:.55;font-size:12px;}
@media (max-width:820px){.purchase-total-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.purchase-form-head{display:none;}.purchase-form-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);}.purchase-form-row > :first-child{grid-column:1 / -1;}.purchase-row-sum{padding:8px 0;}}
@media (max-width:560px){.purchase-grid{grid-template-columns:minmax(0,1fr);}.purchase-total-grid{grid-template-columns:minmax(0,1fr);}}

:root{--r-lg:18px;--r-md:12px;--r-sm:9px;
--shadow-1:0 1px 2px rgba(40,25,10,.05),0 8px 22px -12px rgba(40,25,10,.16);
--shadow-2:0 2px 4px rgba(40,25,10,.06),0 18px 38px -16px rgba(40,25,10,.26);}
body{font-family:-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif;font-size:15px;line-height:1.5;color:var(--ink);background:var(--parchment);-webkit-font-smoothing:antialiased;}
h1,h2,h3,.stat-number,.donut-hole strong{font-family:inherit;font-weight:650;letter-spacing:-.015em;}

.logo{border-radius:var(--r-md);margin-bottom:28px;}
.menu{gap:4px;}
.menu-item{border-radius:var(--r-md);border-left:0;color:var(--ink-dark);}
.menu-item span{font-size:14px;font-weight:500;}
.menu-item:hover{background:rgba(255,255,255,.08);}
.menu-item.active{background:rgba(255,255,255,.15);border-left:0;color:#fff;}
.menu-item.active .menu-icon-svg{color:#fff;}
.sidebar-profile-card{border-top:0;background:rgba(255,255,255,.07);border-radius:var(--r-md);margin-bottom:0;padding:12px;}
@media(min-width:901px){.menu-item{padding:11px 14px;}}

.top-actions-bar{background:color-mix(in srgb,var(--parchment) 84%,transparent);-webkit-backdrop-filter:saturate(1.4) blur(10px);backdrop-filter:saturate(1.4) blur(10px);border-bottom:1px solid var(--rule);}
.theme-btn{border-radius:999px;font-size:13px;font-weight:500;background:var(--surface);border:1px solid var(--rule);box-shadow:none;color:var(--ink);}
.theme-btn:hover{background:var(--brass);border-color:var(--brass);color:#fff;}

.welcome{text-align:left;margin-bottom:28px;animation:none;}
.welcome h1{font-size:30px;margin:0 0 6px;animation:none;}
.welcome p{opacity:.7;margin:0;}

.online-card,.chart-card,.news-post,.auth-card,.modal-box{background:var(--surface);border:1px solid var(--rule);border-radius:var(--r-lg);box-shadow:var(--shadow-1);animation:none;}
.online-card,.chart-card{padding:24px;}
.modal-box{border:0;box-shadow:var(--shadow-2);}
.requests-card,.purchase-card{background:var(--surface);border:1px solid var(--rule);border-radius:var(--r-md);box-shadow:var(--shadow-1);transition:box-shadow 0.36s,transform 0.36s,border-color 0.36s;}
.requests-card:hover,.purchase-card:hover{box-shadow:var(--shadow-2);border-color:var(--brass-light);transform:translateY(-1px);}
.user-card,.employee{background:var(--surface);border:1px solid var(--rule);border-radius:var(--r-md);animation:none;}

.btn-submit,.auth-submit{background:var(--brass);color:#fff;border-radius:var(--r-sm);font-size:14px;font-weight:600;padding:12px 18px;transition:filter 0.36s,transform 0.18s;}
.btn-submit:hover,.auth-submit:hover{filter:brightness(1.08);}
.btn-submit:active,.auth-submit:active{transform:translateY(1px);}
.btn-secondary{background:var(--surface);border-radius:var(--r-sm);font-size:13px;font-weight:500;padding:9px 16px;}
.btn-secondary:hover{border-color:var(--brass);color:var(--brass);}
.btn-add{box-shadow:var(--shadow-1);}
.btn-delete{border-radius:var(--r-sm);}

:where(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]),select,textarea){font-family:inherit;border:1px solid var(--rule);border-radius:var(--r-sm);background:var(--surface);color:var(--ink);}
.auth-input,.requests-select{border-radius:var(--r-sm);font-family:inherit;}
input:focus,select:focus,textarea:focus{border-color:var(--brass);box-shadow:0 0 0 3px color-mix(in srgb,var(--brass) 22%,transparent);outline:none;}
button:focus-visible,.menu-item:focus-visible{outline:2px solid var(--brass);outline-offset:2px;}

.crm-table{animation:none;}
.crm-table th{opacity:1;color:color-mix(in srgb,var(--ink) 62%,transparent);font-size:13px;font-weight:600;}
.crm-table td{border-bottom-color:color-mix(in srgb,var(--rule) 60%,transparent);}
.crm-table tbody tr:hover{background:color-mix(in srgb,var(--brass) 7%,transparent);}
.purchase-status-pill{font-size:12px;font-weight:600;padding:4px 10px;}

@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;}}

:root{--spring:cubic-bezier(.34,1.45,.64,1);--out:cubic-bezier(.22,1,.36,1);
--glass:color-mix(in srgb,var(--surface) 72%,transparent);
--hair:color-mix(in srgb,#fff 70%,var(--rule));
--shadow-1:0 1px 1px rgba(30,18,8,.04),0 10px 30px -14px rgba(30,18,8,.18);
--shadow-2:0 2px 4px rgba(30,18,8,.05),0 24px 50px -18px rgba(30,18,8,.30);}
html{scroll-behavior:smooth;}
body{font-family:var(--font,-apple-system,BlinkMacSystemFont,'SF Pro Text','SF Pro Display','Onest',system-ui,sans-serif);
background-color:var(--parchment);
background-image:radial-gradient(1100px 560px at 88% -8%,color-mix(in srgb,var(--brass-light) 32%,transparent),transparent 62%),radial-gradient(900px 520px at 6% 108%,color-mix(in srgb,var(--brass-light) 20%,transparent),transparent 60%);
background-attachment:fixed;}
::selection{background:color-mix(in srgb,var(--brass) 30%,transparent);}
h1,h2,h3{letter-spacing:-.022em;font-weight:650;}
.welcome h1{font-size:36px;letter-spacing:-.03em;}
*{scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--ink) 25%,transparent) transparent;}

.chart-card,.online-card,.news-post,.requests-card,.purchase-card,.user-card,.employee,.modal-box,.auth-card,.notif-panel,.toast{
background:var(--glass);border:1px solid var(--hair);border-radius:22px;
box-shadow:var(--shadow-1),inset 0 1px 0 rgba(255,255,255,.75);}
.chart-card,.online-card,.modal-box,.auth-card,.notif-panel,.top-actions-bar{-webkit-backdrop-filter:blur(24px) saturate(1.6);backdrop-filter:blur(24px) saturate(1.6);}
.requests-card,.purchase-card,.user-card,.employee{border-radius:18px;}
.requests-card,.purchase-card,.user-card,.tenant-action-btn{transition:transform 0.9s var(--out),box-shadow 0.72s var(--out),border-color 0.54s;}
.requests-card:hover,.purchase-card:hover,.user-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-2),inset 0 1px 0 rgba(255,255,255,.8);}
.requests-card:active,.purchase-card:active,.user-card:active{transform:scale(.985);transition-duration:0.27s;}

@media(min-width:901px){
.sidebar{left:12px;top:12px;height:calc(100dvh - 24px);width:228px;border-radius:26px;
background:color-mix(in srgb,var(--espresso) 93%,transparent);
box-shadow:0 24px 60px -24px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,255,255,.14);}}
.menu{position:relative;}
.menu-item{position:relative;z-index:1;transition:color 0.54s,transform 0.72s var(--spring);}
.menu-item.active{background:transparent;}
.menu-item:hover{background:transparent;}
.menu-item:hover:not(.active){transform:translateX(3px);color:#fff;}
.menu-item:active{transform:scale(.97);}
.menu-icon-svg{transition:transform 0.9s var(--spring);}
.menu-item:hover .menu-icon-svg,.menu-item.active .menu-icon-svg{transform:scale(1.12);}
.menu-indicator{position:absolute;left:0;right:0;top:0;z-index:0;border-radius:12px;pointer-events:none;
background:rgba(255,255,255,.17);box-shadow:inset 0 1px 0 rgba(255,255,255,.22),0 6px 16px -8px rgba(0,0,0,.4);
transition:transform 0.99s var(--spring),height 0.63s var(--out),opacity 0.45s;}
.sidebar-profile-card.active{background:rgba(255,255,255,.17);}

.top-actions-bar{background:color-mix(in srgb,var(--parchment) 70%,transparent);border-bottom:1px solid color-mix(in srgb,var(--rule) 70%,transparent);}
.theme-btn,.btn-secondary,.btn-submit,.auth-submit,.btn-add,.btn-delete{transition:transform 0.72s var(--spring),box-shadow 0.54s,background 0.45s,filter 0.45s,border-color 0.45s,color 0.45s;}
.theme-btn:hover,.btn-secondary:hover,.btn-add:hover{transform:translateY(-1px) scale(1.03);}
.theme-btn:active,.btn-secondary:active,.btn-submit:active,.auth-submit:active,.btn-add:active,.btn-delete:active{transform:scale(.95);transition-duration:0.22s;}
.btn-submit,.auth-submit{border-radius:13px;padding:13px 20px;
background:linear-gradient(180deg,color-mix(in srgb,var(--brass) 88%,#fff),var(--brass));
box-shadow:inset 0 1px 0 rgba(255,255,255,.3),0 10px 22px -10px color-mix(in srgb,var(--brass) 80%,#000);}
.btn-submit:hover,.auth-submit:hover{transform:translateY(-1px);box-shadow:inset 0 1px 0 rgba(255,255,255,.3),0 16px 28px -12px color-mix(in srgb,var(--brass) 85%,#000);}
:where(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]),select,textarea),.auth-input,.requests-select{border-radius:13px;background:color-mix(in srgb,var(--surface) 80%,transparent);transition:border-color 0.45s,box-shadow 0.63s var(--out),background 0.45s;}
input:focus,select:focus,textarea:focus{box-shadow:0 0 0 4px color-mix(in srgb,var(--brass) 24%,transparent);background:var(--surface);}
.crm-table tbody tr{transition:background 0.45s;}

.modal-box,.notif-panel,.toast{animation:appleModal 0.99s var(--out) both;}
@keyframes appleModal{from{opacity:0;transform:translateY(18px) scale(.94);}to{opacity:1;transform:none;}}
.auth-overlay{overflow:hidden;background-color:var(--parchment);}
.auth-overlay::before,.auth-overlay::after{content:"";position:absolute;width:62vmax;height:62vmax;border-radius:50%;filter:blur(90px);pointer-events:none;animation:aurora 24s ease-in-out infinite alternate;}
.auth-overlay::before{background:var(--brass-light);opacity:.55;top:-26vmax;left:-18vmax;}
.auth-overlay::after{background:var(--espresso-light);opacity:.32;bottom:-32vmax;right:-22vmax;animation-duration:30s;animation-direction:alternate-reverse;}
@keyframes aurora{to{transform:translate(9vmax,7vmax) scale(1.18);}}
.auth-card{position:relative;z-index:1;max-width:400px;border-radius:30px;padding:40px 34px 34px;box-shadow:var(--shadow-2),inset 0 1px 0 rgba(255,255,255,.8);animation:authIn 1.8s var(--out) both;}
@keyframes authIn{from{opacity:0;transform:translateY(30px) scale(.95);}to{opacity:1;transform:none;}}

@media(prefers-reduced-motion:reduce){.auth-overlay::before,.auth-overlay::after{animation:none!important;}.menu-indicator{transition:none!important;}}

body,.crm-layout{min-height:100dvh;}
body{text-rendering:optimizeLegibility;}

.modal-overlay{background:color-mix(in srgb,#140a06 42%,transparent);-webkit-backdrop-filter:blur(12px) saturate(1.2);backdrop-filter:blur(12px) saturate(1.2);animation:fadeIn 0.54s ease both;}
@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}
.modal-box{background:color-mix(in srgb,var(--surface) 97%,transparent);-webkit-backdrop-filter:none;backdrop-filter:none;}

.chat-page{border-radius:22px;border-color:var(--hair);box-shadow:var(--shadow-1);animation:none;}
.folder-card,.news-empty{background:var(--glass);border-color:var(--hair);box-shadow:var(--shadow-1);animation:none;}
.folder-card,.news-empty,.home-news-rotator,.home-widget-row,.purchase-total-box,.logo{border-radius:16px;}
@media(min-width:901px){.chat-page{height:calc(100dvh - 174px);}}

.sidebar{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;}
.sidebar::-webkit-scrollbar{display:none;}
@media(max-width:900px){.sidebar-profile-card{padding:8px 0;background:transparent;}}

@media(hover:none){
.requests-card:hover,.purchase-card:hover,.user-card:hover,.menu-item:hover:not(.active),.theme-btn:hover,.btn-secondary:hover,.btn-add:hover,.btn-submit:hover,.auth-submit:hover{transform:none;}}

:root{--spring:cubic-bezier(.3,1.2,.6,1);--out:cubic-bezier(.16,1,.3,1);}
.auth-card{animation-duration:1.6s;}
.modal-box,.notif-panel{animation-duration:.95s;}
.modal-overlay{animation-duration:.6s;}
.menu-indicator{transition-duration:.9s,.6s,.4s;}

@media(hover:hover){
.chart-card:hover,.online-card:hover,.requests-card:hover,.purchase-card:hover,.user-card:hover,.news-post:hover,.folder-card:hover{
background-image:radial-gradient(480px circle at var(--mx,50%) var(--my,50%),color-mix(in srgb,var(--brass-light) 26%,transparent),transparent 62%);}
.menu-item:hover:not(.active){background-image:radial-gradient(170px circle at var(--mx,50%) var(--my,50%),rgba(255,255,255,.17),transparent 70%);}
.requests-card:hover,.purchase-card:hover,.user-card:hover{transform:perspective(1100px) translateY(-4px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));}
.requests-card:hover:active,.purchase-card:hover:active,.user-card:hover:active{transform:perspective(1100px) scale(.985);}
}
.requests-card,.purchase-card,.user-card{transition:transform .55s var(--out),box-shadow .9s var(--out),border-color .6s;}

.skel{display:flex;flex-direction:column;gap:26px;}
.skel i{display:block;border-radius:16px;background:linear-gradient(100deg,color-mix(in srgb,var(--rule) 55%,transparent) 30%,color-mix(in srgb,#fff 75%,transparent) 50%,color-mix(in srgb,var(--rule) 55%,transparent) 70%);background-size:300% 100%;animation:shimmer 2.8s ease-in-out infinite;}
.skel-title{height:42px;width:min(380px,60%);}
.skel-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(260px,100%),1fr));gap:18px;}
.skel-grid i{height:160px;border-radius:22px;}
@keyframes shimmer{from{background-position:100% 0;}to{background-position:-100% 0;}}

.tab-pill,.tab-line{position:absolute;left:0;top:0;pointer-events:none;transition:transform .85s var(--spring),width .6s var(--out),height .6s var(--out),opacity .3s;}
.tab-pill{z-index:0;border-radius:999px;background:var(--brass);box-shadow:0 8px 18px -8px color-mix(in srgb,var(--brass) 80%,#000);}
.tab-line{height:2px;border-radius:2px;background:var(--brass);}
.requests-tab,.auth-tab{position:relative;z-index:1;}
.requests-tabs .requests-tab.active{background:transparent;border-color:transparent;}
.auth-tabs .auth-tab.active{border-bottom-color:transparent;}

.chat-message{animation:none;}
.chat-typing-indicator:not([hidden]){animation:typingPulse 2.4s ease-in-out infinite;}
@keyframes typingPulse{0%,100%{color:var(--brass);}50%{color:color-mix(in srgb,var(--brass) 40%,var(--ink));}}
@media(prefers-reduced-motion:reduce){.skel i,.chat-typing-indicator{animation:none!important;}}

:root{--sk-a:color-mix(in srgb,var(--rule) 75%,transparent);--sk-b:color-mix(in srgb,#fff 70%,transparent);}
.sk{display:block;border-radius:8px;background:linear-gradient(100deg,var(--sk-a) 30%,var(--sk-b) 50%,var(--sk-a) 70%);background-size:300% 100%;animation:shimmer 2.2s ease-in-out infinite;}
.sk-line{height:12px;}
.sk-w30{width:30%;}.sk-w40{width:40%;}.sk-w60{width:60%;}.sk-w70{width:70%;}.sk-w80{width:80%;}
.sk-pill{height:22px;width:84px;border-radius:999px;flex:none;}
.sk-avatar{width:24px;height:24px;border-radius:50%;flex:none;}
.sk-avatar-lg{width:44px;height:44px;}
.sk-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(280px,100%),1fr));gap:16px;margin-top:14px;}
.sk-card{display:flex;flex-direction:column;gap:12px;padding:18px;border:1px solid var(--rule);border-radius:18px;background:var(--surface);}
.sk-card-head,.sk-card-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.sk-card-foot{justify-content:flex-start;margin-top:6px;}
.sk-rows{display:flex;flex-direction:column;gap:14px;}
.sk-row{display:flex;align-items:center;gap:14px;}
.sk-row-text{flex:1;display:flex;flex-direction:column;gap:9px;}

.empty-state{display:flex;flex-direction:column;align-items:center;text-align:center;padding:56px 20px;gap:8px;grid-column:1 / -1;width:100%;box-sizing:border-box;}
.empty-state--compact{padding:40px 16px;}
.empty-state-art{position:relative;width:84px;height:84px;display:grid;place-items:center;margin-bottom:10px;border-radius:50%;background:color-mix(in srgb,var(--brass) 12%,transparent);color:var(--brass);}
.empty-state-art svg{width:36px;height:36px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;position:relative;}
.empty-state-ring{position:absolute;inset:-9px;border-radius:50%;border:1.5px dashed color-mix(in srgb,var(--brass) 38%,transparent);animation:emptySpin 24s linear infinite;}
@keyframes emptySpin{to{transform:rotate(360deg);}}
.empty-state h3{margin:0;font-size:18px;}
.empty-state p{margin:0;max-width:340px;font-size:14px;opacity:.65;}
.empty-state-btn{margin-top:14px;width:auto;}

.mode-picker{display:inline-flex;gap:4px;padding:4px;border-radius:999px;background:color-mix(in srgb,var(--ink) 7%,transparent);flex-wrap:wrap;}
.mode-btn{display:inline-flex;align-items:center;gap:8px;padding:9px 16px;border:0;border-radius:999px;background:transparent;color:var(--ink);font:inherit;font-size:13px;font-weight:500;cursor:pointer;transition:background .3s,color .3s,box-shadow .3s;}
.mode-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.mode-btn:hover:not(.active){background:color-mix(in srgb,var(--ink) 8%,transparent);}
.mode-btn.active{background:var(--brass);color:#fff;box-shadow:0 6px 16px -8px color-mix(in srgb,var(--brass) 80%,#000);}

body[data-mode="dark"]{
--parchment:#12141a;
--surface:#1c1f27;
--ink:#e9edf3;
--ink-dark:#dbe4ec;
--rule:rgba(255,255,255,.11);
--hair:rgba(255,255,255,.09);
--glass:color-mix(in srgb,#1c1f27 80%,transparent);
--shadow-1:0 1px 1px rgba(0,0,0,.35),0 10px 30px -14px rgba(0,0,0,.65);
--shadow-2:0 2px 4px rgba(0,0,0,.4),0 24px 50px -18px rgba(0,0,0,.8);
--sk-a:rgba(255,255,255,.05);
--sk-b:rgba(255,255,255,.12);
color-scheme:dark;
}
body[data-mode="dark"]{
background-image:radial-gradient(1100px 560px at 88% -8%,color-mix(in srgb,var(--brass) 14%,transparent),transparent 62%),radial-gradient(900px 520px at 6% 108%,color-mix(in srgb,var(--brass) 9%,transparent),transparent 60%);
}
body[data-mode="dark"] .chart-card,
body[data-mode="dark"] .online-card,
body[data-mode="dark"] .news-post,
body[data-mode="dark"] .requests-card,
body[data-mode="dark"] .purchase-card,
body[data-mode="dark"] .user-card,
body[data-mode="dark"] .employee,
body[data-mode="dark"] .modal-box,
body[data-mode="dark"] .auth-card,
body[data-mode="dark"] .notif-panel,
body[data-mode="dark"] .toast{box-shadow:var(--shadow-1),inset 0 1px 0 rgba(255,255,255,.05);}
body[data-mode="dark"] .menu-item:hover:not(.active){background-image:radial-gradient(170px circle at var(--mx,50%) var(--my,50%),rgba(255,255,255,.12),transparent 70%);}
body[data-mode="dark"] .skel i{background:linear-gradient(100deg,var(--sk-a) 30%,var(--sk-b) 50%,var(--sk-a) 70%);background-size:300% 100%;}
body[data-mode="dark"] .sidebar .logo{background:#f4f7fa;}

html{
-webkit-text-size-adjust:100%;
text-size-adjust:100%;
}

img,video{
max-width:100%;
}

.requests-mini-avatar{
flex-shrink:0;
}

@media (max-width:900px){
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):not([type="button"]):not([type="submit"]),
textarea,
select{
font-size:16px !important;
}
}

@media (max-width:480px){
.modal-box,
.requests-card,
.user-card,
.purchase-card,
.news-post,
.toast{
overflow-wrap:anywhere;
}

.modal-box{
max-width:calc(100vw - 24px);
}
}

:root{
  --spring:cubic-bezier(.34,1.32,.64,1);
  --spring-soft:cubic-bezier(.32,1.12,.5,1);
  --out:cubic-bezier(.16,1,.3,1);
}

.modal-overlay{animation:fadeIn .26s ease backwards;}
.modal-box{animation:modalSpring .5s var(--spring) backwards;}
.notif-panel{animation:modalSpring .42s var(--spring) backwards;}
.toast{animation-duration:.45s;}
.auth-card{animation-duration:1s;}
.menu-indicator{transition-duration:.5s,.4s,.3s;}
@keyframes modalSpring{
  from{opacity:0;transform:translateY(22px) scale(.96);}
  to{opacity:1;transform:none;}
}

@media(max-width:700px){
  .modal-box{animation:sheetUp .46s var(--spring-soft) backwards;}
  .modal-box::before{
    content:"";
    display:block;
    width:38px;
    height:4px;
    border-radius:4px;
    margin:-12px auto 12px;
    background:color-mix(in srgb,var(--ink) 22%,transparent);
  }
  .modal-header{touch-action:none;cursor:grab;}
  .modal-close{touch-action:manipulation;}
}
@keyframes sheetUp{
  from{transform:translateY(100%);}
  to{transform:none;}
}

.tab-pill,.tab-line{transition:transform .5s var(--spring),width .4s var(--out),height .4s var(--out),opacity .2s;}

.menu-icon-svg{transition:transform .5s var(--spring);}

.requests-card,.purchase-card,.user-card{transition:transform .4s var(--out),box-shadow .5s var(--out),border-color .3s;}

.theme-btn,.btn-secondary,.btn-submit,.auth-submit,.btn-add,.btn-delete,.tenant-action-btn,.requests-option-btn{
  transition:transform .38s var(--spring),box-shadow .3s,background .25s,filter .25s,border-color .25s,color .25s;
}
.btn-submit:active,.auth-submit:active,.btn-secondary:active,.btn-add:active,.btn-delete:active,.tenant-action-btn:active,.requests-option-btn:active{
  transform:scale(.97);
  transition-duration:.12s;
}

button.is-loading{pointer-events:none;}
button.is-loading::before{
  content:"";
  display:inline-block;
  width:.85em;
  height:.85em;
  margin-right:.55em;
  border:2px solid currentColor;
  border-right-color:transparent;
  border-radius:50%;
  vertical-align:-.12em;
  animation:btnSpin .7s linear infinite;
}
@keyframes btnSpin{to{transform:rotate(360deg);}}

@media(prefers-reduced-motion:reduce){
  .modal-overlay,.modal-box,.notif-panel,.toast{animation-duration:.01s;}
  .modal-box::before{display:none;}
  button.is-loading::before{animation-duration:2.4s;}
  .btn-submit:active,.auth-submit:active,.btn-secondary:active,.btn-add:active,.btn-delete:active,.tenant-action-btn:active,.requests-option-btn:active{transform:none;}
}


/* ============================================================
   КАБИНЕТ АРЕНДАТОРА v2
   ============================================================ */
.tenant-nav{display:none;}
body.crm-tenant.crm-authed .tenant-nav{display:flex;}

.tenant-nav{
  position:fixed;top:0;left:40px;height:74px;align-items:center;gap:6px;z-index:40;
}
.tenant-nav-btn{
  display:flex;align-items:center;gap:8px;padding:9px 16px;border-radius:999px;
  border:1px solid transparent;background:transparent;color:inherit;font:inherit;font-size:14px;font-weight:500;
  cursor:pointer;opacity:.72;transition:background .3s,opacity .3s,border-color .3s,transform .2s;
}
.tenant-nav-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none;}
.tenant-nav-btn:hover{opacity:1;background:color-mix(in srgb,var(--brass) 10%,transparent);}
.tenant-nav-btn:active{transform:scale(.97);}
.tenant-nav-btn.active{opacity:1;background:var(--brass);color:var(--surface);}

.tenant-dash{
  display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:20px;align-items:stretch;
}
.tenant-hero{grid-column:1 / -1;display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;
  background:linear-gradient(135deg,color-mix(in srgb,var(--brass) 14%,var(--surface)),var(--surface) 70%);}
.tenant-hero-main{display:flex;align-items:center;gap:18px;min-width:0;}
.tenant-hero-text{min-width:0;}
.tenant-hero-title{margin:0 0 6px;font-size:30px;font-weight:600;letter-spacing:-.02em;overflow-wrap:anywhere;}
.tenant-hero-sub{margin:0;display:flex;align-items:center;gap:10px;flex-wrap:wrap;opacity:.8;font-size:14px;}
.tenant-chip{padding:3px 11px;border-radius:999px;background:color-mix(in srgb,var(--brass) 16%,transparent);color:var(--brass);font-weight:600;font-size:13px;}
.tenant-hero-actions{display:flex;gap:10px;flex-wrap:wrap;}
.tenant-hero-actions .btn-submit{width:auto;margin:0;}

.tenant-avatar{
  width:64px;height:64px;flex:none;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center;
  background:var(--brass);color:var(--surface);font-size:24px;font-weight:600;
}
.tenant-avatar--lg{width:76px;height:76px;font-size:28px;}
.tenant-avatar img{width:100%;height:100%;object-fit:cover;display:block;}
.tenant-avatar.has-photo{background:var(--rule);}

.tenant-card{padding:22px;min-width:0;}
.tenant-card--pay{grid-column:span 5;}
.tenant-card--req{grid-column:span 7;}
.tenant-card--news{grid-column:1 / -1;}
.tenant-muted{opacity:.62;font-size:13px;margin:0;display:block;}

.tenant-pay-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px;}
.tenant-pay-label{font-size:15px;font-weight:600;}
.tenant-pay-badge{font-size:12px;font-weight:600;padding:4px 11px;border-radius:999px;color:#fff;white-space:nowrap;}
.tenant-pay-badge--ok{background:var(--status-progress);}
.tenant-pay-badge--soon{background:var(--status-waiting);}
.tenant-pay-badge--overdue{background:var(--status-closed);}
.tenant-pay-badge--unknown{background:var(--rule);color:var(--ink);}
.tenant-pay-big{font-size:40px;font-weight:700;letter-spacing:-.03em;line-height:1.1;}
.tenant-pay-caption{opacity:.65;font-size:14px;margin:4px 0 16px;}
.tenant-pay-bar{height:8px;border-radius:99px;background:var(--rule);overflow:hidden;}
.tenant-pay-bar-fill{display:block;height:100%;border-radius:99px;transition:width .9s var(--out,ease);}
.tenant-pay-bar-fill--ok{background:var(--status-progress);}
.tenant-pay-bar-fill--soon{background:var(--status-waiting);}
.tenant-pay-bar-fill--overdue{background:var(--status-closed);}
.tenant-pay-date{margin-top:14px;font-size:13px;opacity:.75;}

.tenant-news-row{justify-content:space-between;align-items:flex-start;}
.tenant-news-row .home-widget-row-body span{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}
.tenant-news-date{opacity:.55;white-space:nowrap;font-size:12px;padding-top:2px;}

.tenant-profile-layout{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:20px;}
.tenant-profile-layout .tenant-card--pay{grid-column:auto;}
.tenant-profile-name{display:block;font-size:20px;margin-bottom:2px;overflow-wrap:anywhere;}
.tenant-profile-footer{margin-top:18px;display:flex;gap:12px;flex-wrap:wrap;}

@media(max-width:1100px){
  .tenant-nav-btn{padding:8px 12px;}
}
@media(max-width:900px){
  .tenant-nav{
    top:auto;left:0;right:0;bottom:0;height:auto;justify-content:space-around;gap:0;
    padding:6px 8px calc(6px + env(safe-area-inset-bottom));
    background:color-mix(in srgb,var(--surface) 88%,transparent);
    -webkit-backdrop-filter:saturate(1.6) blur(20px);backdrop-filter:saturate(1.6) blur(20px);
    border-top:1px solid var(--rule);
  }
  .tenant-nav-btn{flex:1;flex-direction:column;gap:3px;padding:7px 4px;border-radius:14px;font-size:11px;}
  .tenant-nav-btn svg{width:22px;height:22px;}
  .tenant-nav-btn.active{background:color-mix(in srgb,var(--brass) 16%,transparent);color:var(--brass);}
  body.crm-tenant .crm-container{padding:96px 16px calc(96px + env(safe-area-inset-bottom));}
  .tenant-card--pay,.tenant-card--req,.tenant-card--news{grid-column:1 / -1;}
  .tenant-hero{padding:20px;}
  .tenant-hero-title{font-size:24px;}
  .tenant-hero-actions{width:100%;}
  .tenant-hero-actions .btn-submit,.tenant-hero-actions .btn-secondary{flex:1 1 100%;}
  .tenant-profile-layout{grid-template-columns:minmax(0,1fr);}
  body.crm-tenant .top-actions-bar{padding:0 16px;}
}
@media(max-width:900px){
  body.crm-tenant .theme-picker-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  body.crm-tenant .mode-picker{display:flex;flex-wrap:nowrap;}
  body.crm-tenant .mode-picker .mode-btn{flex:1;justify-content:center;padding-left:8px;padding-right:8px;}
}

/* ============================================================
   ПОДВАЛ: реквизиты организации (вход/регистрация и кабинеты)
   ============================================================ */
.site-footer{font-size:12.5px;line-height:1.55;color:var(--ink);}
.site-footer-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(160px,100%),1fr));gap:20px 24px;}
.site-footer-col{display:flex;flex-direction:column;gap:2px;min-width:0;overflow-wrap:anywhere;}
.site-footer-label{font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;opacity:.55;margin-bottom:4px;}
.site-footer address{font-style:normal;}
.site-footer a{color:inherit;text-decoration:none;border-bottom:1px solid transparent;width:fit-content;transition:color .3s,border-color .3s;}
.site-footer a:hover{color:var(--brass);border-bottom-color:currentColor;}
.site-footer-muted{opacity:.6;}
.site-footer-copy{margin-top:20px;padding-top:14px;border-top:1px solid var(--hair,var(--rule));opacity:.65;font-size:12px;text-align:center;}

/* Окна входа и регистрации */
.auth-scroll{position:relative;z-index:1;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;display:flex;flex-direction:column;align-items:center;}
.auth-scroll .auth-card{margin:auto;flex:none;}
.site-footer--auth{flex:none;width:100%;max-width:1100px;margin-top:28px;padding:0 4px 8px;text-align:center;}
.site-footer--auth .site-footer-col{align-items:center;}
.site-footer--auth .site-footer-copy{margin-top:16px;}

/* Личные кабинеты (сотрудник и арендатор) */
.site-footer--cabinet{display:none;}
body.crm-authed{display:flex;flex-direction:column;}
body.crm-authed .crm-layout{min-height:0;flex:1 0 auto;}
body.crm-authed .site-footer--cabinet{display:block;flex:none;margin-left:240px;padding:28px 40px 32px;border-top:1px solid var(--hair,var(--rule));}
@media(max-width:900px){
  body.crm-authed .site-footer--cabinet{margin-left:80px;padding:24px 20px 28px;}
}
body.crm-tenant.crm-authed .site-footer--cabinet{margin-left:0;}
@media(max-width:900px){
  body.crm-tenant.crm-authed .site-footer--cabinet{padding:24px 16px calc(88px + env(safe-area-inset-bottom));}
}

/* Срок выполнения внутренней заявки */
.requests-card-deadline{font-size:12px;opacity:.7;margin:0 0 8px;}
