.login-page{min-height:100vh;max-width:980px;margin:0 auto;padding:34px 18px 22px;display:flex;flex-direction:column;justify-content:center;gap:18px}.login-layout{display:grid;grid-template-columns:300px minmax(360px,520px);gap:22px;align-items:stretch;justify-content:center}.info-side{display:grid;gap:14px}.left-side{grid-column:1;grid-row:1}.right-side{grid-column:1;grid-row:1;align-self:end}.login-card{grid-column:2;grid-row:1}.left-side,.right-side{height:calc(50% - 7px)}.login-card{max-width:520px;width:100%;margin:0 auto;padding:20px 24px}.login-logo{display:block;width:min(300px,82%);margin:0 auto 4px}.auth-form{display:grid;gap:12px;margin-bottom:14px}.auth-form label span,.request-form label span{display:block;color:var(--muted);font-size:14px;margin:0 0 8px 4px}.dispatcher-box{display:none;margin-top:14px;padding:16px;border-radius:22px;background:rgba(0,0,0,.20);border:1px solid rgba(139,225,50,.16)}.dispatcher-box.active{display:block}.dispatcher-title{color:#dff8b7;margin-bottom:8px;font-weight:800}.dispatcher-phone{padding:6px 0;color:var(--muted)}.info-row{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.info-tile{text-align:left;padding:18px;cursor:pointer;color:var(--text);min-height:0;height:100%;transition:.22s ease;display:flex;flex-direction:column;justify-content:center}.info-tile:hover{transform:translateY(-2px);border-color:rgba(139,225,50,.25)}.info-tile span{display:none}.info-tile b{display:block;font-size:20px;margin-bottom:8px}.info-tile small{color:var(--muted);line-height:1.5}.login-footer{text-align:center;color:var(--muted2);font-size:14px;margin-top:4px}.welcome{padding:26px;display:flex;justify-content:space-between;gap:18px;align-items:stretch;margin-bottom:18px;background:linear-gradient(135deg,rgba(101,189,7,.20),rgba(255,255,255,.06))}.welcome h1{font-size:clamp(32px,4vw,54px);line-height:1.04;margin:8px 0 0}.welcome p{color:var(--muted);line-height:1.65}.account-box{min-width:260px;padding:18px;border-radius:26px;background:rgba(0,0,0,.22);border:1px solid var(--line)}.account-box .small{color:var(--muted2);font-size:14px}.account-box .big{font-size:26px;font-weight:900;margin-top:6px}.top-space{margin-top:16px}.contacts-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding:14px;margin-bottom:18px}.contact-pill{padding:15px;border-radius:22px;background:rgba(0,0,0,.18);border:1px solid rgba(255,255,255,.06)}.contact-pill span{display:block;color:var(--muted2);font-size:13px;margin-bottom:8px}.contact-pill b{font-size:18px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.request-form{display:grid;gap:14px}.upload-box{display:flex;align-items:center;justify-content:center;border:1px dashed rgba(255,255,255,.18);background:rgba(0,0,0,.16);border-radius:24px;padding:24px;cursor:pointer;color:var(--muted)}.upload-box input{display:none}.side-column{display:grid;gap:18px}.news-item,.ticket-mini,.admin-ticket,.resident-result{padding:16px;border-radius:22px;background:rgba(0,0,0,.20);border:1px solid rgba(255,255,255,.06)}.news-item{margin-bottom:12px}.news-cap{font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:var(--muted2);margin-bottom:8px}.news-item h3{margin:0 0 8px}.news-item p{margin:0;color:var(--muted);line-height:1.55}.ticket-mini{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:10px}.ticket-mini small,.resident-result small,.admin-ticket small{display:block;color:var(--muted2);margin-top:6px}.status{display:inline-flex;padding:7px 11px;border-radius:999px;background:rgba(139,225,50,.14);color:#dff8b7;font-size:12px;white-space:nowrap}.admin-hero{padding:26px;display:flex;justify-content:space-between;gap:18px;margin-bottom:18px;background:linear-gradient(135deg,rgba(101,189,7,.18),rgba(255,255,255,.05))}.admin-hero h1{font-size:clamp(32px,4vw,54px);line-height:1.04;margin:8px 0 0}.admin-hero p{color:var(--muted);line-height:1.65}.kpi-row{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;min-width:360px}.kpi-row div{padding:16px;border-radius:22px;background:rgba(0,0,0,.20);border:1px solid var(--line)}.kpi-row span{display:block;color:var(--muted2);font-size:13px}.kpi-row b{display:block;font-size:30px;margin-top:8px}.search-row{display:flex;gap:12px}.search-results{display:grid;gap:10px;margin-top:14px}.resident-result{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.admin-ticket{margin-bottom:12px}.ticket-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.admin-ticket p{color:var(--muted);line-height:1.55}.status-form{display:grid;grid-template-columns:1fr auto;gap:10px;margin-top:12px}.media-link{display:inline-flex;margin-top:8px;color:#dff8b7}@media(max-width:880px){.login-layout{display:flex;flex-direction:column}.login-card{order:1}.left-side{order:2}.right-side{order:3}.left-side,.right-side{height:auto}.info-side{grid-template-columns:1fr}.info-row,.contacts-strip,.form-grid,.kpi-row{grid-template-columns:1fr}.welcome,.admin-hero{flex-direction:column}.account-box,.kpi-row{min-width:0}.search-row,.status-form{grid-template-columns:1fr;display:grid}}


@media(max-width:880px){
  .info-side{
    width:100%;
  }
  .info-tile{
    width:100%;
  }
}
\n
.contact-actions{display:grid;gap:12px;margin-top:16px}
.contact-call{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:16px 18px;border-radius:22px;background:rgba(0,0,0,.22);border:1px solid rgba(255,255,255,.08);transition:.22s ease}
.contact-call:hover{transform:translateY(-1px);border-color:rgba(139,225,50,.25)}
.contact-call span{color:var(--muted2);font-size:14px}
.contact-call b{color:var(--text);font-size:18px}
.contact-hint{color:var(--muted2);font-size:14px;margin-top:14px}
@media(max-width:600px){.contact-call{align-items:flex-start;flex-direction:column}.contact-call b{font-size:20px}}


@media(min-width: 900px){

  /* Сужаем центральное окно */
  .login-layout{
    grid-template-columns:260px minmax(320px,420px);
  }

  /* Уменьшаем заголовок */
  .section-head h1{
    font-size:clamp(26px,2.5vw,36px);
  }

  /* Компактные поля */
  .auth-form .input{
    padding:14px 16px;
  }

  /* Компактная кнопка */
  .auth-form .btn{
    padding:12px 16px;
  }

}







/* ===== RESIDENT PAGE / CLEAN HEADER ===== */

.resident-header{
  max-width:1404px !important;
  width:calc(100% - 36px) !important;
  margin:18px auto !important;
  padding:18px 26px !important;
  min-height:138px;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:24px !important;
}

.resident-header-main{
  display:flex;
  align-items:center;
  gap:34px;
  min-width:0;
}

.resident-header .header-logo{
  width:260px !important;
  height:auto !important;
  max-height:116px !important;
  object-fit:contain !important;
  display:block !important;
  flex:0 0 auto;
}

.resident-header .header-contacts{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:center !important;
  gap:9px !important;
  width:auto !important;
  flex:0 0 auto !important;
}

.resident-header .contact-call{
  width:252px !important;
  min-width:0 !important;
  padding:10px 14px !important;
  border-radius:22px;
}

.resident-header .contact-call span{
  font-size:12px !important;
  line-height:1.2;
}

.resident-header .contact-call b{
  font-size:16px !important;
  line-height:1.2;
}

.resident-logout{
  flex:0 0 auto;
  margin:0 !important;
}

.resident-welcome{
  display:flex;
  align-items:stretch;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.welcome-text{min-width:0}

.welcome-title{
  font-size:clamp(26px,3vw,40px);
  line-height:1.05;
  margin:8px 0 0;
}

.welcome-name{
  font-size:clamp(20px,2vw,28px);
  font-weight:800;
  margin-top:10px;
}

.welcome-address{
  font-size:18px;
  color:var(--muted);
  margin-top:8px;
  line-height:1.45;
}

.account-group{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  min-width:540px;
}

.account-group .account-box{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.action-grid{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:14px;
  margin-bottom:18px;
}

.action-card{
  padding:20px 18px;
  text-align:left;
  cursor:pointer;
  color:var(--text);
  min-height:112px;
  transition:.22s ease;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.action-card:hover{
  transform:translateY(-2px);
  border-color:rgba(139,225,50,.25);
}

.action-card b{
  font-size:19px;
  margin-bottom:8px;
}

.action-card span{
  color:var(--muted);
  font-size:14px;
  line-height:1.4;
}

.resident-content-grid{
  display:grid;
  grid-template-columns:1.35fr .65fr;
  gap:18px;
}

.resident-content-grid .ticket-mini{
  align-items:flex-start;
}

@media(max-width:1100px){
  .resident-header{
    max-width:none !important;
    width:calc(100% - 24px) !important;
    min-height:auto;
    flex-wrap:wrap;
  }

  .resident-header-main{
    flex:1 1 auto;
  }

  .resident-header .header-logo{
    width:220px !important;
    max-height:100px !important;
  }

  .resident-welcome{
    flex-direction:column;
  }

  .account-group{
    min-width:0;
  }

  .action-grid{
    grid-template-columns:repeat(3,1fr);
  }

  .resident-content-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:760px){
  .resident-header{
    margin:12px auto !important;
    padding:14px !important;
    flex-direction:column;
    align-items:stretch !important;
  }

  .resident-header-main{
    flex-direction:column;
    align-items:flex-start;
    gap:14px;
  }

  .resident-header .header-logo{
    width:190px !important;
    max-height:none !important;
  }

  .resident-header .header-contacts{
    width:100% !important;
  }

  .resident-header .contact-call{
    width:100% !important;
  }

  .resident-logout{
    width:100%;
  }

  .account-group{
    grid-template-columns:1fr;
  }

  .action-grid{
    grid-template-columns:1fr;
  }

  .action-card{
    min-height:92px;
  }

  .welcome-title{font-size:28px}
  .welcome-name{font-size:22px}
  .welcome-address{font-size:16px}
}


/* ===== RESIDENT HEADER ONE ROW FINAL ===== */

@media(min-width:1101px){
  .resident-header{
    min-height:150px !important;
    display:grid !important;
    grid-template-columns:300px 1fr auto !important;
    align-items:center !important;
    gap:28px !important;
    padding:18px 28px !important;
  }

  .resident-header-main{
    display:contents !important;
  }

  .resident-header .header-logo{
    width:285px !important;
    max-height:128px !important;
    height:auto !important;
    object-fit:contain !important;
    justify-self:start !important;
  }

  .resident-header .header-contacts{
    display:grid !important;
    grid-template-columns:repeat(3, minmax(210px, 1fr)) !important;
    gap:12px !important;
    align-items:center !important;
    justify-content:center !important;
    width:100% !important;
  }

  .resident-header .contact-call{
    width:100% !important;
    min-width:0 !important;
    height:64px !important;
    padding:12px 16px !important;
    display:flex !important;
    justify-content:space-between !important;
    align-items:center !important;
  }

  .resident-header .contact-call span{
    font-size:12px !important;
    max-width:86px !important;
  }

  .resident-header .contact-call b{
    font-size:15px !important;
    line-height:1.25 !important;
    text-align:right !important;
  }

  .resident-logout{
    justify-self:end !important;
    white-space:nowrap !important;
  }
}


/* ===== ADMIN MVP REBUILD ===== */

.admin-header{
  max-width:1404px !important;
  width:calc(100% - 36px) !important;
  margin:18px auto !important;
  padding:18px 28px !important;
  min-height:150px;
  display:grid !important;
  grid-template-columns:300px 1fr auto !important;
  gap:28px !important;
  align-items:center !important;
}

.admin-brand{
  display:flex;
  align-items:center;
  gap:16px;
}

.admin-brand img{
  width:120px;
  height:auto;
}

.admin-brand b{
  display:block;
  font-size:22px;
  margin-top:6px;
}

.admin-kpi-inline{
  display:grid;
  grid-template-columns:repeat(3, minmax(170px, 1fr));
  gap:14px;
  align-items:center;
}

.admin-kpi-inline div{
  height:74px;
  padding:14px 18px;
  border-radius:24px;
  background:rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.08);
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.admin-kpi-inline span{
  color:var(--muted2);
  font-size:13px;
}

.admin-kpi-inline b{
  margin-top:6px;
  font-size:28px;
}

.admin-actions-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  margin-bottom:18px;
}

.admin-main-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}

.empty-search{
  padding:16px;
  border-radius:22px;
  background:rgba(0,0,0,.16);
  border:1px solid rgba(255,255,255,.06);
}

.resident-result-button{
  width:100%;
  color:var(--text);
  cursor:pointer;
  text-align:left;
}

.resident-result-button:hover,
.clickable-ticket:hover{
  transform:translateY(-1px);
  border-color:rgba(139,225,50,.25);
}

.clickable-ticket{
  cursor:pointer;
  transition:.22s ease;
}

.fake-media-box{
  padding:24px;
  border-radius:24px;
  border:1px dashed rgba(255,255,255,.18);
  color:var(--muted);
  background:rgba(0,0,0,.18);
}

@media(max-width:1100px){
  .admin-header{
    width:calc(100% - 24px) !important;
    grid-template-columns:1fr !important;
  }

  .admin-kpi-inline{
    grid-template-columns:repeat(3,1fr);
  }

  .admin-actions-grid{
    grid-template-columns:repeat(2,1fr);
  }

  .admin-main-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:760px){
  .admin-header{
    margin:12px auto !important;
    padding:14px !important;
  }

  .admin-brand{
    align-items:flex-start;
  }

  .admin-brand img{
    width:96px;
  }

  .admin-kpi-inline,
  .admin-actions-grid{
    grid-template-columns:1fr;
  }
}


/* ===== ADD RESIDENT CARD ===== */

.add-resident-card{
  width:100%;
  margin-top:14px;
  padding:18px;
  text-align:left;
  color:var(--text);
  cursor:pointer;
  min-height:96px;
  transition:.22s ease;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.add-resident-card:hover{
  transform:translateY(-2px);
  border-color:rgba(139,225,50,.25);
}

.add-resident-card b{
  font-size:19px;
  margin-bottom:8px;
}

.add-resident-card span{
  color:var(--muted);
  font-size:14px;
}


/* ===== FIX SELECT DROPDOWN ===== */

select.input{
  background:#1f1f1f;
  color:#fff;
}

select.input option{
  background:#1f1f1f;
  color:#fff;
}


/* ===== NEWS HEADER ===== */

.news-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

.small-btn{
  padding:8px 14px;
  font-size:13px;
}


/* ===== TOAST ===== */

.toast{
  position:fixed;
  bottom:30px;
  right:30px;
  background:#1f1f1f;
  color:#fff;
  padding:14px 18px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.1);
  opacity:0;
  transform:translateY(20px);
  transition:.3s;
  z-index:999;
}

.toast.show{
  opacity:1;
  transform:translateY(0);
}


/* ===== RESIDENT REQUESTED VISUAL PATCH ===== */

.resident-header{
  min-height:172px !important;
}

.resident-header .header-logo{
  width:320px !important;
  max-height:148px !important;
}

.resident-header .header-contacts{
  justify-items:center !important;
}

.resident-header .contact-call{
  text-decoration:none;
}

.resident-header .contact-call b{
  white-space:nowrap;
}

.welcome-title{
  font-size:clamp(28px,3.1vw,42px) !important;
}

.welcome-name{
  font-size:clamp(18px,1.7vw,24px) !important;
}

.resident-content-grid{
  grid-template-columns:1fr 1fr !important;
}

@media(max-width:1100px){
  .resident-header .header-logo{
    width:260px !important;
    max-height:126px !important;
  }

  .resident-content-grid{
    grid-template-columns:1fr !important;
  }
}

@media(max-width:760px){
  .resident-header{
    min-height:auto !important;
  }

  .resident-header .header-logo{
    width:220px !important;
  }

  .resident-header .header-contacts{
    display:grid !important;
    grid-template-columns:1fr !important;
  }
}


/* ===== RESIDENT REQUESTED VISUAL PATCH ===== */

.resident-header{
  min-height:172px !important;
}

.resident-header .header-logo{
  width:320px !important;
  max-height:148px !important;
}

.resident-header .header-contacts{
  justify-items:center !important;
}

.resident-header .contact-call{
  text-decoration:none;
}

.resident-header .contact-call b{
  white-space:nowrap;
}

.welcome-title{
  font-size:clamp(28px,3.1vw,42px) !important;
}

.welcome-name{
  font-size:clamp(18px,1.7vw,24px) !important;
}

.resident-content-grid{
  grid-template-columns:1fr 1fr !important;
}

@media(max-width:1100px){
  .resident-header .header-logo{
    width:260px !important;
    max-height:126px !important;
  }

  .resident-content-grid{
    grid-template-columns:1fr !important;
  }
}

@media(max-width:760px){
  .resident-header{
    min-height:auto !important;
  }

  .resident-header .header-logo{
    width:220px !important;
  }

  .resident-header .header-contacts{
    display:grid !important;
    grid-template-columns:1fr !important;
  }
}


/* ===== TICKETS FUNCTIONAL PATCH ===== */

.ticket-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.btn-small{
  padding:8px 12px !important;
  font-size:13px !important;
  min-height:auto !important;
}

.ticket-files{
  display:grid;
  gap:10px;
}

.file-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-radius:16px;
  background:rgba(255,255,255,.62);
  border:1px solid rgba(30,58,45,.12);
  color:var(--text);
  text-decoration:none;
  font-weight:700;
}

.file-link:hover{
  transform:translateY(-1px);
}

@media(max-width:760px){
  .ticket-actions{
    width:100%;
    justify-content:flex-start;
  }
}


/* ===== TICKET IMAGE PREVIEWS ===== */

.ticket-mini-main{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.ticket-thumb,
.admin-ticket-thumb{
  display:block;
  flex:0 0 auto;
  border-radius:16px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
}

.ticket-thumb{
  width:70px;
  height:58px;
}

.admin-ticket-thumb{
  width:100%;
  height:150px;
  margin:10px 0 4px;
}

.ticket-thumb img,
.admin-ticket-thumb img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}

.ticket-file-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:58px;
  height:40px;
  padding:0 12px;
  border-radius:14px;
  background:rgba(139,225,50,.14);
  color:#dff8b7;
  text-decoration:none;
  font-weight:900;
  border:1px solid rgba(139,225,50,.18);
}

