* { box-sizing: border-box; }

:root {
  --font-ui: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
             'Segoe UI', Roboto, Arial, sans-serif;

  /* brand */
  --tb-navy: #0F1530;
  --tb-blue: #3B82F6;
  --tb-border: rgba(255,255,255,0.10);
  --tb-link: rgba(255,255,255,0.88);
  --tb-link-muted: rgba(255,255,255,0.74);
  --tb-hover-bg: rgba(59,130,246,0.14);
  --tb-active-bg: rgba(59,130,246,0.22);
  --tb-active-border: rgba(59,130,246,0.95);
}

html, body { height: 100%; }
body {
  background: #f5f7fa;
  margin:0;
  font-family: var(--font-ui);
}

body.auth-body {
  height: 100vh;     /* fallback */
  height: 100dvh;
  overflow: hidden;
}

.app-shell {
  height: 100vh;     /* fallback */
  height: 100dvh;
  overflow: hidden;
  min-height: 0;
}

/* ✅ BRAND NAVY SIDEBAR + dorade linkova */
.sidebar {
  width: 260px;
  background: var(--tb-navy);
  color: #fff;

  /* ✅ FIX SIDEBAR SHRINK (desktop) */
  flex: 0 0 260px;
  min-width: 260px;
  max-width: 260px;

  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sidebar a { color: var(--tb-link); text-decoration: none; }
.sidebar a:hover { color: #fff; }

/* ✅ FIX: nav-link da se NIKAD ne reže (wrap-safe) */
.sidebar .nav-link{
  border-radius: 12px;
  padding: 10px 12px;
  transition: background 0.12s ease, transform 0.12s ease, color 0.12s ease;

  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.2;
  white-space: normal;
  min-height: 44px;
}
.sidebar .nav-link:hover{
  background: var(--tb-hover-bg);
  color: #fff;
}
.sidebar .nav-link.active{
  background: var(--tb-active-bg);
  border-radius: 12px;
  position: relative;
  color: #fff;
}
.sidebar .nav-link.active::before{
  content:"";
  position:absolute;
  left: 6px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: var(--tb-active-border);
}

/* icon u sidebaru: fiksna širina + ne skuplja se u flexu */
.nav-link i {
  width: 18px;
  flex: 0 0 18px;
  display: inline-block;
  margin-right: 0;
  margin-top: 1px;
}

/* ✅ bitno za flex: da se tekst ne "čudno" reže na mobitelu */
.sidebar .nav-link span{
  flex: 1 1 auto;
  min-width: 0;
}

.topbar { background: #fff; border-bottom: 1px solid #e5e7eb; }
.card { border: 1px solid #e5e7eb; border-radius: 14px; }
.table { background:#fff; }
.badge-status { font-weight: 600; }

/* =========================================================
   ✅ KLJUČNI FIX: sidebar NE scrolla; scrolla samo NAV dio
   ========================================================= */
#sidebar{
  height: 100%;
  min-height: 0;

  /* više ne scrolla cijeli sidebar (da footer ne upada u meni) */
  overflow: hidden;
}
.sidebar-nav{
  flex: 1 1 auto;
        /*
   * Safari/Chromium flex overflow edge-case:
   * bez eksplicitne visine child ponekad ne ulazi u scroll state.
   */
  height: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;

  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;

  /* ✅ FIX: NIKAD ne dopuštaj “stupce”/wrap u sidebar navu */
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap !important;
  align-content: flex-start;

  /* ✅ Scrollbar (taman, ne iskače) */
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: rgba(255,255,255,0.18) rgba(15,21,48,0.0);
}
/* ✅ dodatni safety: svaki link zauzima cijelu širinu */
.sidebar-nav > .nav-link{
  width: 100%;
}

/* Chromium (Chrome/Edge/Android) + Safari */
.sidebar-nav::-webkit-scrollbar{
  width: 10px;
}
.sidebar-nav::-webkit-scrollbar-track{
  background: rgba(15,21,48,0.0);
}
.sidebar-nav::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.16);
  border-radius: 999px;
  border: 3px solid rgba(15,21,48,0.85);
}
.sidebar-nav::-webkit-scrollbar-thumb:hover{
  background: rgba(255,255,255,0.24);
}

.sidebar-footer{
  flex: 0 0 auto;
}

main.flex-grow-1{
  display:flex;
  flex-direction:column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.page-content{
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  background: transparent;
}

/* ✅ BITNO: bez height:100% (rezalo chat) */
.page-content > .container-fluid{
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.container-fluid{ min-height: 0; }

.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1000;
}

@media (max-width: 991.98px) {
  .sidebar-toggle { display: inline-flex; }

  #sidebar {
    position: fixed;
    top: 0;
    left: 0;

    /* ✅ bolja širina na mobitelu (izbjegava "ikone + prvo slovo") */
    width: 86vw;
    max-width: 280px;

    height: 100vh;
    height: 100dvh;

    transform: translateX(-110%);
    transition: transform 0.22s ease;
    z-index: 1001;
    box-shadow: 0 10px 30px rgba(0,0,0,0.22);
  }
  #sidebar.open { transform: translateX(0); }
  .sidebar-overlay.show { display: block; }
}

/* ✅ BRAND: sidebar logo (u boji) */
.sidebar-logo {
  display: flex;              /* ⬅ centriraj */
  align-items: center;
  justify-content: center;    /* ⬅ centriraj */
  text-decoration: none;
  width: 100%;
}
.sidebar-logo img{
  height: 42px;               /* ⬅ veći logo */
  width: auto;
  display: block;
  filter: drop-shadow(0 1px 10px rgba(0,0,0,0.35));
}

/* ✅ Divider ispod loga */
.sidebar-divider{
  height: 1px;
  background: var(--tb-border);
  margin: 12px 0 10px;
}

/* ✅ BRAND: login logo (koristi login.html) */
.login-logo {
  display: flex;
  justify-content: center;
}
.login-logo img {
  width: 320px;
  max-width: 90%;
  height: auto;
  display: block;
}

.sidebar .opacity-75 { opacity: .78 !important; }

.sidebar .badge.text-bg-warning{
  border: 1px solid rgba(255,255,255,0.22);
}

/* Professional floating quick chat */
.telechat-widget{
  --telechat-bottom: 18px;
  --telechat-lift: 0px;
  position: fixed;
  right: 18px;
  bottom: calc(var(--telechat-bottom) + var(--telechat-lift));
  z-index: 1400;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:10px;
}
.telechat-widget.is-dragging{
  user-select:none;
}
.telechat-widget.is-dragging .telechat-launcher{
  cursor:grabbing;
}
.telechat-widget.position-custom{
  top:auto;
}
.telechat-widget.align-left{
  align-items:flex-start;
}
.telechat-launcher{
  width:62px;
  height:62px;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.24);
  background:linear-gradient(135deg,#0f1530,#2563eb);
  color:#fff;
  box-shadow:0 18px 36px rgba(2,6,23,.32);
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  transition:transform .18s ease, box-shadow .18s ease;
  cursor:grab;
  touch-action:none;
}
.telechat-launcher:active{ cursor:grabbing; }
.telechat-launcher:hover{ transform:translateY(-2px); box-shadow:0 22px 42px rgba(2,6,23,.38); }
.telechat-launcher.has-unread:before{
  content:""; position:absolute; inset:-6px; border-radius:26px; border:2px solid rgba(220,53,69,.45); animation:telechatPulse 1.7s infinite;
}
@keyframes telechatPulse{ 0%{transform:scale(.94);opacity:.85;} 100%{transform:scale(1.18);opacity:0;} }
.telechat-unread-badge{
  width:22px;
  height:22px;
  min-width:22px;
  min-height:22px;
  padding:0;
  font-size:11px;
  line-height:1;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.telechat-launcher .telechat-unread-badge{
  position:absolute;
  top:-8px;
  right:-8px;
}
.telechat-box{
  width:min(410px, calc(100vw - 20px));
  height:min(640px, var(--telechat-box-height, calc(100dvh - 105px)));
  background:rgba(255,255,255,.98);
  border:1px solid rgba(15,23,42,.12);
  border-radius:24px;
  box-shadow:0 24px 56px rgba(2,6,23,.25);
  overflow:hidden;
  display:none;
  flex-direction:column;
}
.telechat-box.open{ display:flex; }
.telechat-head{
  display:flex; align-items:flex-start; justify-content:space-between; gap:10px; padding:14px;
  background:linear-gradient(135deg,#f8fbff,#eef4ff); border-bottom:1px solid rgba(15,23,42,.10); flex:0 0 auto;
}
.telechat-head .fw-semibold{ font-weight:900!important; color:#0f172a; }
.telechat-head-actions{ display:flex; align-items:center; gap:6px; }
.telechat-lift-controls{ display:flex; align-items:center; gap:4px; }
.telechat-lift-btn{ width:30px; height:30px; border:1px solid rgba(15,23,42,.12); border-radius:11px; background:#fff; color:#1e293b; display:inline-flex; align-items:center; justify-content:center; }
.telechat-lift-btn:hover{ background:#f8fafc; }
.telechat-body{ flex:1 1 auto; min-height:0; display:flex; flex-direction:column; background:#fff; }
.telechat-picker{ border-bottom:1px solid rgba(15,23,42,.08); background:#fff; }
.telechat-picker-summary{ list-style:none; cursor:pointer; padding:11px 14px; font-weight:850; font-size:13px; display:flex; align-items:center; justify-content:space-between; gap:10px; color:#0f172a; }
.telechat-picker-summary::-webkit-details-marker{ display:none; }
.telechat-picker-summary i{ transition:transform .18s ease; }
.telechat-picker[open] .telechat-picker-summary i{ transform:rotate(180deg); }
.telechat-search-wrap{ padding:10px 12px; border-top:1px solid rgba(15,23,42,.06); }
.telechat-search{ width:100%; border:1px solid rgba(15,23,42,.12); border-radius:15px; padding:9px 11px; outline:none; }
.telechat-people{ max-height:220px; overflow:auto; padding:8px; }
.telechat-person{ border:none; background:transparent; width:100%; text-align:left; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px; border-radius:16px; color:#0f172a; }
.telechat-person:hover{ background:#f8fafc; }
.telechat-person.active{ background:rgba(37,99,235,.10); }
.telechat-person-main{ display:flex; align-items:center; gap:9px; min-width:0; }
.telechat-mini-avatar{ width:34px; height:34px; border-radius:13px; background:linear-gradient(135deg,#0f1530,#2563eb); color:#fff; font-weight:900; display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; position:relative; }
.telechat-mini-avatar img{ width:100%; height:100%; object-fit:cover; border-radius:inherit; display:block; }
.telechat-mini-avatar i{ font-size:16px; line-height:1; }
.telechat-presence-dot{ position:absolute; right:-1px; bottom:-1px; width:10px; height:10px; border-radius:999px; border:2px solid #fff; background:#94a3b8; }
.telechat-presence-dot.online{ background:#22c55e; }
.telechat-presence-dot.dnd{ background:#f59e0b; }
.telechat-store{ font-size:11px; color:rgba(15,23,42,.62); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; }
.telechat-presence{ font-size:10px; font-weight:900; border-radius:999px; padding:3px 7px; background:#e2e8f0; color:#334155; flex:0 0 auto; }
.telechat-presence.online{ background:#dcfce7; color:#166534; }
.telechat-presence.dnd{ background:#fef3c7; color:#92400e; }
.telechat-unread{ min-width:22px; height:22px; border-radius:999px; background:#dc3545; color:#fff; font-size:12px; font-weight:900; display:inline-flex; align-items:center; justify-content:center; padding:0 7px; }
.telechat-chat{ flex:1 1 auto; min-height:0; display:flex; flex-direction:column; }
.telechat-messages{ flex:1 1 auto; min-height:0; overflow:auto; padding:12px; background:radial-gradient(circle at top left,rgba(37,99,235,.07),transparent 35%),#f8fafc; }
.telechat-msg{ margin-bottom:9px; display:flex; align-items:flex-end; gap:7px; }
.telechat-msg-avatar{ width:26px; height:26px; border-radius:10px; font-size:12px; box-shadow:none; }
.telechat-msg .bubble{ max-width:82%; padding:9px 11px; border-radius:16px; border:1px solid rgba(15,23,42,.10); background:#fff; font-size:13px; box-shadow:0 8px 18px rgba(2,6,23,.06); overflow-wrap:anywhere; }
.telechat-msg.me{ justify-content:flex-end; }
.telechat-msg.me .bubble{ background:#dbeafe; border-color:#bfdbfe; }
.telechat-msg-meta{ color:#64748b; font-size:10px; margin-top:4px; }
.telechat-compose{ padding:10px; border-top:1px solid rgba(15,23,42,.08); display:flex; gap:8px; background:#fff; align-items:center; }
.telechat-compose input{ flex:1; min-width:0; border:1px solid rgba(15,23,42,.12); border-radius:15px; padding:10px 11px; }
.telechat-send{ min-height:38px; border:none; border-radius:999px; padding:0 14px; display:inline-flex; align-items:center; justify-content:center; gap:7px; font-weight:900; font-size:13px; background:linear-gradient(135deg,#2563eb,#1d4ed8); color:#fff; box-shadow:0 10px 20px rgba(37,99,235,.22); white-space:nowrap; }
.telechat-send:hover:not(:disabled){ background:linear-gradient(135deg,#1d4ed8,#1e40af); transform:translateY(-1px); }
.telechat-send:disabled{ opacity:.55; cursor:not-allowed; box-shadow:none; }
.telechat-toast{ position:fixed; right:18px; bottom:92px; width:min(340px, calc(100vw - 36px)); background:#fff; border:1px solid rgba(15,23,42,.12); border-radius:18px; box-shadow:0 20px 45px rgba(2,6,23,.25); padding:12px; z-index:1450; cursor:pointer; display:none; }
.telechat-toast.show{ display:block; animation:telechatToast .18s ease; }
@keyframes telechatToast{ from{ transform:translateY(8px); opacity:0;} to{ transform:translateY(0); opacity:1;} }
@media (max-width:991.98px){
  .telechat-widget{ --telechat-bottom:10px; right:10px; }
  .telechat-box{ width:calc(100vw - 20px); height:min(76dvh,640px); border-radius:22px; }
}
}
  


.tb-toast-stack{z-index:1085;}
.tb-toast{min-width:320px;border:none;border-radius:14px;box-shadow:0 10px 30px rgba(26,77,184,.22);overflow:hidden;}
.tb-toast .toast-header{background:linear-gradient(135deg,#1d4ed8,#7c3aed);color:#fff;border-bottom:none;}
.tb-toast .toast-header .btn-close{filter:invert(1) grayscale(1) brightness(200%);}
.tb-toast .toast-body{background:#f4f8ff;color:#183153;font-weight:500;}

/* Polished page headers and in-page module shortcuts */
.page-hero{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
  padding:18px;
  border:1px solid #e5e7eb;
  border-radius:20px;
  background:
    radial-gradient(circle at top left, rgba(59,130,246,.14), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow:0 12px 32px rgba(15,23,42,.07);
}
.page-hero h2{ letter-spacing:-.02em; }
.page-hero__eyebrow{
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin-bottom:4px;
  color:#2563eb;
  font-size:.78rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.page-hero__meta{ color:#64748b; }
.page-hero__actions{
  display:flex;
  flex-wrap:wrap;
  align-items:end;
  justify-content:flex-end;
  gap:10px;
}
.module-switcher{
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-height:44px;
  padding:10px 14px;
  border:1px solid rgba(37,99,235,.24);
  border-radius:14px;
  background:#fff;
  color:#1d4ed8;
  font-weight:800;
  text-decoration:none;
  box-shadow:0 8px 18px rgba(37,99,235,.10);
  transition:transform .14s ease, box-shadow .14s ease, background .14s ease, color .14s ease;
}
.module-switcher:hover{
  transform:translateY(-1px);
  background:#eff6ff;
  color:#1e40af;
  box-shadow:0 14px 28px rgba(37,99,235,.16);
}
.module-switcher--primary{
  border-color:rgba(37,99,235,.48);
  background:linear-gradient(135deg, #2563eb, #4f46e5);
  color:#fff;
}
.module-switcher--primary:hover{
  background:linear-gradient(135deg, #1d4ed8, #4338ca);
  color:#fff;
}
.module-switcher--success{
  border-color:rgba(22,163,74,.34);
  color:#15803d;
  box-shadow:0 8px 18px rgba(22,163,74,.10);
}
.module-switcher--success:hover{
  background:#f0fdf4;
  color:#166534;
  box-shadow:0 14px 28px rgba(22,163,74,.16);
}
.filter-panel{
  border:1px solid #e5e7eb;
  border-radius:18px;
  background:#fff;
  box-shadow:0 10px 26px rgba(15,23,42,.06);
}
.kpi-card{
  border:1px solid #e5e7eb;
  border-radius:18px;
  background:linear-gradient(180deg,#fff,#f8fafc);
  box-shadow:0 10px 24px rgba(15,23,42,.06);
}
@media (max-width: 767.98px){
  .page-hero{ padding:15px; }
  .page-hero__actions{ width:100%; justify-content:flex-start; }
  .module-switcher{ width:100%; justify-content:center; }
}

/* =========================================================
   Telebodovi 2026 visual renovation (all authenticated pages,
   except HelpAI): one shared button/card/table/form language.
   ========================================================= */
body.app-polish{
  --tb-app-bg: #eef4fb;
  --tb-surface: rgba(255,255,255,.92);
  --tb-surface-solid: #ffffff;
  --tb-surface-soft: #f8fafc;
  --tb-text: #0f172a;
  --tb-muted: #64748b;
  --tb-line: rgba(15,23,42,.095);
  --tb-line-strong: rgba(37,99,235,.18);
  --tb-shadow-sm: 0 8px 20px rgba(15,23,42,.055);
  --tb-shadow: 0 16px 40px rgba(15,23,42,.085);
  --tb-shadow-blue: 0 14px 32px rgba(37,99,235,.20);
  --tb-radius-sm: 12px;
  --tb-radius: 18px;
  --tb-radius-lg: 24px;
  --bs-body-color: var(--tb-text);
  background:
    radial-gradient(circle at calc(100% - 140px) 80px, rgba(59,130,246,.18), transparent 30%),
    radial-gradient(circle at 45% 100%, rgba(124,58,237,.10), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, var(--tb-app-bg) 48%, #f7f9fc 100%);
  color: var(--tb-text);
}

body.app-polish .topbar{
  min-height: 58px;
  border-bottom: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 22px rgba(15,23,42,.045);
}

body.app-polish .page-content{
  background:
    linear-gradient(135deg, rgba(255,255,255,.48), rgba(239,246,255,.28)),
    transparent;
}

body.app-polish .page-content > .container-fluid{
  gap: 0;
}

body.app-polish :is(h1,h2,h3,h4,h5,h6){
  color: var(--tb-text);
  letter-spacing: -.025em;
}

body.app-polish .text-muted{ color: var(--tb-muted) !important; }

body.app-polish .page-hero{
  border: 1px solid rgba(255,255,255,.75);
  border-radius: var(--tb-radius-lg);
  background:
    radial-gradient(circle at 6% 0%, rgba(37,99,235,.18), transparent 30%),
    radial-gradient(circle at 92% 8%, rgba(79,70,229,.14), transparent 27%),
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,252,.88));
  box-shadow: var(--tb-shadow);
}

body.app-polish .page-hero h1,
body.app-polish .page-hero h2{
  margin-bottom: .15rem;
  font-weight: 850;
}

body.app-polish .page-hero__eyebrow{
  color: #2563eb;
  letter-spacing: .11em;
}

body.app-polish .tb-hero{
  background:
    radial-gradient(circle at 6% 0%, rgba(37,99,235,.18), transparent 30%),
    radial-gradient(circle at 92% 8%, rgba(79,70,229,.14), transparent 27%),
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,252,.88));
  border: 1px solid rgba(255,255,255,.78);
  color: var(--tb-text);
  box-shadow: var(--tb-shadow);
}
body.app-polish .tb-hero .text-white-50{ color: var(--tb-muted) !important; }

/* Cards and panels */
body.app-polish .page-content :is(.card,.filter-panel,.kpi-card,.dropdown-menu),
body.app-polish .modal-content{
  border: 1px solid rgba(255,255,255,.72);
  border-radius: var(--tb-radius);
  background: var(--tb-surface);
  box-shadow: var(--tb-shadow-sm);
}

body.app-polish .page-content .card,
body.app-polish .page-content .filter-panel,
body.app-polish .page-content .kpi-card{
  position: relative;
  overflow: visible;
  flex-shrink: 0;
  min-height: max-content;
}

body.app-polish .page-content .card-header,
body.app-polish .page-content .card-footer,
body.app-polish .modal-header,
body.app-polish .modal-footer{
  border-color: var(--tb-line);
  background: rgba(248,250,252,.76);
}

body.app-polish .page-content .card:hover,
body.app-polish .page-content .kpi-card:hover,
body.app-polish .page-content .filter-panel:hover{
  box-shadow: var(--tb-shadow);
}

body.app-polish .page-content .card > .table-responsive:first-child:last-child{
  border: 0;
  border-radius: inherit;
  box-shadow: none;
}

body.app-polish .page-content .card .list-group,
body.app-polish .page-content .card .list-group-item{
  background: transparent;
}

/* Uniform buttons */
body.app-polish .page-content .btn:not(.btn-close),
body.app-polish .modal .btn:not(.btn-close){
  --bs-btn-border-radius: 14px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border-width: 1px;
  border-radius: 14px;
  font-weight: 750;
  letter-spacing: -.01em;
  box-shadow: 0 8px 18px rgba(15,23,42,.07);
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease, color .14s ease, border-color .14s ease;
}

body.app-polish .page-content .btn-sm,
body.app-polish .modal .btn-sm{
  min-height: 34px;
  border-radius: 12px;
  font-size: .82rem;
}

body.app-polish .page-content .btn-lg,
body.app-polish .modal .btn-lg{
  min-height: 48px;
  border-radius: 16px;
}

body.app-polish .page-content .btn:not(.btn-close):hover,
body.app-polish .modal .btn:not(.btn-close):hover{
  transform: translateY(-1px);
  box-shadow: 0 13px 26px rgba(15,23,42,.11);
}

body.app-polish .page-content .btn:not(.btn-close):active,
body.app-polish .modal .btn:not(.btn-close):active{
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(15,23,42,.08);
}

body.app-polish .page-content :is(.btn-primary,.btn-dark),
body.app-polish .modal :is(.btn-primary,.btn-dark),
body.app-polish .page-content .module-switcher--primary{
  border-color: rgba(37,99,235,.42);
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: var(--tb-shadow-blue);
}

body.app-polish .page-content :is(.btn-primary,.btn-dark):hover,
body.app-polish .modal :is(.btn-primary,.btn-dark):hover,
body.app-polish .page-content .module-switcher--primary:hover{
  border-color: rgba(29,78,216,.65);
  background: linear-gradient(135deg, #1d4ed8 0%, #4338ca 100%);
  color: #fff;
}

body.app-polish .page-content :is(.btn-success,.btn-outline-success),
body.app-polish .modal :is(.btn-success,.btn-outline-success){
  border-color: rgba(22,163,74,.32);
}

body.app-polish .page-content .btn-success,
body.app-polish .modal .btn-success{
  background: linear-gradient(135deg, #16a34a, #059669);
  color:#fff;
}

body.app-polish .page-content .btn-danger,
body.app-polish .modal .btn-danger{
  border-color: rgba(220,38,38,.38);
  background: linear-gradient(135deg, #dc2626, #e11d48);
  color:#fff;
}

body.app-polish .page-content [class*="btn-outline-"],
body.app-polish .modal [class*="btn-outline-"]{
  background: rgba(255,255,255,.86);
}

body.app-polish .page-content :is(.btn-outline-primary,.btn-outline-secondary,.btn-outline-dark),
body.app-polish .modal :is(.btn-outline-primary,.btn-outline-secondary,.btn-outline-dark){
  border-color: rgba(37,99,235,.22);
  color: #1d4ed8;
}

body.app-polish .page-content :is(.btn-outline-primary,.btn-outline-secondary,.btn-outline-dark):hover,
body.app-polish .modal :is(.btn-outline-primary,.btn-outline-secondary,.btn-outline-dark):hover{
  border-color: rgba(37,99,235,.42);
  background: #eff6ff;
  color: #1e40af;
}

body.app-polish .page-content :is(.btn-outline-danger):hover,
body.app-polish .modal :is(.btn-outline-danger):hover{
  background: #fef2f2;
  color: #b91c1c;
}

body.app-polish .page-content .module-switcher{
  border-radius: 14px;
  font-weight: 800;
}

/* Forms */
body.app-polish .page-content :is(.form-control,.form-select),
body.app-polish .modal :is(.form-control,.form-select){
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 13px;
  background-color: rgba(255,255,255,.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}

body.app-polish .page-content :is(.form-control,.form-select):focus,
body.app-polish .modal :is(.form-control,.form-select):focus{
  border-color: rgba(37,99,235,.58);
  box-shadow: 0 0 0 .22rem rgba(37,99,235,.13);
}

body.app-polish .page-content label,
body.app-polish .modal label{
  color: #334155;
  font-weight: 700;
}

/* Tables */
body.app-polish .page-content .table-responsive{
  border: 1px solid rgba(15,23,42,.08);
  border-radius: var(--tb-radius);
  background: rgba(255,255,255,.86);
  box-shadow: var(--tb-shadow-sm);
}

body.app-polish .page-content .table{
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(37,99,235,.035);
  --bs-table-hover-bg: rgba(37,99,235,.07);
  margin-bottom: 0;
  color: #1e293b;
}

body.app-polish .page-content .table thead th,
body.app-polish .page-content .table-light th{
  border-bottom: 1px solid rgba(15,23,42,.09);
  background: linear-gradient(180deg, rgba(248,250,252,.98), rgba(241,245,249,.9)) !important;
  color: #334155;
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .055em;
  text-transform: uppercase;
}

body.app-polish .page-content .table > :not(caption) > * > *{
  border-color: rgba(15,23,42,.075);
  vertical-align: middle;
}

/* Navigation/details inside pages */
body.app-polish .page-content :is(.nav-tabs,.nav-pills){
  gap: .35rem;
}

body.app-polish .page-content .nav-tabs{
  border-bottom-color: rgba(15,23,42,.08);
}

body.app-polish .page-content .nav-tabs .nav-link,
body.app-polish .page-content .nav-pills .nav-link{
  border-radius: 13px;
  color: #475569;
  font-weight: 750;
}

body.app-polish .page-content .nav-tabs .nav-link.active,
body.app-polish .page-content .nav-pills .nav-link.active{
  border-color: rgba(37,99,235,.20);
  background: #eff6ff;
  color: #1d4ed8;
}

body.app-polish .page-content :is(.badge,.alert){
  border-radius: 999px;
  font-weight: 750;
}

body.app-polish .page-content .alert{
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 16px;
  box-shadow: var(--tb-shadow-sm);
}

body.app-polish .page-content .progress{
  height: .72rem;
  border-radius: 999px;
  background: rgba(15,23,42,.08);
  overflow: hidden;
}

body.app-polish .page-content .progress-bar{
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #4f46e5);
}

@media (max-width: 767.98px){
  body.app-polish .page-content .btn:not(.btn-close){
    min-height: 42px;
  }
  body.app-polish .page-content .table-responsive{
    border-radius: 15px;
  }
}

/* Floating notification center */
.tb-notification-widget{
  position:fixed;
  top:84px;
  right:18px;
  z-index:1090;
}
.tb-notification-widget.is-dragging{
  user-select:none;
}
.tb-notification-widget.is-dragging .tb-notification-launcher{
  cursor:grabbing;
}
.tb-notification-widget.position-custom{
  right:auto;
}
.tb-notification-widget.panel-open-up .tb-notification-panel{
  top:auto;
  bottom:56px;
}
.tb-notification-widget.panel-align-left .tb-notification-panel{
  right:auto;
  left:0;
}
.tb-notification-launcher{
  width:46px;
  height:46px;
  border:none;
  border-radius:999px;
  background:linear-gradient(135deg,#0f1530,#2563eb);
  color:#fff;
  box-shadow:0 14px 28px rgba(15,21,48,.24);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  position:relative;
  cursor:grab;
  touch-action:none;
}
.tb-notification-launcher:active{ cursor:grabbing; }
.tb-notification-launcher:hover{ background:linear-gradient(135deg,#1b2455,#1d4ed8); }
.tb-notification-launcher .badge{
  position:absolute;
  top:-6px;
  right:-6px;
  min-width:23px;
}
.tb-notification-panel{
  display:none;
  position:absolute;
  top:56px;
  right:0;
  width:min(360px, calc(100vw - 24px));
  max-height:min(520px, calc(100dvh - 92px));
  background:#fff;
  border:1px solid rgba(15,23,42,.10);
  border-radius:16px;
  box-shadow:0 18px 36px rgba(2,6,23,.22);
  overflow:hidden;
}
.tb-notification-panel.open{ display:flex; flex-direction:column; }
.tb-notification-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px;
  background:#f4f7fb;
  border-bottom:1px solid rgba(15,23,42,.10);
}
.tb-notification-list{
  overflow:auto;
  max-height:450px;
  background:#fafbfe;
}
.tb-notification-item{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:12px;
  border-bottom:1px solid rgba(15,23,42,.08);
  background:#fff;
}
.tb-notification-item:hover{ background:#f8fafc; }
.tb-notification-icon{
  width:34px;
  height:34px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 34px;
  color:#fff;
  background:linear-gradient(135deg,#2563eb,#7c3aed);
}
.tb-notification-content{ min-width:0; flex:1 1 auto; }
.tb-notification-title{
  color:#0f172a;
  font-weight:800;
  font-size:13px;
  line-height:1.25;
}
.tb-notification-message{
  margin-top:3px;
  color:#334155;
  font-size:13px;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.tb-notification-time{
  margin-top:5px;
  color:#64748b;
  font-size:11px;
}
.tb-notification-dismiss{
  width:28px;
  height:28px;
  border:1px solid rgba(15,23,42,.12);
  border-radius:9px;
  background:#fff;
  color:#475569;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}
.tb-notification-dismiss:hover{ background:#fee2e2; color:#991b1b; border-color:#fecaca; }
.tb-notification-empty{
  min-height:150px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  color:#64748b;
  text-align:center;
  padding:24px;
}
.tb-notification-empty i{ font-size:28px; }

@media (max-width: 991.98px){
  .tb-notification-widget{ top:72px; right:10px; }
  .tb-notification-launcher{ width:42px; height:42px; }
  .tb-notification-widget.panel-open-up .tb-notification-panel{ bottom:50px; }
  .tb-notification-panel{ top:50px; }
}
.tb-toast-stack{ top:64px !important; }
@media (max-width: 991.98px){ .tb-toast-stack{ top:56px !important; } }
.tb-notification-panel-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  flex:0 0 auto;
}
.tb-notification-panel-actions .btn{
  white-space:nowrap;
}
@media (max-width: 420px){
  .tb-notification-panel-head{ align-items:flex-start; }
  .tb-notification-panel-actions{ flex-direction:column-reverse; align-items:flex-end; }
}
