:root {
  --hora-blue: #2f4d87;
  --hora-blue-dark: #203866;
  --hora-blue-soft: #edf2fb;
  --hora-yellow: #f5c400;
  --hora-yellow-soft: #fff7cf;
  --hora-ink: #172033;
  --hora-muted: #667085;
  --hora-line: #e4e8ef;
  --hora-bg: #f5f7fa;
  --hora-radius: 16px;
}

html, body { font-family: Inter, "Segoe UI", Arial, sans-serif; }
body { background: var(--hora-bg); color: var(--hora-ink); }

/* Login */
body.welcome-anonymous { background: var(--hora-yellow); min-height: 100vh; }
.welcome-anonymous #page { background: linear-gradient(135deg, #f8cf23 0%, var(--hora-yellow) 55%, #e7b500 100%); }
.welcome-anonymous .container-tight { width: min(100% - 32px, 980px); max-width: 980px !important; }
.welcome-anonymous > .glpi-logo,
.welcome-anonymous .container-tight > .text-center { display: none !important; }
.welcome-anonymous .main-content-card { border: 0; border-radius: 24px; overflow: hidden; box-shadow: 0 28px 70px rgba(26, 40, 70, .24); }
.welcome-anonymous .main-content-card > .card-header { display: none; }
.welcome-anonymous .main-content-card > .card-body { display: grid; grid-template-columns: 1.05fr .95fr; padding: 0; min-height: 520px; }
.welcome-anonymous .sishora-login-brand { padding: 62px 54px; background: linear-gradient(150deg, var(--hora-blue-dark), var(--hora-blue)); color: #fff; display: flex; flex-direction: column; justify-content: space-between; }
.sishora-login-brand img { width: min(100%, 330px); height: auto; filter: brightness(0) invert(1); }
.sishora-login-brand span { display: inline-block; color: var(--hora-yellow); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px; }
.sishora-login-brand h1 { color: #fff; font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1; letter-spacing: -.045em; margin: 0 0 12px; }
.sishora-login-brand p { color: rgba(255,255,255,.82); font-size: 1.05rem; margin: 0; }
.welcome-anonymous .main-content-card form { padding: 54px 52px; display: flex; align-items: center; }
.welcome-anonymous .main-content-card form > .row { width: 100%; }
.welcome-anonymous .main-content-card form .col-md-5 { width: 100%; max-width: none; }
.welcome-anonymous .main-content-card form h2 { color: var(--hora-blue-dark); font-size: 1.65rem; font-weight: 800; }
.welcome-anonymous .form-label { color: var(--hora-ink); font-weight: 650; }
.welcome-anonymous .form-control { min-height: 48px; border: 1px solid #d6dbe5; border-radius: 10px; }
.welcome-anonymous .form-control:focus { border-color: var(--hora-blue); box-shadow: 0 0 0 3px rgba(47,77,135,.14); }
.welcome-anonymous .btn-primary { min-height: 48px; border: 0; border-radius: 10px; background: var(--hora-blue); font-weight: 750; }
.welcome-anonymous .btn-primary:hover { background: var(--hora-blue-dark); }
.welcome-anonymous .sishora-auth-source,
.welcome-anonymous .sishora-copyright { display: none !important; }

/* Authenticated shell */
/*
 * Hide the native navigation during the first paint. This must not depend on
 * the asynchronous profile-access request; otherwise the original brand and
 * expandable menu flash briefly before the SISHORA shell is mounted.
 */
body:not(.welcome-anonymous) .navbar-vertical,
body:not(.welcome-anonymous) aside.navbar,
body:not(.welcome-anonymous) .navbar-brand .glpi-logo { display: none !important; }
body:not(.welcome-anonymous) { padding-left: 264px; }
body:not(.welcome-anonymous)::before { content: ""; position: fixed; inset: 0 auto 0 0; width: 264px; z-index: 1038; background: linear-gradient(180deg, var(--hora-blue-dark), #172b52); }
.sishora-sidebar { position: fixed; inset: 0 auto 0 0; width: 264px; z-index: 1040; display: flex; flex-direction: column; background: linear-gradient(180deg, var(--hora-blue-dark), #172b52); color: #fff; box-shadow: 8px 0 30px rgba(20,40,75,.12); }
.sishora-sidebar-brand { min-height: 120px; padding: 20px 22px 16px; display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-decoration: none; color: #fff; border-bottom: 1px solid rgba(255,255,255,.1); }
.sishora-sidebar-brand img { grid-row: 1 / 3; width: 52px; filter: brightness(0) invert(1); }
.sishora-sidebar-brand strong { align-self: end; font-size: 1.25rem; letter-spacing: .02em; }
.sishora-sidebar-brand small { align-self: start; color: rgba(255,255,255,.66); font-size: .67rem; line-height: 1.2; }
.sishora-sidebar nav { padding: 14px 10px; overflow-y: auto; scrollbar-width: thin; }
.sishora-sidebar nav a { display: flex; gap: 11px; align-items: center; padding: 10px 13px; margin: 2px 0; border-radius: 10px; color: rgba(255,255,255,.76); text-decoration: none; font-size: .87rem; font-weight: 600; transition: .18s ease; }
.sishora-sidebar nav a i { font-size: 1.15rem; width: 21px; text-align: center; }
.sishora-sidebar nav a:hover { color: #fff; background: rgba(255,255,255,.09); }
.sishora-sidebar nav a.active { color: var(--hora-blue-dark); background: var(--hora-yellow); box-shadow: 0 6px 18px rgba(0,0,0,.16); }
.sishora-sidebar nav a.sishora-submenu { margin-left: 22px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.2); border-radius: 0 10px 10px 0; font-size: .82rem; }
.sishora-sidebar nav a.sishora-submenu i { font-size: 1rem; }
.sishora-nav-divider { margin: 14px 13px 5px; color: rgba(255,255,255,.42); font-size: .65rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.sishora-sidebar-footer { margin-top: auto; padding: 15px 18px; border-top: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.68); font-size: .72rem; }
.sishora-sidebar-footer span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #41d17d; margin-right: 7px; }
.sishora-menu-toggle { display: none; }
body.sishora-ready .page-wrapper { margin-left: 0 !important; }
body.sishora-ready .navbar-horizontal { border-bottom: 3px solid var(--hora-yellow); }
body.sishora-ready .btn-primary { background-color: var(--hora-blue); border-color: var(--hora-blue); }
body.sishora-ready a { --tblr-link-color-rgb: 47,77,135; }
body.sishora-ready .copyright { display: none !important; }

/* SISHORA pages */
.sishora-page { width: min(1180px, calc(100% - 40px)); margin: 30px auto 70px; }
.sishora-page-heading { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 26px; }
.sishora-eyebrow { display: block; color: var(--hora-blue); font-size: .76rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 8px; }
.sishora-page-heading h1 { margin: 0 0 8px; color: var(--hora-blue-dark); font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -.035em; }
.sishora-page-heading p { margin: 0; color: var(--hora-muted); font-size: 1rem; }
.sishora-env { white-space: nowrap; border: 1px solid #e7ba00; background: var(--hora-yellow-soft); color: #775f00; padding: 8px 12px; border-radius: 999px; font-size: .73rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.sishora-module-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.sishora-module-card { min-height: 176px; display: flex; flex-direction: column; padding: 24px; background: #fff; color: var(--hora-ink); border: 1px solid var(--hora-line); border-radius: var(--hora-radius); text-decoration: none; box-shadow: 0 8px 24px rgba(28,46,78,.06); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.sishora-module-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(28,46,78,.12); border-color: #b9c6de; color: var(--hora-ink); }
.sishora-module-card i { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 11px; background: var(--hora-blue-soft); color: var(--hora-blue); font-size: 1.45rem; margin-bottom: 20px; }
.sishora-module-card strong { color: var(--hora-blue-dark); font-size: 1rem; margin-bottom: 6px; }
.sishora-module-card span { color: var(--hora-muted); font-size: .83rem; line-height: 1.45; }
.sishora-queue-shell { min-height: 390px; background: #fff; border: 1px solid var(--hora-line); border-radius: var(--hora-radius); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 45px 24px; box-shadow: 0 8px 26px rgba(28,46,78,.06); }
.sishora-placeholder-icon { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 20px; color: var(--hora-blue); background: var(--hora-blue-soft); font-size: 2rem; margin-bottom: 18px; }
.sishora-queue-shell h2 { color: var(--hora-blue-dark); margin: 0 0 8px; }
.sishora-queue-shell > p { max-width: 560px; color: var(--hora-muted); }
.sishora-queue-preview { width: min(560px, 100%); margin: 24px auto; padding: 16px; border: 1px solid var(--hora-line); border-radius: 12px; background: #fafbfc; }
.sishora-queue-preview span { display: block; height: 10px; border-radius: 5px; background: #e7ebf1; margin: 9px 0; }
.sishora-queue-preview span:nth-child(2) { width: 78%; }
.sishora-queue-preview span:nth-child(3) { width: 58%; }
.sishora-disabled { border: 1px solid #d8dde5; color: #7d8798; background: #f3f5f8; }
.sishora-access-note { display: flex; gap: 10px; flex-direction: column; padding: 18px 20px; margin-bottom: 18px; border-left: 4px solid var(--hora-yellow); border-radius: 10px; background: var(--hora-yellow-soft); color: #5f510d; }
.sishora-access-note span { font-size: .88rem; }
.sishora-access-form { background: #fff; border: 1px solid var(--hora-line); border-radius: var(--hora-radius); box-shadow: 0 8px 24px rgba(28,46,78,.06); overflow: hidden; }
.sishora-access-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 18px; border-bottom: 1px solid var(--hora-line); }
.sishora-access-actions.bottom { border-top: 1px solid var(--hora-line); border-bottom: 0; }
.sishora-access-table-wrap { overflow-x: auto; }
.sishora-access-table { width: 100%; min-width: 1600px; border-collapse: separate; border-spacing: 0; }
.sishora-access-table th, .sishora-access-table td { padding: 11px 10px; border-right: 1px solid var(--hora-line); border-bottom: 1px solid var(--hora-line); text-align: center; font-size: .78rem; }
.sishora-access-table thead th { position: sticky; top: 0; z-index: 1; background: var(--hora-blue-dark); color: #fff; white-space: nowrap; writing-mode: vertical-rl; transform: rotate(180deg); height: 150px; }
.sishora-access-table thead th:first-child { left: 0; z-index: 3; min-width: 170px; writing-mode: initial; transform: none; height: auto; text-align: left; }
.sishora-access-table tbody th { position: sticky; left: 0; z-index: 2; min-width: 170px; background: #fff; text-align: left; color: var(--hora-blue-dark); }
.sishora-access-table tbody th small { display: block; color: var(--hora-muted); font-weight: 500; margin-top: 3px; }
.sishora-access-table tbody tr:hover td, .sishora-access-table tbody tr:hover th { background: #f8faff; }
.sishora-access-table label { display: grid; place-items: center; cursor: pointer; min-width: 30px; }
.sishora-access-table input { width: 18px; height: 18px; accent-color: var(--hora-blue); }
.sishora-assistant { position: fixed; right: 24px; bottom: 22px; z-index: 1030; display: flex; align-items: center; gap: 9px; padding: 12px 16px; border-radius: 999px; background: var(--hora-yellow); color: var(--hora-blue-dark); text-decoration: none; font-weight: 800; box-shadow: 0 12px 30px rgba(32,56,102,.22); }
.sishora-assistant:hover { color: var(--hora-blue-dark); transform: translateY(-2px); }

@media (max-width: 1100px) {
  .sishora-module-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .welcome-anonymous .main-content-card > .card-body { grid-template-columns: 1fr; }
  .welcome-anonymous .sishora-login-brand { min-height: 220px; padding: 32px; }
  .sishora-login-brand img { width: 220px; margin-bottom: 28px; }
  .welcome-anonymous .main-content-card form { padding: 36px 30px; }
  body:not(.welcome-anonymous) { padding-left: 0; }
  body:not(.welcome-anonymous)::before { display: none; }
  .sishora-sidebar { transform: translateX(-105%); transition: transform .22s ease; }
  body.sishora-menu-open .sishora-sidebar { transform: translateX(0); }
  .sishora-menu-toggle { display: grid; place-items: center; position: fixed; left: 12px; top: 12px; z-index: 1050; width: 42px; height: 42px; border: 0; border-radius: 10px; background: var(--hora-blue); color: #fff; box-shadow: 0 5px 18px rgba(0,0,0,.2); }
  .sishora-page { width: min(100% - 24px, 1180px); margin-top: 72px; }
}
@media (max-width: 560px) {
  .sishora-module-grid { grid-template-columns: 1fr; }
  .sishora-page-heading { flex-direction: column; }
  .sishora-assistant span { display: none; }
  .sishora-assistant { width: 50px; height: 50px; padding: 0; justify-content: center; }
}
.sishora-commercial-tabs { display:flex; gap:8px; margin:0 0 18px; padding:6px; border:1px solid #dfe6ee; border-radius:12px; background:#fff; }
.sishora-commercial-tabs a { padding:10px 16px; border-radius:8px; color:#344054; font-weight:600; text-decoration:none; }
.sishora-commercial-tabs a.active { background:#163a5f; color:#fff; }
.sishora-operation-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.sishora-operation-grid article { display:flex; flex-direction:column; gap:5px; padding:16px; border:1px solid #dfe6ee; border-radius:12px; background:#fff; }
.sishora-operation-grid article.active { border-color:#2d6a9f; box-shadow:0 0 0 1px #2d6a9f; }
.sishora-operation-grid span { color:#667085; font-size:.82rem; font-weight:700; text-transform:uppercase; }
.sishora-operation-grid strong { color:#163a5f; }
.sishora-operation-grid small { color:#667085; }
.sishora-commercial-frame { display:block; width:100%; min-height:680px; height:calc(100dvh - 330px); border:1px solid #dfe6ee; border-radius:12px; background:#f2f5f9; }
.sishora-commercial-empty { padding:48px 24px; border:1px solid #dfe6ee; border-radius:12px; background:#fff; text-align:center; }
.sishora-commercial-empty i { color:#2d6a9f; font-size:42px; }
.sishora-commercial-empty .btn i { color:inherit; font-size:1rem; }
.sishora-commercial-note { display:block; margin-top:14px; color:#667085; }
.sishora-inbox{display:grid;grid-template-columns:280px 1fr;min-height:620px;border:1px solid #dfe6ee;border-radius:12px;overflow:hidden;background:#fff}.sishora-inbox aside{border-right:1px solid #dfe6ee;background:#f8fafc}.sishora-inbox-title,.sishora-inbox main>header{display:flex;align-items:center;justify-content:space-between;min-height:62px;padding:12px 16px;border-bottom:1px solid #dfe6ee}.sishora-inbox-title button{border:0;background:transparent;color:#2d6a9f}.sishora-conversation{display:flex;width:100%;flex-direction:column;gap:4px;padding:14px 16px;border:0;border-bottom:1px solid #e8edf3;background:transparent;text-align:left}.sishora-conversation.active{background:#eaf2f9;box-shadow:inset 3px 0 #2d6a9f}.sishora-conversation small,.sishora-inbox header small{display:block;color:#667085}.sishora-inbox main{display:grid;grid-template-rows:auto 1fr auto;min-width:0}.sishora-message-list{padding:20px;overflow:auto;background:#f5f7fa}.sishora-message{width:fit-content;max-width:72%;margin:0 0 12px;padding:10px 13px;border-radius:12px;background:#fff;box-shadow:0 1px 2px rgba(16,24,40,.08)}.sishora-message.outgoing{margin-left:auto;background:#dcecf8}.sishora-message small{color:#667085;font-size:.75rem}.sishora-message p{margin:3px 0 0;white-space:pre-wrap}.sishora-inbox form{display:flex;gap:10px;padding:14px;border-top:1px solid #dfe6ee}.sishora-inbox textarea{flex:1;resize:vertical;border:1px solid #cfd8e3;border-radius:8px;padding:10px}.sishora-muted,.sishora-error{padding:18px;color:#667085}.sishora-error{color:#b42318}@media(max-width:800px){.sishora-inbox{grid-template-columns:1fr}.sishora-inbox aside{border-right:0;border-bottom:1px solid #dfe6ee;max-height:220px;overflow:auto}}
@media (max-width:900px) { .sishora-operation-grid { grid-template-columns:1fr; } .sishora-commercial-tabs { overflow-x:auto; } }