.upload-preview-box{
  position:relative;
  min-height:170px;
  overflow:hidden;
  flex-direction:column;
  gap:10px;
}

.upload-preview{
  display:none;
  width:100%;
  max-height:230px;
  object-fit:cover;
  border-radius:18px;
}

.upload-file-name{
  display:none;
  color:var(--muted);
  font-weight:700;
  text-align:center;
  word-break:break-word;
}

.upload-preview-box.has-preview{
  padding:12px;
  border-style:solid;
}

.upload-preview-box.has-preview .upload-placeholder{
  display:none;
}

.upload-preview-box.has-preview .upload-preview,
.upload-preview-box.has-preview .upload-file-name,
.upload-preview-box.has-file .upload-file-name{
  display:block;
}

.file-preview-link{
  display:grid;
  gap:8px;
  padding:10px;
  border-radius:18px;
  background:rgba(255,255,255,.62);
  border:1px solid rgba(30,58,45,.12);
  color:var(--text);
  text-decoration:none;
  font-weight:800;
}

.file-preview-link img{
  width:100%;
  max-height:320px;
  object-fit:cover;
  border-radius:14px;
}

.file-preview-link span{
  font-size:13px;
  word-break:break-word;
}

@media(max-width:760px){
  .ticket-mini-main{
    width:100%;
    justify-content:space-between;
  }

  .admin-ticket-thumb{
    height:120px;
  }
}


