@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&family=Inter:wght@400;500;700;800&display=swap');

:root{
  --tn-primary:#0d6efd;
  --tn-primary-dark:#0b5ed7;
  --tn-success:#198754;
  --tn-danger:#dc3545;
  --tn-warning:#ffc107;
  --tn-soft:#f6f8fb;
  --tn-line:#e9ecef;
  --tn-radius:1rem;
  --tn-shadow:0 .75rem 2rem rgba(13,110,253,.08);
}

html[lang="ar"] body{font-family:'Tajawal',system-ui,-apple-system,"Segoe UI",Arial,sans-serif}
html[lang="en"] body{font-family:'Inter',system-ui,-apple-system,"Segoe UI",Arial,sans-serif}
body.thunder-adminlte{background:#f4f6f9;color:#1f2937}
a{text-decoration:none}.min-w-0{min-width:0}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* AdminLTE shell polish */
.app-header{backdrop-filter:blur(10px);box-shadow:0 .35rem 1.25rem rgba(15,23,42,.05)}
.app-sidebar{background:linear-gradient(180deg,#111827 0%,#0f172a 65%,#0b1120 100%)!important}
.sidebar-brand{border-bottom:1px solid rgba(255,255,255,.09)}
.brand-link{gap:.65rem}.brand-text{font-weight:800!important;letter-spacing:.2px}.brand-image.thunder-brand-bolt{width:34px;height:34px;border-radius:12px;display:inline-grid;place-items:center;background:linear-gradient(135deg,#0d6efd,#20c997);font-size:19px;color:#fff;opacity:1!important;float:none;margin:0}.sidebar-wrapper{display:flex;flex-direction:column;height:calc(100% - 57px)}.sidebar-wrapper>nav{flex:1;overflow:auto}.sidebar-menu .nav-link{border-radius:.8rem;margin:.16rem .65rem;font-weight:700}.sidebar-menu .nav-link.active{background:linear-gradient(135deg,#0d6efd,#0dcaf0)!important;color:#fff!important;box-shadow:0 .65rem 1.4rem rgba(13,110,253,.22)}.thunder-nav-emoji{width:1.6rem;text-align:center;font-style:normal;font-size:1.05rem}.thunder-sidebar-user{margin:.75rem;border:1px solid rgba(255,255,255,.09);border-radius:1rem;padding:.85rem;background:rgba(255,255,255,.04);color:#fff}.thunder-user-avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#20c997,#0d6efd);font-weight:900;flex:0 0 auto}.thunder-sidebar-toggle{font-size:1.25rem;font-weight:900}.app-content-header h1{font-weight:800;letter-spacing:-.02em}.breadcrumb a{font-weight:700}.app-footer{border-top:1px solid var(--tn-line)}

/* Cards and layout helpers kept from the original PHP pages */
.card{border:0;border-radius:var(--tn-radius);box-shadow:var(--tn-shadow);margin-bottom:1rem}.card h2,.card h3{font-weight:800;margin-top:0;font-size:1.2rem}.card .card-header{border-radius:var(--tn-radius) var(--tn-radius) 0 0}.grid{display:grid;gap:1rem;margin-bottom:1rem}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.form-grid .full{grid-column:1/-1}.between{justify-content:space-between}.actions{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;margin-top:1rem}.actions.no-margin{margin-top:0}

/* KPI blocks */
.stat{position:relative;overflow:hidden;background:#fff;border-radius:var(--tn-radius);box-shadow:var(--tn-shadow);padding:1.15rem;border:1px solid rgba(13,110,253,.07)}.stat:after{content:"";position:absolute;inline-end:-35px;top:-35px;width:90px;height:90px;border-radius:50%;background:rgba(13,110,253,.12)}.stat strong{font-size:2.1rem;display:block;line-height:1;font-weight:900;color:#111827}.stat span{color:#6c757d;font-weight:800;display:block;margin-top:.5rem}

/* Forms */
label{display:block;font-weight:800;margin-bottom:.35rem}input,select,textarea{width:100%;border:1px solid #dee2e6;border-radius:.75rem;padding:.65rem .75rem;background:#fff;font-family:inherit;font-size:.95rem;outline:none;transition:border-color .15s ease,box-shadow .15s ease}textarea{min-height:100px;resize:vertical}input:focus,select:focus,textarea:focus{border-color:#86b7fe;box-shadow:0 0 0 .25rem rgba(13,110,253,.15)}.form-control,.form-select{border-radius:.75rem}.form-label{font-weight:800}

/* Buttons */
.btn{border-radius:.75rem;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:.35rem}.btn-sm{border-radius:.65rem;font-weight:800}.btn:not(.btn-primary):not(.btn-secondary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):not(.btn-light):not(.btn-dark):not(.btn-link):not(.btn-outline-primary):not(.btn-outline-secondary):not(.btn-outline-success):not(.btn-outline-danger):not(.btn-outline-warning):not(.btn-outline-info):not(.btn-outline-light):not(.btn-outline-dark){background:var(--tn-primary);border-color:var(--tn-primary);color:#fff}.btn:not(.btn-primary):not(.btn-secondary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):not(.btn-light):not(.btn-dark):not(.btn-link):not(.btn-outline-primary):not(.btn-outline-secondary):not(.btn-outline-success):not(.btn-outline-danger):not(.btn-outline-warning):not(.btn-outline-info):not(.btn-outline-light):not(.btn-outline-dark):hover{background:var(--tn-primary-dark);color:#fff}.btn-light{background:#eef2f7;border-color:#eef2f7;color:#111827}.btn-light:hover{background:#e2e8f0;color:#111827}.btn-warning{color:#111827}.thunder-lang-switch .btn{min-width:38px}

/* Tables */
.table-wrap{overflow:auto;border-radius:var(--tn-radius);border:1px solid var(--tn-line);background:#fff;margin-top:.5rem}table{width:100%;border-collapse:collapse;background:#fff;min-width:850px}th,td{padding:.85rem;border-bottom:1px solid var(--tn-line);text-align:start;vertical-align:top}th{background:#f8fafc;color:#495057;font-weight:900;white-space:nowrap}tbody tr:hover td{background:#f8fbff}.empty{padding:2rem;text-align:center;color:#6c757d}.muted{color:#6c757d}.small-muted{color:#6c757d;font-size:.85rem}

/* Badges used by PHP badge() */
.badge{display:inline-flex;align-items:center;border-radius:999px;padding:.4rem .65rem;font-weight:900;font-size:.75rem;line-height:1;white-space:nowrap}.badge-green{background:#d1e7dd;color:#0f5132}.badge-blue{background:#cfe2ff;color:#084298}.badge-orange{background:#fff3cd;color:#664d03}.badge-purple{background:#e2d9f3;color:#4c1d95}.badge-red{background:#f8d7da;color:#842029}.badge-gray{background:#e9ecef;color:#495057}

/* Alerts */
.thunder-alert,.alert{border-radius:.9rem;font-weight:800}.alert-error{background:#f8d7da;color:#842029;border:1px solid #f5c2c7}.alert-success{background:#d1e7dd;color:#0f5132;border:1px solid #badbcc}

/* Login */
.thunder-login-page{min-height:100vh;background:radial-gradient(circle at 12% 15%,rgba(13,110,253,.35),transparent 28%),radial-gradient(circle at 88% 85%,rgba(32,201,151,.28),transparent 30%),linear-gradient(135deg,#0b1120 0%,#111827 46%,#1d2b53 100%)}.thunder-login-box{width:min(440px,calc(100% - 2rem))}.thunder-login-logo{width:72px;height:72px;border-radius:24px;display:grid;place-items:center;background:linear-gradient(135deg,#0d6efd,#20c997);font-size:38px;box-shadow:0 1rem 2rem rgba(13,110,253,.3)}.thunder-login-box h1,.thunder-login-box p{color:#fff}.thunder-login-card{border-radius:1.25rem;overflow:hidden}.thunder-login-card .login-card-body p,.thunder-login-card .text-secondary{color:#6c757d!important}.thunder-login-form .btn-lg{padding:.75rem 1rem}

/* Calendar */
.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:.75rem}.day-name{font-weight:900;color:#475569;text-align:center}.calendar-day{min-height:135px;background:#fff;border:1px solid var(--tn-line);border-radius:1rem;padding:.75rem;overflow:hidden;box-shadow:0 .35rem 1rem rgba(15,23,42,.035)}.calendar-day.other{opacity:.45}.day-num{font-weight:900;margin-bottom:.5rem}.event-pill{display:block;font-size:.78rem;background:#e7f1ff;color:#084298;border-radius:.7rem;padding:.45rem .55rem;margin-bottom:.35rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.event-pill small{display:block;color:#475569}.progress{height:.65rem;background:#e9ecef;border-radius:999px;overflow:hidden}.progress>span{display:block;height:100%;background:linear-gradient(135deg,#0d6efd,#20c997);border-radius:999px}.kpi-row{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin:.65rem 0}

/* Direction fixes */
html[dir="rtl"] .ms-auto{margin-right:auto!important;margin-left:0!important}html[dir="rtl"] .me-1{margin-left:.25rem!important;margin-right:0!important}html[dir="rtl"] .float-sm-end{float:left!important}html[dir="rtl"] .float-end{float:left!important}html[dir="rtl"] .breadcrumb-item+.breadcrumb-item{padding-left:0;padding-right:var(--bs-breadcrumb-item-padding-x)}html[dir="rtl"] .breadcrumb-item+.breadcrumb-item:before{float:right;padding-left:var(--bs-breadcrumb-item-padding-x);padding-right:0}.rtl-mode input,.rtl-mode textarea{text-align:right}.ltr-mode input,.ltr-mode textarea{text-align:left}

@media(max-width:1000px){.grid-4,.grid-3,.grid-2,.form-grid{grid-template-columns:1fr}.calendar-grid{grid-template-columns:1fr}.day-name{display:none}.calendar-day{min-height:auto}table{min-width:760px}.app-content-header h1{font-size:1.35rem}.thunder-sidebar-user{margin-bottom:1rem}}
.app-content .card:not(.card-outline){padding:1.15rem}.app-content .card .table-wrap:last-child{margin-bottom:0}

/* Tabler-style SVG icons and polished shell fixes */
.ti{display:inline-block;vertical-align:-.18em;flex:0 0 auto}.thunder-adminlte,.app-wrapper,.app-main{max-width:100%;overflow-x:hidden}.thunder-topbar .container-fluid{min-width:0}.thunder-header-actions{gap:.35rem;min-width:0}.thunder-icon-btn{width:42px;height:42px;border-radius:14px!important;display:inline-grid!important;place-items:center;color:#475569!important;transition:background .15s ease,color .15s ease,transform .15s ease}.thunder-icon-btn:hover{background:#eef6ff;color:var(--tn-primary)!important;transform:translateY(-1px)}.thunder-header-brand{max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.thunder-header-time{white-space:nowrap}.thunder-sidebar-toggle{font-size:1rem!important}

.thunder-sidebar,.app-sidebar,.sidebar-wrapper,.thunder-sidebar-nav,.sidebar-menu{overflow-x:hidden!important}.sidebar-wrapper{min-width:0}.sidebar-wrapper>nav{flex:1;overflow-y:auto;overflow-x:hidden!important}.sidebar-menu{padding-inline:.35rem}.sidebar-menu .nav-item{min-width:0}.sidebar-menu .nav-link{display:flex!important;align-items:center;min-width:0;max-width:calc(100% - .3rem);gap:.55rem;overflow:hidden}.sidebar-menu .nav-link p{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0!important;line-height:1.35}.thunder-nav-icon{width:1.65rem;height:1.65rem;display:inline-grid;place-items:center;flex:0 0 1.65rem;color:inherit}.brand-link{min-width:0;overflow:hidden}.brand-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.brand-image.thunder-brand-icon{width:36px!important;height:36px!important;border-radius:13px;display:inline-grid!important;place-items:center;background:linear-gradient(135deg,#0d6efd,#20c997);color:#fff;opacity:1!important;float:none!important;margin:0!important;flex:0 0 36px}.brand-image.thunder-brand-icon svg{stroke-width:2.35}

.thunder-avatar{display:inline-block;border-radius:50%;object-fit:cover;background:#e9f2ff;border:2px solid rgba(255,255,255,.9);box-shadow:0 .35rem 1rem rgba(15,23,42,.08)}.thunder-avatar-sm{width:36px;height:36px}.thunder-avatar-md{width:42px;height:42px}.thunder-avatar-lg{width:54px;height:54px}.thunder-avatar-xl{width:128px;height:128px;border-width:4px}.thunder-user-menu-wrap{position:relative}.thunder-user-menu-toggle{border:0;background:transparent;display:flex!important;align-items:center;gap:.45rem;padding:.25rem .4rem!important;border-radius:999px;color:#1f2937!important;max-width:230px}.thunder-user-menu-toggle:hover,.thunder-user-menu-toggle.is-open{background:#f1f5f9}.thunder-user-menu-name{max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:800}.thunder-chevron{opacity:.65}.thunder-dropdown-menu{position:absolute;top:calc(100% + .65rem);inset-inline-end:0;z-index:1040;display:none;width:290px;background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:1rem;box-shadow:0 1rem 2.25rem rgba(15,23,42,.16);padding:.65rem}.thunder-dropdown-menu.show{display:block}.thunder-dropdown-head{display:flex;gap:.75rem;align-items:center;padding:.55rem .55rem .75rem;border-bottom:1px solid var(--tn-line);margin-bottom:.35rem;min-width:0}.thunder-dropdown-item{display:flex;align-items:center;gap:.6rem;padding:.72rem .65rem;border-radius:.8rem;color:#1f2937;font-weight:800}.thunder-dropdown-item:hover{background:#f8fafc;color:var(--tn-primary)}

.thunder-sidebar-user{min-width:0;overflow:hidden}.thunder-profile-preview{background:linear-gradient(135deg,#eef6ff,#f8fafc);border:1px solid rgba(13,110,253,.08);border-radius:1.25rem;padding:1.5rem}.thunder-file-input{display:flex;align-items:center;gap:.7rem;border:1px dashed #b6c7e3;background:#f8fbff;border-radius:1rem;padding:.9rem}.thunder-file-input input{border:0;background:transparent;padding:0;border-radius:0;box-shadow:none!important}.thunder-file-icon{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:#e7f1ff;color:var(--tn-primary);flex:0 0 auto}.thunder-login-logo{color:#fff}.thunder-login-logo .ti{width:34px;height:34px;stroke-width:2.4}.rtl-mode .thunder-dropdown-menu{left:0;right:auto}.ltr-mode .thunder-dropdown-menu{right:0;left:auto}

@media(max-width:575.98px){.thunder-user-menu-toggle{padding:.2rem!important}.thunder-dropdown-menu{position:fixed;top:64px;inset-inline:1rem;width:auto}.thunder-header-actions{gap:.15rem}.thunder-icon-btn{width:38px;height:38px}.thunder-avatar-xl{width:104px;height:104px}}

/* Fixed header + sidebar while keeping horizontal overflow under control */
:root{
  --tn-sidebar-width:250px;
  --tn-header-height:57px;
}

html,body{
  width:100%;
  max-width:100%;
  overflow-x:hidden!important;
}

body.thunder-adminlte{
  min-height:100vh;
  overflow-x:hidden!important;
}

/*
  Hard-fixed AdminLTE shell.
  AdminLTE 4 uses CSS grid + inner overflow for layout-fixed; on some hosting/browser combinations
  sticky elements still scroll away. This block uses fixed positioning and compensates the content area.
*/
body.thunder-adminlte .app-wrapper{
  display:block!important;
  position:relative;
  min-height:100vh;
  width:100%;
  max-width:100%;
  overflow-x:hidden!important;
}

body.thunder-adminlte .app-header{
  position:fixed!important;
  top:0!important;
  inset-inline-start:var(--tn-sidebar-width)!important;
  inset-inline-end:0!important;
  width:auto!important;
  height:auto;
  min-height:var(--tn-header-height);
  z-index:1100!important;
}

body.thunder-adminlte .app-sidebar{
  position:fixed!important;
  top:0!important;
  bottom:0!important;
  inset-inline-start:0!important;
  inset-inline-end:auto!important;
  width:var(--tn-sidebar-width)!important;
  min-width:var(--tn-sidebar-width)!important;
  max-width:var(--tn-sidebar-width)!important;
  height:100vh!important;
  max-height:100vh!important;
  overflow:hidden!important;
  z-index:1090!important;
  margin:0!important;
}

html[dir="rtl"] body.thunder-adminlte .app-sidebar{
  inset-inline-start:0!important;
  inset-inline-end:auto!important;
}

body.thunder-adminlte .app-sidebar .sidebar-wrapper{
  height:calc(100vh - 3.5rem)!important;
  max-height:calc(100vh - 3.5rem)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  scrollbar-width:thin;
}

body.thunder-adminlte .app-main{
  display:block!important;
  width:auto!important;
  max-width:calc(100% - var(--tn-sidebar-width))!important;
  min-height:calc(100vh - var(--tn-header-height));
  margin-inline-start:var(--tn-sidebar-width)!important;
  margin-inline-end:0!important;
  padding-top:var(--tn-header-height)!important;
  overflow:visible!important;
}

body.thunder-adminlte .app-footer{
  margin-inline-start:var(--tn-sidebar-width)!important;
  margin-inline-end:0!important;
  width:auto!important;
}

body.thunder-adminlte .app-content,
body.thunder-adminlte .app-content-header,
body.thunder-adminlte .container-fluid{
  min-width:0;
  max-width:100%;
}

body.thunder-adminlte .app-content{
  overflow:visible!important;
}

body.thunder-adminlte .table-wrap{
  max-width:100%;
  overflow-x:auto;
  overflow-y:visible;
}

body.thunder-adminlte .thunder-sidebar,
body.thunder-adminlte .app-sidebar,
body.thunder-adminlte .sidebar-wrapper,
body.thunder-adminlte .thunder-sidebar-nav,
body.thunder-adminlte .sidebar-menu{
  overflow-x:hidden!important;
}

/* When AdminLTE collapses the sidebar on desktop, keep the header/content aligned. */
@media(min-width:992px){
  body.thunder-adminlte.sidebar-collapse:not(.sidebar-open) .app-sidebar{
    transform:translateX(calc(var(--tn-sidebar-width) * -1));
  }
  html[dir="rtl"] body.thunder-adminlte.sidebar-collapse:not(.sidebar-open) .app-sidebar{
    transform:translateX(var(--tn-sidebar-width));
  }
  body.thunder-adminlte.sidebar-collapse:not(.sidebar-open) .app-header,
  body.thunder-adminlte.sidebar-collapse:not(.sidebar-open) .app-main,
  body.thunder-adminlte.sidebar-collapse:not(.sidebar-open) .app-footer{
    margin-inline-start:0!important;
    inset-inline-start:0!important;
    max-width:100%!important;
  }
}

/* Mobile/tablet: header stays fixed full width, sidebar becomes an overlay. */
@media(max-width:991.98px){
  body.thunder-adminlte .app-header{
    inset-inline-start:0!important;
    inset-inline-end:0!important;
    width:100%!important;
  }

  body.thunder-adminlte .app-main{
    margin-inline-start:0!important;
    max-width:100%!important;
    padding-top:var(--tn-header-height)!important;
  }

  body.thunder-adminlte .app-footer{
    margin-inline-start:0!important;
  }

  body.thunder-adminlte .app-sidebar{
    transform:translateX(calc(var(--tn-sidebar-width) * -1));
    transition:transform .25s ease;
  }

  html[dir="rtl"] body.thunder-adminlte .app-sidebar{
    transform:translateX(var(--tn-sidebar-width));
  }

  body.thunder-adminlte.sidebar-open .app-sidebar{
    transform:translateX(0)!important;
  }
}

/* Smooth, polished scrollbars */
:root{
  --tn-scrollbar-size:10px;
  --tn-scrollbar-track:#eef2f7;
  --tn-scrollbar-thumb:#b8c4d6;
  --tn-scrollbar-thumb-hover:#7f8ea3;
  --tn-scrollbar-thumb-active:#64748b;
}

html{
  scrollbar-width:thin;
  scrollbar-color:var(--tn-scrollbar-thumb) var(--tn-scrollbar-track);
  scrollbar-gutter:stable;
}

body,
.app-main,
.app-content,
.sidebar-wrapper,
.table-wrap,
textarea,
select{
  scrollbar-width:thin;
  scrollbar-color:var(--tn-scrollbar-thumb) transparent;
}

::-webkit-scrollbar{
  width:var(--tn-scrollbar-size);
  height:var(--tn-scrollbar-size);
}

::-webkit-scrollbar-track{
  background:var(--tn-scrollbar-track);
  border-radius:999px;
}

::-webkit-scrollbar-thumb{
  background:linear-gradient(180deg,var(--tn-scrollbar-thumb),#94a3b8);
  border:2px solid var(--tn-scrollbar-track);
  border-radius:999px;
  min-height:48px;
}

::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(180deg,var(--tn-scrollbar-thumb-hover),#6b7a90);
}

::-webkit-scrollbar-thumb:active{
  background:var(--tn-scrollbar-thumb-active);
}

::-webkit-scrollbar-corner{
  background:transparent;
}

/* Dark sidebar scrollbar */
body.thunder-adminlte .app-sidebar .sidebar-wrapper{
  scrollbar-color:rgba(148,163,184,.62) transparent;
}

body.thunder-adminlte .app-sidebar .sidebar-wrapper::-webkit-scrollbar-track{
  background:transparent;
}

body.thunder-adminlte .app-sidebar .sidebar-wrapper::-webkit-scrollbar-thumb{
  background:rgba(148,163,184,.42);
  border:2px solid transparent;
  background-clip:padding-box;
}

body.thunder-adminlte .app-sidebar .sidebar-wrapper::-webkit-scrollbar-thumb:hover{
  background:rgba(203,213,225,.62);
  background-clip:padding-box;
}

/* Tables keep a clean horizontal scrollbar without affecting the full page */
body.thunder-adminlte .table-wrap::-webkit-scrollbar{
  height:9px;
}

body.thunder-adminlte .table-wrap::-webkit-scrollbar-track{
  background:#f8fafc;
  border-radius:999px;
}

body.thunder-adminlte .table-wrap::-webkit-scrollbar-thumb{
  background:#cbd5e1;
  border:2px solid #f8fafc;
  border-radius:999px;
}

body.thunder-adminlte .table-wrap::-webkit-scrollbar-thumb:hover{
  background:#94a3b8;
}

@media(pointer:coarse){
  :root{--tn-scrollbar-size:6px;}
}


/* Homepage content manager */
.homepage-admin-form .card{padding:1.15rem}.home-admin-repeater{border:1px solid #e5eaf2;background:#fbfdff;border-radius:1rem;padding:1rem;margin-bottom:1rem}.home-admin-repeater textarea{min-height:92px}.home-admin-plan-rows{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;min-height:170px}.sticky-savebar{position:sticky;bottom:1rem;z-index:50;background:rgba(255,255,255,.88);backdrop-filter:blur(12px);border:1px solid rgba(15,23,42,.08);border-radius:1rem;padding:.85rem;box-shadow:0 1rem 2.5rem rgba(15,23,42,.12)}

/* Unified admin/customer login */
.thunder-login-box-wide{width:min(560px,calc(100% - 2rem))}.thunder-login-mode-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}.thunder-login-mode-card{border:1px solid #e5eaf2;background:linear-gradient(135deg,#f8fbff,#fff);border-radius:1rem;padding:.9rem;display:grid;gap:.25rem}.thunder-login-mode-card strong{font-weight:900;color:#111827}.thunder-login-mode-card small{color:#64748b;line-height:1.55}.thunder-login-mode-icon{width:44px;height:44px;border-radius:15px;display:grid;place-items:center;background:#e7f1ff;color:#0d6efd;margin-bottom:.15rem}
@media(max-width:575.98px){.thunder-login-mode-cards{grid-template-columns:1fr}}

/* Customer portal */
.customer-portal-body{min-height:100vh;background:radial-gradient(circle at 10% 10%,rgba(13,110,253,.20),transparent 30%),radial-gradient(circle at 90% 20%,rgba(32,201,151,.16),transparent 26%),linear-gradient(180deg,#f6f8fb 0%,#eef3f9 100%);color:#0f172a}.customer-topbar{position:sticky;top:0;z-index:1000;background:rgba(255,255,255,.82);backdrop-filter:blur(16px);border-bottom:1px solid rgba(15,23,42,.08);box-shadow:0 .5rem 1.5rem rgba(15,23,42,.05)}.customer-topbar-inner{max-width:1240px;margin:0 auto;padding:.7rem 1rem;display:flex;align-items:center;justify-content:space-between;gap:1rem}.customer-brand{display:flex;align-items:center;gap:.65rem;font-weight:950;color:#0f172a;font-size:1.05rem}.customer-brand:hover{color:#0d6efd}.customer-brand-icon{width:42px;height:42px;border-radius:15px;display:grid;place-items:center;background:linear-gradient(135deg,#0d6efd,#20c997);color:#fff;box-shadow:0 .75rem 1.5rem rgba(13,110,253,.22)}.customer-topbar-actions{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.customer-icon-btn{width:40px;height:40px;border-radius:14px;display:grid;place-items:center;background:#f1f5f9;color:#475569}.customer-icon-btn:hover{background:#e7f1ff;color:#0d6efd}.customer-shell{max-width:1240px;margin:0 auto;padding:1.25rem 1rem 2.5rem}.customer-hero-card{position:relative;overflow:hidden;border-radius:1.5rem;background:linear-gradient(135deg,#0b1120 0%,#15264a 52%,#0d6efd 130%);color:#fff;padding:1.4rem;margin-bottom:1rem;box-shadow:0 1.4rem 3.4rem rgba(13,30,70,.22)}.customer-hero-card:before{content:"";position:absolute;inset:auto -90px -110px auto;width:280px;height:280px;border-radius:50%;background:rgba(32,201,151,.22)}html[dir="rtl"] .customer-hero-card:before{inset:auto auto -110px -90px}.customer-hero-content{position:relative;display:flex;align-items:center;gap:1rem;min-width:0}.customer-avatar-ring{width:86px;height:86px;border-radius:28px;display:grid;place-items:center;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.22);box-shadow:inset 0 0 0 8px rgba(255,255,255,.04);flex:0 0 auto}.customer-eyebrow{display:inline-flex;align-items:center;padding:.35rem .7rem;border-radius:999px;background:rgba(255,255,255,.12);color:#dbeafe;font-weight:900;font-size:.8rem;margin-bottom:.55rem}.customer-hero-card h1{font-size:clamp(1.55rem,4vw,2.6rem);font-weight:950;letter-spacing:-.04em;margin:0 0 .35rem}.customer-hero-card p{margin:0;color:#cbd5e1;line-height:1.8}.customer-hero-pills{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.9rem}.customer-pill{display:inline-flex;align-items:center;gap:.35rem;border-radius:999px;padding:.45rem .7rem;background:rgba(255,255,255,.11);border:1px solid rgba(255,255,255,.16);color:#fff;font-weight:800;font-size:.84rem}.customer-pill-success{background:rgba(25,135,84,.22);border-color:rgba(25,135,84,.35)}.customer-pill-danger{background:rgba(220,53,69,.22);border-color:rgba(220,53,69,.35)}.customer-pill-warning{background:rgba(255,193,7,.22);border-color:rgba(255,193,7,.35)}.customer-grid{display:grid;gap:1rem;margin-bottom:1rem}.customer-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.customer-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.customer-kpi-card,.customer-card{background:rgba(255,255,255,.92);border:1px solid rgba(15,23,42,.07);border-radius:1.25rem;box-shadow:0 .9rem 2.1rem rgba(15,23,42,.07)}.customer-kpi-card{padding:1rem;position:relative;overflow:hidden}.customer-kpi-card:after{content:"";position:absolute;inset-inline-end:-36px;top:-42px;width:100px;height:100px;border-radius:50%;background:rgba(13,110,253,.10)}.customer-kpi-icon{width:46px;height:46px;border-radius:16px;display:grid;place-items:center;background:#e7f1ff;color:#0d6efd;margin-bottom:.85rem}.customer-kpi-card small{display:block;color:#64748b;font-weight:900;margin-bottom:.25rem}.customer-kpi-card strong{display:block;font-size:1.55rem;font-weight:950;color:#0f172a;line-height:1.2;word-break:break-word}.customer-card{overflow:hidden}.customer-card-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.1rem 1.15rem;border-bottom:1px solid #edf1f7;background:linear-gradient(180deg,#fff,#fbfdff)}.customer-card-header h2{font-size:1.1rem;font-weight:950;margin:0}.customer-card-header p{color:#64748b;margin:.25rem 0 0;line-height:1.65}.customer-card-body{padding:1.15rem}.customer-detail-list{display:grid;gap:.65rem}.customer-detail-row{display:flex;justify-content:space-between;align-items:center;gap:1rem;border:1px solid #edf1f7;background:#f8fafc;border-radius:1rem;padding:.8rem .9rem}.customer-detail-row span{color:#64748b;font-weight:800}.customer-detail-row strong{font-weight:950;text-align:end;direction:ltr;word-break:break-word}.customer-usage-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}.customer-usage-box{border:1px solid #dbeafe;background:linear-gradient(135deg,#eff6ff,#fff);border-radius:1rem;padding:.9rem}.customer-usage-box span{display:block;color:#64748b;font-weight:800;margin-bottom:.35rem}.customer-usage-box strong{display:block;font-size:1.35rem;font-weight:950;color:#0d6efd;direction:ltr;text-align:end}.customer-stats-tabs{display:flex;gap:.5rem;flex-wrap:wrap;margin-bottom:1rem}.customer-tab-btn{border:1px solid #dbe3ee;background:#fff;color:#475569;border-radius:999px;padding:.65rem .95rem;font-weight:950}.customer-tab-btn.active{background:linear-gradient(135deg,#0d6efd,#0dcaf0);border-color:transparent;color:#fff;box-shadow:0 .65rem 1.4rem rgba(13,110,253,.22)}.customer-tab-panel{display:none}.customer-tab-panel.active{display:block}.customer-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem;margin-bottom:1rem}.customer-summary-card{border:1px solid #edf1f7;background:#f8fafc;border-radius:1rem;padding:.85rem}.customer-summary-card span{display:block;color:#64748b;font-weight:900;font-size:.82rem;margin-bottom:.35rem}.customer-summary-card strong{display:block;font-size:1.08rem;color:#0d6efd;font-weight:950;direction:ltr;text-align:end}.customer-chart-wrap{overflow:auto;border:1px solid #edf1f7;border-radius:1rem;background:#fff;padding:.75rem;margin-bottom:1rem}.customer-line-chart{width:100%;min-width:520px;height:220px;direction:ltr}.customer-svg-grid{stroke:#e2e8f0;stroke-width:1}.customer-svg-axis{stroke:#94a3b8;stroke-width:1.5}.customer-svg-line{fill:none;stroke:#0d6efd;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}.customer-svg-dot{fill:#0d6efd;stroke:#fff;stroke-width:3}.customer-svg-label{fill:#64748b;font-size:12px;font-family:Tahoma,Arial,sans-serif}.customer-svg-value{fill:#0d6efd;font-size:16px;font-weight:bold;font-family:Tahoma,Arial,sans-serif}.customer-empty-chart{padding:2rem;text-align:center;color:#64748b}.customer-table-wrap{margin-top:0}.customer-ltr-value{direction:ltr;text-align:end}.customer-card .empty{border:1px dashed #dbe3ee;border-radius:1rem;background:#f8fafc}
@media(max-width:991.98px){.customer-grid-3,.customer-grid-2,.customer-summary-grid{grid-template-columns:1fr}.customer-hero-content{align-items:flex-start}.customer-topbar-inner{align-items:flex-start}.customer-topbar-actions{justify-content:flex-end}}@media(max-width:575.98px){.customer-topbar-inner{flex-direction:column}.customer-topbar-actions{width:100%;justify-content:space-between}.customer-hero-content{flex-direction:column}.customer-usage-grid{grid-template-columns:1fr}.customer-detail-row{flex-direction:column;align-items:flex-start}.customer-detail-row strong{text-align:start}.customer-kpi-card strong{font-size:1.25rem}}


/* v4.2.0 - Clean URLs task flow and professional calendar */
.task-editor-card{position:relative;overflow:hidden}
.task-editor-card:before{content:"";position:absolute;inset-inline-end:-90px;top:-110px;width:260px;height:260px;border-radius:50%;background:radial-gradient(circle,rgba(13,110,253,.16),transparent 65%);pointer-events:none}
.task-editor-head{position:relative;display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}
.task-editor-head h2{margin:0 0 .35rem;font-weight:950}.task-editor-head p{color:#64748b;margin:0;line-height:1.7}
.task-flow{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap;background:#f8fafc;border:1px solid #e5eaf2;border-radius:999px;padding:.55rem .7rem}.task-flow-arrow{color:#94a3b8;font-weight:900}.task-list-toolbar{gap:1rem;flex-wrap:wrap}
.calendar-pro-card{overflow:hidden}.calendar-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:1rem;padding-bottom:1rem;border-bottom:1px solid #edf1f7}
.calendar-toolbar h2{margin:0 0 .35rem;font-weight:950;letter-spacing:-.025em}.calendar-toolbar p{color:#64748b;margin:0;line-height:1.7}
.calendar-toolbar-actions{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;justify-content:flex-end}.calendar-view-switch{display:inline-flex;align-items:center;gap:.25rem;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:999px;padding:.25rem}
.calendar-view-switch a{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:.45rem .8rem;border-radius:999px;color:#475569;font-weight:900;font-size:.88rem}.calendar-view-switch a.active{background:#fff;color:#0d6efd;box-shadow:0 .35rem 1rem rgba(15,23,42,.08)}
.calendar-pro-grid{display:grid;gap:.75rem}.calendar-month-grid{grid-template-columns:repeat(7,minmax(0,1fr))}.calendar-day-name{text-align:center;font-weight:950;color:#475569;padding:.25rem}
.calendar-day-card{min-height:155px;background:linear-gradient(180deg,#fff,#fbfdff);border:1px solid #e6edf5;border-radius:1.1rem;padding:.75rem;box-shadow:0 .45rem 1.25rem rgba(15,23,42,.045);display:flex;flex-direction:column;min-width:0}.calendar-day-card.other{opacity:.42}.calendar-day-card.today{border-color:rgba(13,110,253,.45);box-shadow:0 .75rem 1.65rem rgba(13,110,253,.12)}
.calendar-day-head{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.65rem}.calendar-day-head strong{font-weight:950;color:#0f172a}.calendar-day-head small{display:block;color:#64748b;font-weight:800;margin-top:.2rem}.calendar-add-btn{width:30px;height:30px;display:inline-grid;place-items:center;border-radius:10px;color:#0d6efd;background:#e7f1ff;border:1px solid #d6e8ff;flex:0 0 auto}.calendar-add-btn:hover{color:#fff;background:#0d6efd}
.calendar-events{display:grid;gap:.45rem;align-content:flex-start}.calendar-event{position:relative;display:grid;gap:.15rem;border:1px solid #dbeafe;background:#eff6ff;color:#0f172a;border-radius:.85rem;padding:.5rem .55rem;overflow:hidden}.calendar-event:before{content:"";position:absolute;inset-inline-start:0;top:0;bottom:0;width:4px;background:#0d6efd}.calendar-event:hover{transform:translateY(-1px);box-shadow:0 .65rem 1.3rem rgba(15,23,42,.08)}
.calendar-event-time{color:#0d6efd;font-weight:950;font-size:.75rem}.calendar-event-title{font-weight:950;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.calendar-event small{color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.calendar-event.status-completed{background:#ecfdf5;border-color:#bbf7d0}.calendar-event.status-completed:before{background:#198754}.calendar-event.status-incomplete,.calendar-event.status-failed,.calendar-event.status-cancelled{background:#fef2f2;border-color:#fecaca}.calendar-event.status-incomplete:before,.calendar-event.status-failed:before,.calendar-event.status-cancelled:before{background:#dc3545}.calendar-event.status-pending{background:#fff7ed;border-color:#fed7aa}.calendar-event.status-pending:before{background:#f97316}
.calendar-week-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:.75rem}.calendar-day-card.week{min-height:320px}.calendar-empty-mini{border:1px dashed #dbe3ee;border-radius:.9rem;padding:.75rem;color:#94a3b8;font-weight:800;text-align:center;background:#f8fafc}
.calendar-day-view{display:grid;gap:1rem}.calendar-day-big-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;background:linear-gradient(135deg,#0b1120,#15264a);color:#fff;border-radius:1.25rem;padding:1rem 1.1rem}.calendar-day-big-head span{display:block;color:#cbd5e1;font-weight:800;margin-bottom:.2rem}.calendar-day-big-head strong{font-size:1.55rem;font-weight:950}
.calendar-day-agenda{display:grid;gap:.75rem}.calendar-agenda-item{display:grid;grid-template-columns:82px minmax(0,1fr) auto;align-items:center;gap:1rem;border:1px solid #e6edf5;background:#fff;border-radius:1.05rem;padding:.85rem;box-shadow:0 .45rem 1.2rem rgba(15,23,42,.045);color:#0f172a}.calendar-agenda-item:hover{transform:translateY(-1px);box-shadow:0 .85rem 1.7rem rgba(15,23,42,.08)}
.agenda-time{font-weight:950;color:#0d6efd;background:#e7f1ff;border-radius:.9rem;padding:.55rem;text-align:center}.agenda-body{min-width:0}.agenda-body strong{display:block;font-weight:950;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.agenda-body span,.agenda-body small{display:block;color:#64748b;line-height:1.6}.calendar-empty-day{margin:0}
@media(max-width:1199.98px){.calendar-month-grid,.calendar-week-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.calendar-day-name{display:none}}
@media(max-width:575.98px){.calendar-month-grid,.calendar-week-grid{grid-template-columns:1fr}.calendar-day-card{min-height:auto}.calendar-toolbar-actions,.calendar-toolbar-actions .actions{width:100%}.calendar-view-switch{width:100%;justify-content:space-between}.calendar-view-switch a{flex:1}.calendar-agenda-item{grid-template-columns:1fr;align-items:start}.agenda-time{width:max-content}.task-flow{border-radius:1rem}}
