/* ============================================================================
   DigiBorj — uiux-polish.css
   UI/UX "pro-max" polish layer · 2026-11-07
   Loaded LAST (after app.css / theme.css / app-mobile-typography.css).
   Purely presentational overrides — no structural/layout rewrite.
   Fully reversible: remove the <link> from index.php to disable.
   ----------------------------------------------------------------------------
   1.  Foundations (focus, selection, tap highlight, scrollbar)
   2.  Header / topbar
   3.  Hero slider
   4.  Quick-access tiles
   5.  Announcement card
   6.  Amenity showcase cards
   7.  Section titles
   8.  Service cards
   9.  Bottom navigation
   10. Buttons
   11. Empty states / modals / login / forms
   ============================================================================ */

/* ===== 1. Foundations ====================================================== */
html{
  -webkit-tap-highlight-color:rgba(14,124,83,.08);
}
::selection{
  background:rgba(14,124,83,.18);
  color:var(--ink,#14212a);
}
:focus-visible{
  outline:3px solid rgba(14,124,83,.45);
  outline-offset:2px;
  border-radius:6px;
}
.app-shell svg{
  -webkit-user-drag:none;
  user-select:none;
}
/* crisper layered shadow for the app shell on desktop */
html[data-device="desktop"] .app-shell{
  box-shadow:0 0 0 1px rgba(16,36,48,.04),0 24px 70px rgba(16,36,48,.14);
}
/* give the content canvas a whisper of tint so white cards pop */
.app-main{
  background:linear-gradient(180deg,#fdfefe 0%,#f7f9fb 140px,#f6f8fa 100%);
}

/* ===== 2. Header / topbar ================================================== */
.topbar{
  background:
    radial-gradient(120% 190% at 88% -20%,rgba(58,137,221,.22) 0%,transparent 46%),
    radial-gradient(130% 200% at 0% 130%,rgba(14,124,83,.18) 0%,transparent 50%),
    linear-gradient(135deg,#153a61 0%,#102f4c 52%,#0d2740 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.09),
    0 15px 36px rgba(16,47,76,.16);
}
.topbar .icon-button{
  transition:transform var(--t-fast,120ms) var(--ease-out,cubic-bezier(.22,.61,.36,1)),
             background var(--t-fast,120ms) ease,
             box-shadow var(--t-base,200ms) ease;
}
.topbar .icon-button:hover{
  transform:translateY(-1px);
  box-shadow:0 6px 16px rgba(6,20,32,.22);
}
.topbar .icon-button:active{
  transform:translateY(0) scale(.94);
}
.bell-button:hover{
  background:rgba(255,255,255,.17);
}
.badge{
  box-shadow:0 2px 6px rgba(216,23,9,.35);
}
.resident-identity strong{
  letter-spacing:.1px;
}
.resident-identity small{
  color:#b9c9d8;
}

/* ===== 3. Hero slider ====================================================== */
.overview-home-slide{
  border-radius:26px;
  background:
    radial-gradient(110% 150% at 85% 0%,rgba(58,137,221,.28) 0%,transparent 45%),
    radial-gradient(120% 170% at 0% 100%,rgba(14,124,83,.30) 0%,transparent 48%),
    radial-gradient(60% 90% at 50% 120%,rgba(255,255,255,.07) 0%,transparent 60%),
    linear-gradient(135deg,#123459 0%,#102f4c 55%,#0b2237 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    0 18px 40px -14px rgba(11,34,55,.45);
  overflow:hidden;
}
.overview-home-slide h2,
.overview-home-slide h3,
.overview-home-slide h1{
  text-wrap:balance;
}
.home-slide-cta{
  background:linear-gradient(135deg,#119764 0%,var(--dbj-green,#0e7c53) 55%,#0a6243 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    0 10px 24px -6px rgba(14,124,83,.55);
  transition:transform var(--t-fast,120ms) var(--ease-out,cubic-bezier(.22,.61,.36,1)),
             box-shadow var(--t-base,200ms) ease,
             filter var(--t-base,200ms) ease;
}
.overview-home-slide:hover .home-slide-cta,
.home-slide-cta:hover{
  transform:translateY(-2px);
  filter:brightness(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    0 14px 30px -6px rgba(14,124,83,.6);
}
.home-slide-cta:active{
  transform:translateY(0) scale(.96);
}

/* ===== 4. Quick-access tiles =============================================== */
.overview-tile{
  background:#fff;
  border:1px solid var(--line,#e8ecef);
  border-radius:20px;
  box-shadow:0 2px 10px -4px rgba(16,36,48,.08);
  transition:
    transform var(--t-fast,120ms) var(--ease-out,cubic-bezier(.22,.61,.36,1)),
    box-shadow var(--t-base,200ms) ease,
    border-color var(--t-base,200ms) ease;
}
.overview-tile:hover{
  transform:translateY(-3px);
  border-color:rgba(14,124,83,.30);
  box-shadow:0 12px 26px -10px rgba(16,36,48,.22);
}
.overview-tile:active{
  transform:translateY(-1px) scale(.96);
  box-shadow:0 4px 12px -6px rgba(16,36,48,.2);
}
.overview-tile>span{
  transition:transform var(--t-base,200ms) var(--ease-spring,cubic-bezier(.18,.89,.32,1.16)),
             box-shadow var(--t-base,200ms) ease;
}
.overview-tile:hover>span{
  transform:scale(1.07);
  box-shadow:0 6px 14px -6px rgba(16,36,48,.28);
}
/* per-tile accent tints (cycles every 6) */
.overview-tile:nth-child(6n+1)>span{background:#e8f1fd;color:#2f6fbe}
.overview-tile:nth-child(6n+2)>span{background:#e7f6ef;color:#0e7c53}
.overview-tile:nth-child(6n+3)>span{background:#fdf3df;color:#a86f00}
.overview-tile:nth-child(6n+4)>span{background:#f1ecfd;color:#6f52c9}
.overview-tile:nth-child(6n+5)>span{background:#fdecef;color:#c0395c}
.overview-tile:nth-child(6n+6)>span{background:#e2f5f4;color:#0d8a80}
.overview-tile strong{
  font-weight:800;
  color:var(--ink,#14212a);
}

/* ===== 5. Announcement card ================================================ */
.overview-announcement{
  background:linear-gradient(135deg,#fffdf6 0%,#fdf6e3 100%);
  border:1px solid #f1e2bd;
  border-radius:20px;
  box-shadow:0 4px 16px -8px rgba(168,111,0,.18);
}
.overview-announcement>span:first-child,
.overview-announcement .overview-bell{
  background:#fdf3df;
  color:#a86f00;
}

/* ===== 6. Amenity showcase cards =========================================== */
.home-amenity-card{
  border:1px solid var(--line,#e8ecef);
  border-radius:22px;
  box-shadow:0 3px 14px -8px rgba(16,36,48,.12);
  transition:
    transform var(--t-fast,120ms) var(--ease-out,cubic-bezier(.22,.61,.36,1)),
    box-shadow var(--t-base,200ms) ease,
    border-color var(--t-base,200ms) ease;
}
.home-amenity-card:hover{
  transform:translateY(-3px);
  border-color:rgba(14,124,83,.32);
  box-shadow:0 14px 30px -12px rgba(16,36,48,.24);
}
.home-amenity-card:active{
  transform:translateY(-1px) scale(.97);
}
.home-amenity-image{
  background:
    radial-gradient(90% 90% at 20% 10%,rgba(58,137,221,.16) 0%,transparent 55%),
    radial-gradient(90% 90% at 85% 95%,rgba(14,124,83,.18) 0%,transparent 55%),
    linear-gradient(160deg,#eef6f1 0%,#e8f0f9 100%);
}
.home-amenity-image>svg{
  background:#fff;
  border-radius:50%;
  padding:10px;
  box-shadow:0 8px 18px -8px rgba(16,36,48,.28);
}
.home-amenity-copy strong{
  font-weight:800;
}
.home-amenity-card>i{
  background:var(--sec-soft,#e7f6ef);
  color:var(--sec,#0e7c53);
  border-radius:999px;
  font-style:normal;
  font-weight:700;
  transition:background var(--t-base,200ms) ease,color var(--t-base,200ms) ease,
             transform var(--t-fast,120ms) ease;
}
.home-amenity-card:hover>i{
  background:var(--sec,#0e7c53);
  color:#fff;
  transform:translateX(-2px);
}

/* ===== 7. Section titles =================================================== */
.section-title h2{
  position:relative;
  padding-inline-start:13px;
  text-wrap:balance;
}
.section-title h2::before{
  content:"";
  position:absolute;
  inset-inline-start:0;
  top:50%;
  transform:translateY(-50%);
  width:5px;
  height:.95em;
  border-radius:999px;
  background:linear-gradient(180deg,#119764,var(--dbj-green,#0e7c53));
}
.section-title>button,
.section-title [data-section]{
  transition:color var(--t-base,200ms) ease;
}
.section-title>button:hover,
.section-title [data-section]:hover{
  color:var(--sec,#0e7c53);
}

/* ===== 8. Service cards ==================================================== */
.service-card{
  background:#fff;
  border:1px solid var(--line,#e8ecef);
  border-radius:20px;
  box-shadow:0 3px 14px -8px rgba(16,36,48,.12);
  transition:
    transform var(--t-fast,120ms) var(--ease-out,cubic-bezier(.22,.61,.36,1)),
    box-shadow var(--t-base,200ms) ease,
    border-color var(--t-base,200ms) ease;
}
.service-card:hover{
  transform:translateY(-3px);
  border-color:rgba(14,124,83,.32);
  box-shadow:0 16px 32px -12px rgba(16,36,48,.26);
}
.service-card:active{
  transform:translateY(-1px) scale(.98);
}
.service-card .service-image{
  overflow:hidden;
  border-radius:16px;
}
.service-card .service-image img{
  object-fit:cover;
  transition:transform var(--t-slow,320ms) var(--ease-out,cubic-bezier(.22,.61,.36,1));
}
.service-card:hover .service-image img{
  transform:scale(1.05);
}
/* varied soft tints for placeholder icon tiles — hue kept light/desaturated
   so the section-identity icon colour (--sec) always reads clearly */
.service-card:nth-child(4n+1) .service-image:not(:has(img)){background:linear-gradient(150deg,#eaf1fd 0%,#e3ecfb 100%);color:var(--sec,#1e40af)}
.service-card:nth-child(4n+2) .service-image:not(:has(img)){background:linear-gradient(150deg,#ecf7f2 0%,#e1f1e9 100%);color:var(--sec,#1e40af)}
.service-card:nth-child(4n+3) .service-image:not(:has(img)){background:linear-gradient(150deg,#f0eefb 0%,#e8e4f8 100%);color:var(--sec,#1e40af)}
.service-card:nth-child(4n+4) .service-image:not(:has(img)){background:linear-gradient(150deg,#fdf3ec 0%,#fae9dd 100%);color:var(--sec,#1e40af)}
.service-card h3{
  font-weight:800;
  color:var(--ink,#14212a);
}
.service-card:hover h3{
  color:var(--sec,#0e7c53);
}

/* ===== 9. Bottom navigation ================================================ */
.bottom-nav{
  background:rgba(255,255,255,.9);
  -webkit-backdrop-filter:blur(16px) saturate(1.5);
  backdrop-filter:blur(16px) saturate(1.5);
  border-top:1px solid rgba(16,36,48,.08);
  box-shadow:0 -8px 30px -12px rgba(16,36,48,.16);
}
.bottom-nav .nav-side{
  border-radius:16px;
  transition:background var(--t-fast,120ms) ease,color var(--t-fast,120ms) ease,
             transform var(--t-fast,120ms) var(--ease-out,cubic-bezier(.22,.61,.36,1));
}
.bottom-nav .nav-side:active{
  transform:scale(.93);
}
.bottom-nav .nav-side.active{
  color:var(--sec,#0e7c53);
}
.bottom-nav .nav-side.active svg{
  transform:translateY(-1px) scale(1.08);
  filter:drop-shadow(0 3px 6px rgba(14,124,83,.35));
}
.bottom-nav .nav-side svg{
  transition:transform var(--t-base,200ms) var(--ease-spring,cubic-bezier(.18,.89,.32,1.16));
}

/* ===== 10. Buttons ========================================================= */
.primary-button{
  background:linear-gradient(135deg,#119764 0%,var(--dbj-green,#0e7c53) 60%,#0a6243 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.2),
    0 8px 20px -6px rgba(14,124,83,.5);
  transition:transform var(--t-fast,120ms) var(--ease-out,cubic-bezier(.22,.61,.36,1)),
             box-shadow var(--t-base,200ms) ease,filter var(--t-base,200ms) ease;
}
.primary-button:hover{
  transform:translateY(-1px);
  filter:brightness(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.2),
    0 12px 26px -6px rgba(14,124,83,.55);
}
.primary-button:active{
  transform:translateY(0) scale(.97);
}
.secondary-button{
  border:1px solid var(--line,#e8ecef);
  transition:border-color var(--t-base,200ms) ease,color var(--t-base,200ms) ease,
             background var(--t-base,200ms) ease,transform var(--t-fast,120ms) ease;
}
.secondary-button:hover{
  border-color:rgba(14,124,83,.4);
  color:var(--sec,#0e7c53);
  background:var(--sec-soft,#e7f6ef);
}
.secondary-button:active{
  transform:scale(.97);
}

/* ===== 11. Empty states / modals / login / forms =========================== */
.empty-state{
  color:var(--muted,#5f6b73);
}
.empty-state svg,
.empty-state>span:first-child{
  transition:transform var(--t-base,200ms) var(--ease-spring,cubic-bezier(.18,.89,.32,1.16));
}
.empty-state:hover svg,
.empty-state:hover>span:first-child{
  transform:translateY(-2px) scale(1.04);
}
.modal-card{
  border-radius:24px;
  box-shadow:0 30px 80px -20px rgba(16,36,48,.4),0 0 0 1px rgba(16,36,48,.05);
}
.modal-close{
  transition:background var(--t-fast,120ms) ease,transform var(--t-fast,120ms) ease;
}
.modal-close:hover{
  background:#f1f4f6;
}
.modal-close:active{
  transform:scale(.9);
}
.login-method-tab{
  transition:background var(--t-base,200ms) ease,color var(--t-base,200ms) ease,
             border-color var(--t-base,200ms) ease;
}
.login-method-tab.active{
  background:var(--sec-soft,#e7f6ef);
  color:var(--sec,#0e7c53);
  border-color:transparent;
  box-shadow:inset 0 0 0 1px rgba(14,124,83,.25);
}
.app-shell input,
.app-shell select,
.app-shell textarea{
  transition:border-color var(--t-base,200ms) ease,box-shadow var(--t-base,200ms) ease;
}
.app-shell input:focus,
.app-shell select:focus,
.app-shell textarea:focus{
  border-color:var(--dbj-green,#0e7c53);
  box-shadow:0 0 0 4px rgba(14,124,83,.14);
}

/* ===== Motion safety ======================================================= */
@media (prefers-reduced-motion:reduce){
  .overview-tile,.home-amenity-card,.service-card,
  .primary-button,.secondary-button,.home-slide-cta,
  .bottom-nav .nav-side,.bottom-nav .nav-side svg,
  .topbar .icon-button,.service-card .service-image img{
    transition:none!important;
  }
  .service-card:hover .service-image img{
    transform:none!important;
  }
}