/* ===== MULTI FILE COMPACT PREVIEWS ===== */

.upload-picker{
  display:grid;
  gap:12px;
}

.upload-picker input{
  display:none;
}

.upload-add{
  min-height:110px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  border:1px dashed rgba(255,255,255,.18);
  background:rgba(0,0,0,.16);
  border-radius:24px;
  padding:18px;
  cursor:pointer;
  color:var(--muted);
  text-align:center;
}

.upload-add span{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:rgba(139,225,50,.14);
  color:#dff8b7;
  font-size:28px;
  font-weight:900;
}

.upload-add b{
  color:var(--text);
}

.upload-add small{
  color:var(--muted2);
}

.upload-preview-list{
  display:none;
  grid-template-columns:repeat(auto-fill,minmax(86px,1fr));
  gap:10px;
}

.upload-preview-list.active{
  display:grid;
}

.upload-preview-item{
  position:relative;
  min-height:96px;
  border-radius:18px;
  overflow:hidden;
  background:rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.08);
}

.upload-preview-item img,
.upload-file-preview{
  width:100%;
  height:72px;
  object-fit:cover;
  display:grid;
  place-items:center;
}

.upload-file-preview{
  color:#dff8b7;
  font-weight:900;
  background:rgba(139,225,50,.14);
}

.upload-preview-item small{
  display:block;
  padding:6px 8px;
  font-size:11px;
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.upload-remove{
  position:absolute;
  top:6px;
  right:6px;
  width:24px;
  height:24px;
  border:0;
  border-radius:50%;
  background:rgba(0,0,0,.65);
  color:white;
  cursor:pointer;
  font-size:18px;
  line-height:1;
}

.ticket-thumb-row,
.admin-ticket-thumbs{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.ticket-thumb{
  width:46px !important;
  height:42px !important;
  border-radius:12px !important;
}

.admin-ticket-thumbs{
  margin:10px 0 4px;
}

.admin-ticket-thumb{
  width:58px !important;
  height:52px !important;
  margin:0 !important;
  border-radius:12px !important;
}

.ticket-file-chip.mini{
  min-width:46px;
  height:42px;
  padding:0 9px;
  font-size:12px;
}

.ticket-more{
  min-width:34px;
  height:34px;
  display:inline-grid;
  place-items:center;
  border-radius:50%;
  background:rgba(255,255,255,.10);
  color:var(--muted);
  font-size:12px;
  font-weight:900;
}

.file-preview-link.compact{
  grid-template-columns:86px 1fr;
  align-items:center;
}

.file-preview-link.compact img{
  width:86px;
  height:70px;
  max-height:70px;
}

@media(max-width:760px){
  .upload-preview-list{
    grid-template-columns:repeat(auto-fill,minmax(76px,1fr));
  }

  .file-preview-link.compact{
    grid-template-columns:1fr;
  }

  .file-preview-link.compact img{
    width:100%;
    height:120px;
    max-height:120px;
  }
}


/* ===== ADMIN IMAGE VIEWER ===== */

.image-viewer-window{
  width:min(94vw,980px) !important;
  max-height:92vh;
  padding:16px !important;
}

.image-viewer-img{
  display:block;
  width:100%;
  max-height:82vh;
  object-fit:contain;
  border-radius:20px;
}


/* ===== FINAL REQUEST MODAL AND IMAGE VIEWER FIX ===== */

.modal[data-modal="request"] .modal-window{
  max-height:94vh !important;
}

.modal[data-modal="request"] .modal-scroll{
  max-height:74vh !important;
}

.upload-add span{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:44px !important;
  height:44px !important;
  border-radius:14px !important;
  line-height:1 !important;
  padding:0 !important;
  font-size:26px !important;
}

.image-viewer-modal{
  z-index:5000 !important;
  background:rgba(0,0,0,.78) !important;
}

.image-viewer-window{
  width:min(96vw,1080px) !important;
  max-height:94vh !important;
  padding:14px !important;
}

.image-viewer-img{
  display:block;
  width:100%;
  max-height:86vh;
  object-fit:contain;
  border-radius:20px;
}

.image-viewer-modal .modal-close{
  z-index:2;
}


/* ===== SIMPLE ADMIN PHOTO VIEWER ===== */

.simple-photo-viewer{
  position:fixed;
  inset:0;
  z-index:99999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(0,0,0,.84);
}

.simple-photo-viewer.active{
  display:flex;
}

.simple-photo-img{
  display:block;
  max-width:96vw;
  max-height:90vh;
  object-fit:contain;
  border-radius:20px;
  box-shadow:0 24px 80px rgba(0,0,0,.45);
}

.simple-photo-close{
  position:fixed;
  right:24px;
  top:24px;
  z-index:100000;
  width:48px;
  height:48px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.12);
  color:white;
  font-size:34px;
  line-height:1;
  cursor:pointer;
}

body.photo-viewer-open{
  overflow:hidden;
}


/* ===== NEWS FEED FUNCTIONAL PATCH ===== */

.clickable-news,
.clickable-admin-news{
  cursor:pointer;
}

.clickable-news:hover,
.clickable-admin-news:hover{
  transform:translateY(-1px);
}

.news-options,
.admin-news-actions,
.reaction-row,
.poll-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.option-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:16px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  cursor:pointer;
  color:var(--text);
  font-weight:800;
}

.option-pill input{
  accent-color:#83dd43;
}

.reaction-btn{
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.08);
  color:var(--text);
  border-radius:16px;
  padding:10px 14px;
  cursor:pointer;
  font-weight:900;
}

.poll-box{
  padding:14px;
  border-radius:18px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
}

.danger{
  color:#ffd1d1 !important;
  border-color:rgba(255,120,120,.28) !important;
}

.news-history-list{
  display:grid;
  gap:12px;
}


/* ===== NEWS COSMETIC FIXES ===== */

.modal[data-modal="publishNews"] .settings-form,
.modal[data-modal="newsHistory"] .modal-scroll,
.modal[data-modal="adminNewsDetails"] .modal-scroll,
.modal[data-modal="residentNewsDetails"] .modal-scroll{
  display:grid;
  gap:16px;
}

.modal[data-modal="publishNews"] .input,
.modal[data-modal="publishNews"] .textarea{
  margin-bottom:0 !important;
}

.news-options{
  margin-top:2px;
  margin-bottom:4px;
}

.search-row{
  margin-bottom:14px;
}

.news-history-list{
  margin-top:2px;
}

.admin-news-actions{
  margin-top:12px;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,.10);
}

.poll-box{
  margin-top:2px;
}

.reaction-row,
.poll-actions{
  margin-top:8px;
}

.option-pill{
  min-height:44px;
}


/* ===== PUSH NOTIFICATIONS ===== */

.push-form{
  display:grid;
  gap:16px;
}

.push-users-box{
  display:grid;
  gap:12px;
  padding:14px;
  border-radius:22px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
}

.push-user-list{
  max-height:260px;
  overflow:auto;
  display:grid;
  gap:8px;
  padding-right:4px;
}

.push-user-item{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px 12px;
  border-radius:16px;
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.08);
  cursor:pointer;
}

.push-user-item input{
  margin-top:4px;
  accent-color:#83dd43;
}

.push-user-item span{
  display:grid;
  gap:3px;
}

.push-user-item small{
  color:var(--muted);
}

.push-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.resident-push-overlay{
  position:fixed;
  inset:0;
  z-index:8000;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(0,0,0,.48);
}

.resident-push-overlay.active{
  display:flex;
}

.resident-push-card{
  position:relative;
  width:min(92vw,520px);
  padding:26px;
  border-radius:28px;
}

.resident-push-card h2{
  margin:10px 0;
}

.resident-push-card p{
  color:var(--text);
  font-size:16px;
  line-height:1.55;
}

.resident-push-card small{
  color:var(--muted);
}


/* ===== RESIDENT EDIT CARD ===== */

.password-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  align-items:center;
}

.password-row .input{
  margin:0 !important;
}

@media(max-width:760px){
  .password-row{
    grid-template-columns:1fr;
  }
}


/* ===== PWA INSTALL PREVIEW CARD ===== */

.install-app-card{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:18px;
  margin-bottom:18px;
  padding:18px 20px;
  border-radius:28px;
  background:
    radial-gradient(circle at 10% 20%, rgba(139,225,50,.20), transparent 34%),
    linear-gradient(135deg, rgba(101,189,7,.18), rgba(255,255,255,.055));
  border:1px solid rgba(139,225,50,.18);
  box-shadow:0 18px 44px rgba(0,0,0,.18);
}

.install-app-icon{
  width:64px;
  height:64px;
  border-radius:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:34px;
  background:rgba(0,0,0,.24);
  border:1px solid rgba(255,255,255,.09);
}

.install-app-text h2{
  margin:4px 0 6px;
  font-size:clamp(20px,2vw,28px);
  line-height:1.15;
}

.install-app-text p{
  margin:0;
  color:var(--muted);
  line-height:1.45;
}

.install-app-btn{
  white-space:nowrap;
  min-width:220px;
}

.admin-install-app-card{
  margin-top:-4px;
}

@media(max-width:760px){
  .install-app-card{
    grid-template-columns:1fr;
    padding:18px;
  }

  .install-app-btn{
    width:100%;
    min-width:0;
  }
}


.ios-install-modal{
  position:fixed;
  inset:0;
  z-index:9999;
  padding:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.72);
  backdrop-filter:blur(10px);
}

.ios-install-box{
  position:relative;
  width:min(960px,96vw);
  max-height:92vh;
  overflow:auto;
  padding:22px;
  border-radius:28px;
  background:#071f19;
  border:1px solid rgba(224,190,107,.35);
  box-shadow:0 30px 90px rgba(0,0,0,.5);
}

.ios-install-box h2{
  margin:0 0 8px;
  color:#fff;
}

.ios-install-box p{
  margin:0 0 18px;
  color:var(--muted);
}

.ios-install-box img{
  width:100%;
  border-radius:22px;
  display:block;
}

.ios-install-close{
  position:absolute;
  top:14px;
  right:16px;
  width:42px;
  height:42px;
  border-radius:50%;
  border:0;
  font-size:28px;
  cursor:pointer;
}
