/* Shared visual system. Legacy layout rules live in the legacy cascade layer. */
:root {
  color-scheme: light;
  --primary: #a3283b; --primary-dark: #852033; --primary-soft: #f9edf0;
  --bg-page: #f5f5f8; --bg-card: #fff; --text-main: #202a3c; --text-muted: #667085;
  --border: #e5e8ef; --success: #168369; --error: #b42338; --info: #3267b1;
  --shadow-soft: 0 4px 20px #18243a06, 0 1px 3px #18243a04;
  --card: #fff; --ink: #202a3c; --muted: #667085; --accent: #a3283b; --accent-dark: #852033;
  --green: #14755b; --green-bg: #e9f7f0; --amber: #94600e; --amber-bg: #fff5df;
  --red: #b42338; --red-bg: #fff0f2; --blue: #3267b1; --blue-bg: #edf3ff;
  --gray: #667085; --gray-bg: #f0f2f6; --darkred: #852033; --darkred-bg: #f9edf0;
}
body { font-family: 'Segoe UI', Inter, sans-serif; background: var(--bg-page); color: var(--text-main); line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button:disabled { cursor: wait; opacity: .55; transform: none; }
:focus-visible { outline: 3px solid #377cbd; outline-offset: 4px; }
::selection { background: #efd6dc; color: #602133; }
a { color: var(--primary); }
input, select, textarea, .form-input, .corp-input, .corp-select, .corp-textarea,
.dashboard-panel .form-input, .field input, .field select, .field textarea, .toolbar input[type=text], .toolbar select {
  color: var(--text-main); background: #fff; border: 1px solid #d8dee8; border-radius: 10px;
  padding: .75rem .9rem; min-height: 44px; font-size: .875rem; box-shadow: 0 1px 2px #18243a03;
  transition: border-color .18s, box-shadow .18s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px #a3283b14; }
input::placeholder, textarea::placeholder { color: #8993a4; }
input:disabled, input[readonly] { background: #f4f6f9; color: #667085; }
select option, .corp-select option { background: white; color: var(--text-main); }
input[type=file] { max-width: 100%; }
input[type=file]::file-selector-button { border: 0; border-radius: 6px; background: var(--primary-soft); color: var(--primary); padding: .5rem .7rem; margin-right: .7rem; cursor: pointer; }
label, .form-label, .corp-label, .field label { color: #475467; font-size: .8rem; font-weight: 600; text-transform: none; letter-spacing: 0; }
.btn-primary, .btn-login, .btn-submit-ticket {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 44px;
  padding: .75rem 1.1rem; color: white; background: var(--primary); border: 1px solid var(--primary);
  border-radius: 10px; font-size: .83rem; font-weight: 600; text-decoration: none; text-transform: none;
  letter-spacing: 0; box-shadow: 0 3px 6px #a3283b13; cursor: pointer; transition: background .18s, transform .18s;
}
.btn-primary:hover, .btn-login:hover, .btn-submit-ticket:hover { background: var(--primary-dark); color: #fff; border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 5px 12px #a3283b1c; }
.btn-secondary, .btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 40px; padding: .65rem .9rem; border: 1px solid var(--border); background: white; color: #475467; font-size: .8rem; font-weight: 600; border-radius: 9px; text-decoration: none; cursor: pointer; }
.btn-secondary:hover, .btn-ghost:hover { background: #f6f7fa; border-color: #cbd2df; color: var(--text-main); }
.btn-danger { background: var(--red-bg); color: var(--red); border: 1px solid #f5cbd3; border-radius: 9px; min-height: 40px; cursor: pointer; }
.btn-sm { min-height: 34px; padding: .4rem .7rem; }
.app-page { background: var(--bg-page); color: var(--text-main); }
.workspace-video, .workspace-video-veil { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.workspace-video { object-fit: cover; z-index: -2; }
.workspace-video-veil { z-index: -1; background: linear-gradient(125deg, #f7f7faef, #f4f5f9da 60%, #f8f4f6e8); }
.app-page { isolation: isolate; background: #e9edf4; }
.app-page .dashboard-panel, .app-page .chart-card, .app-page .org-section { background: #ffffffed; }
.dashboard-layout { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100svh; padding: 0; }
.sidebar { position: sticky; top: 0; height: 100svh; overflow-y: auto; display: flex; flex-direction: column; padding: 26px 16px 20px; background: radial-gradient(ellipse at 0 0, #374058, transparent 65%), linear-gradient(175deg, #192539, #111b2d); border: 0; color: #c2cad8; backdrop-filter: none; transform: none; }
.sidebar-brand { display: block; margin: 0 0 28px; padding: 0 10px; }
.sidebar-brand img { width: 184px; filter: brightness(0) invert(1); }
.workspace-label { display: block; color: #96a3b9; font-size: .62rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; padding: 13px 13px 10px; }
.sidebar-nav { position: static; display: flex; flex-direction: column; background: transparent; border: 0; box-shadow: none; padding: 0; gap: 6px; }
.sidebar-link { display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 12px 13px; min-height: 45px; border-radius: 9px; color: #b9c3d5; font-size: .81rem; font-weight: 500; text-decoration: none; border: 1px solid transparent; }
.sidebar-link span { width: 20px; text-align: center; font-size: .95rem; }
.sidebar-link:hover { color: #fff; background: #ffffff09; }
.sidebar-link.active { color: #fff; background: linear-gradient(100deg, #a3283b, #862439); border-color: #c04a5b55; box-shadow: 0 5px 16px #090f2026; }
.sidebar-note { margin-top: 32px; padding: 17px 14px; border: 1px solid #ffffff12; border-radius: 12px; background: #ffffff04; font-size: .73rem; color: #aebbd0; }
.sidebar-note strong { display: block; color: #fff; margin: 8px 0 5px; font-size: .82rem; }
.sidebar-note i { color: #e8a4ae; }
.sidebar-footer { display: block; margin-top: auto; padding: 24px 12px 0; color: #aebbd0; font-size: .72rem; }
.sidebar-logout { display: flex; gap: 9px; align-items: center; color: #d2d9e6; margin-top: 15px; font-size: .76rem; padding: 8px 0; }
.online-dot { background: #6ab99b; box-shadow: none; }
.dashboard-main { padding: 0 36px 56px; width: 100%; min-width: 0; max-width: 1640px; }
.workspace-topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); margin-bottom: 28px; color: var(--text-muted); font-size: .74rem; }
.workspace-topbar strong { color: var(--text-main); font-weight: 600; }
.workspace-topbar i { color: var(--primary); margin-right: 8px; }
.workspace-date { text-transform: capitalize; white-space: nowrap; }
.dashboard-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; padding-block: 8px 10px; }
.dashboard-header h1 { color: #202a3c; font-size: clamp(1.65rem, 2.3vw, 2rem); letter-spacing: -.045em; font-weight: 700; line-height: 1.2; margin: 0 0 9px; }
.dashboard-header h1 span { color: inherit; }
.header-copy { color: var(--text-muted); font-size: .85rem; max-width: 660px; line-height: 1.7; }
.header-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.eyebrow { color: var(--primary); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; margin-bottom: 10px; }
.dashboard-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 25px; }
.kpi-card { display: flex; flex-direction: column; align-items: flex-start; position: relative; gap: 14px; padding: 23px; background: linear-gradient(135deg, #fff, #fafbfe); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-soft); }
.kpi-card p { font-size: .77rem; color: var(--text-muted); }
.kpi-card strong { font-size: 2.25rem; color: var(--text-main); font-weight: 650; letter-spacing: -.055em; margin: 5px 0 0; }
.kpi-icon { width: 37px; height: 37px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); }
.icon-success { background: #eaf7f1; color: #178468; }.icon-info { background: #edf3ff; color: #436fb0; }.icon-warning { background: #fff4e4; color: #ac7426; }
.dashboard-panel, .chart-card, .org-section { display: block; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-soft); }
.dashboard-panel { padding: 24px; }
.panel-heading { align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.panel-heading h2, .chart-card h3 { color: var(--text-main); font-size: .98rem; font-weight: 650; letter-spacing: -.02em; }
.panel-heading a { color: var(--primary); }
.charts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 25px; }
.chart-card { padding: 23px; min-width: 0; }
.chart-card h3 { min-height: 36px; margin-bottom: 12px; }
.chart-container { background: transparent; border: 0; box-shadow: none; height: 255px; width: 100%; }
.inventory-charts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin-bottom: 22px; }.inventory-chart-canvas { position: relative; height: 190px; }
.recent-table-wrap, .table-scroll { border: 1px solid var(--border); border-radius: 10px; overflow-x: auto; background: #fff; }
table { color: var(--text-main); border-collapse: collapse; }
th, .recent-table th, .inv-table thead th { color: #667085; background: #f8f9fc; padding: 13px 16px; font-size: .65rem; font-weight: 600; letter-spacing: .06em; border-bottom: 1px solid var(--border); white-space: nowrap; }
td, .recent-table td, .inv-table tbody td { color: #344054; padding: 16px; font-size: .8rem; border-bottom: 1px solid #edf0f5; line-height: 1.6; }
tbody tr:hover { background: #fafbfd; }
.recent-table tr:last-child td { border-bottom: 0; }
.badge { border: 0; font-size: .67rem; font-weight: 600; padding: .3rem .65rem; border-radius: 6px; }
.badge-Activo { color: var(--green); background: var(--green-bg); }.badge-Enbodega { color: var(--blue); background: var(--blue-bg); }
.wrap { padding: 0; }.toolbar { background: #fff; padding: 15px; gap: 12px; }.toolbar input[type=text] { min-width: 160px; }
.tabs { overflow-x: auto; gap: 6px; border: 0; padding: 5px; border-radius: 11px; background: #eaeef4; width: fit-content; max-width: 100%; }
.tab-btn { white-space: nowrap; font-size: .78rem; padding: 9px 15px; border-radius: 8px; color: var(--text-muted); }
.tab-btn.active { color: var(--primary); background: white; box-shadow: 0 2px 5px #1722370c; }
.banner { background: #eef3f9; color: #4e627e; border: 1px solid #dfe7f1; font-size: .78rem; border-radius: 10px; }
.clickable-name { color: var(--primary); }.count-pill { background: #f2f4f8; color: var(--text-muted); white-space: nowrap; }
.inv-table { min-width: 0 !important; table-layout: auto; }.inv-table th:first-child { width: 150px; }.inv-table th:last-child { width: 120px; }.inv-table td:nth-child(2) { overflow-wrap: anywhere; }.corp-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin-bottom: 20px; }
.modal-overlay, .ticket-modal { background: #101c32a6; backdrop-filter: blur(5px); z-index: 2000; padding: 24px; overflow-y: auto; }
.modal-overlay { display: none; position: fixed; inset: 0; align-items: flex-start; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal-content, .modal-ficha { color: var(--text-main); background: white; border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 30px 100px #101c3240; max-height: calc(100svh - 48px); overflow-y: auto; }
.modal-header h2 { color: var(--text-main); }.modal-close { color: #667085; min-width: 36px; min-height: 36px; border-radius: 8px; }.modal-close:hover { background: #f0f2f7; }
.modal-body { background: #f8f9fc; }.section { background: #fff; border-color: var(--border); box-shadow: none; backdrop-filter: none; }.section h3 { color: #344054; }.subform { background: #f8f9fc; }
.corporate-form-container { background: white; border: 1px solid var(--border); border-top: 3px solid var(--primary); box-shadow: var(--shadow-soft); padding: 35px; border-radius: 16px; margin: 0 auto; }
.corp-title { color: var(--text-main); font-size: 1.3rem; text-transform: none; letter-spacing: -.025em; border-color: var(--border); }.corp-title span { color: var(--primary); }.corp-subtitle { color: var(--text-muted); }
.file-upload-wrapper { background: #fafbfd; border: 1.5px dashed #c8d0df; border-radius: 12px; }.file-upload-wrapper:hover { background: #f9f2f4; border-color: var(--primary); }
.file-upload-wrapper i { color: var(--primary); }.file-upload-wrapper p { color: #475467; }
#createTicketForm>label { display: block; margin-top: 19px; margin-bottom: 8px; }#createTicketForm>textarea { min-height: 135px; resize: vertical; }
.file-upload-zone { background: #fafbfd; border: 1px dashed #bdc7d8; border-radius: 12px; padding: 25px; text-align: center; cursor: pointer; }.file-upload-zone:hover { border-color: var(--primary); background: #faf5f6; }
.btn-submit-ticket { width: 100%; }.ticket-detail-text { background: #f8f9fc; color: var(--text-main); border-color: var(--border); }
.ticket-meta { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; padding: 18px; background: #f8f9fc; border-radius: 12px; margin-bottom: 22px; font-size: .8rem; overflow-wrap: anywhere; }
.ticket-search { min-width: 240px; }.ticket-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.org-section { padding: 25px; margin-bottom: 22px; border-top: 1px solid var(--border); }.org-section-title { font-size: 1rem; border-bottom: 1px solid var(--border); padding-bottom: 18px; }
.org-card, .org-leader { background: #fafbfd; color: var(--text-main); border: 1px solid var(--border); border-radius: 11px; padding: 18px; }
.org-leader { background: #f8f2f4; border-left: 3px solid var(--primary); }.org-avatar { background: #e9edf5; color: #465875; flex-shrink: 0; }.org-leader-avatar { background: var(--primary); color: white; flex-shrink: 0; }
.org-card h5, .org-leader h4 { color: var(--text-main) !important; text-transform: none; }.org-card p, .org-leader p, .dir-email { color: var(--text-muted) !important; }
.org-card button[title], .org-leader button[title] { background: #fff !important; color: #667085 !important; border: 1px solid var(--border) !important; }
.org-card:hover { border-color: #c8cedb; box-shadow: 0 6px 16px #202a3c08; }
.directory-leader-option { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; padding: 12px; border-radius: 9px; background: #f7f8fb; }.directory-leader-option input { min-height: auto; width: 18px; height: 18px; }.directory-form-feedback { min-height: 1.25rem; margin: 0 0 10px; color: var(--error); font-size: .78rem; }
.org-grid { grid-template-columns: repeat(auto-fill,minmax(min(100%,260px),1fr)); }
.upload-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 25px; }
.upload-step { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 20px; font-size: .8rem; color: var(--text-muted); }.upload-step b { display: block; color: var(--text-main); font-size: .9rem; margin: 9px 0 5px; }.upload-step span { color: var(--primary); font-weight: 700; font-size: .68rem; letter-spacing: .1em; }
.skip-link { position: fixed; top: -60px; left: 20px; z-index: 5000; background: white; border-radius: 8px; padding: 12px; }.skip-link:focus { top: 12px; }
.toast { background: white; color: var(--text-main); border-color: var(--border); box-shadow: 0 12px 40px #17223720; min-width: min(300px,calc(100vw - 40px)); max-width: min(420px,calc(100vw - 40px)); }.toast p { color: var(--text-muted); }
body:not(.is-admin) .admin-only { display: none !important; }
.chat-starters[hidden] { display: none !important; }
.login-page { background: radial-gradient(ellipse at 5% 0%, #e3e8f3, transparent 60%), radial-gradient(ellipse at 100% 100%, #f1e0e6, transparent 50%), #f6f6f9; padding: 32px; min-height: 100svh; }
.login-shell { width: min(1180px,100%); min-height: 690px; grid-template-columns: 1.1fr 1fr; border-radius: 24px; border: 1px solid #e0e5ed; box-shadow: 0 24px 80px #17223712; background: #fff; }
.login-visual { background: #172237; padding: 48px; justify-content: flex-end; text-align: left; animation: none; }
.login-visual::before { display: none; }.login-visual video { opacity: 1 !important; filter: none !important; }.visual-orb { display: none; }
.login-visual::after { content: ''; position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg,#0c193226 15%,#11223b44 50%,#121e37df); }
.login-visual-content { text-align: left; width: 100%; padding-bottom: 30px; }.login-visual-content::before { content: ''; display: block; width: 42px; height: 4px; border-radius: 5px; background: #e8a4ae; margin-bottom: 24px; }.login-visual .eyebrow { color: #e4a0ae; }.animate-title { font-size: clamp(2.1rem,3.3vw,3.2rem); font-weight: 600; line-height: 1.13; text-shadow: none; letter-spacing: -.05em; animation: none; opacity: 1; }
.login-visual-description { color: #bdc8da; font-size: .92rem; line-height: 1.85; margin: 24px 0 35px; max-width: 370px; }
.login-features { display: grid; gap: 15px; }.login-feature { display: flex; align-items: center; gap: 14px; font-size: .81rem; color: #dce3ee; }.login-feature i { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #ffffff20; border-radius: 9px; color: #e9b3bd; }
.login-card { background: #fff; padding: 44px 50px; }.login-card-brand { justify-content: flex-start; margin-bottom: 30px; }.login-massive-logo { max-width: 290px; }
.login-intro h1 { font-size: 1.8rem; color: var(--text-main); margin: 0 0 10px; }.login-intro>p { color: var(--text-muted); font-size: .85rem; }.login-hint { background: #f7f8fb; border: 1px solid var(--border); border-radius: 9px; padding: 12px; margin-top: 18px; font-size: .76rem; color: var(--text-muted); }
.login-form { gap: 18px; }.form-field { display: flex; flex-direction: column; gap: 7px; }.login-form input { width: 100%; }.btn-login { width: 100%; justify-content: space-between; margin: 4px 0 0; }
.login-feedback { color: var(--error); min-height: 20px; }.login-footer { margin-top: 15px; padding-top: 18px; font-size: .72rem; color: var(--text-muted); }.login-socials { border-color: var(--border) !important; }
.chatbot-container { bottom: 24px !important; right: 24px !important; z-index: 1900 !important; }
.chatbot-btn { background: var(--primary) !important; box-shadow: 0 8px 28px #85203330 !important; width: 54px !important; height: 54px !important; font-size: 21px !important; }
.chatbot-window { width: min(390px,calc(100vw - 32px)) !important; height: min(570px,calc(100svh - 120px)) !important; background: white !important; border: 1px solid var(--border) !important; border-radius: 18px !important; box-shadow: 0 20px 70px #17223730 !important; bottom: 70px !important; }
.chat-header { background: #172237 !important; padding: 18px !important; }.chat-body { background: #f7f8fb !important; min-height: 70px; overscroll-behavior: contain; }.msg-bot { background: white !important; color: #344054 !important; border-color: var(--border) !important; }.msg-user { background: var(--primary) !important; color: white !important; }
.chat-footer-wrap, .chat-footer, .typing { background: white !important; }.chat-footer-wrap { border-color: var(--border) !important; }.chat-input { min-width: 0; width: 0; background: #f6f7fa !important; color: var(--text-main) !important; border-color: var(--border) !important; border-radius: 10px !important; padding: 9px 12px !important; }
.chat-send { background: var(--primary) !important; flex-shrink: 0; }.btn-attach { background: #f3f5f9 !important; color: #667085 !important; flex-shrink: 0; border-color: var(--border) !important; }.chat-close { border: 0; background: none; padding: 5px; color: #c9d2e1; }.chat-starters { display: flex; gap: 7px; flex-wrap: wrap; padding: 0 15px 12px; background: #f7f8fb; }.chat-starters button { padding: 7px 10px; border: 1px solid #dbe1eb; background: white; border-radius: 20px; color: #536177; font-size: .72rem; cursor: pointer; }

/* Shared controls and focused content layouts. */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.workspace-brand { display: flex; align-items: center; gap: 3px; font-size: .86rem; }
.workspace-context, .workspace-account { display: flex; align-items: center; gap: 16px; }
.workspace-account { border-left: 1px solid #d8dee8; padding-left: 18px; font-size: .76rem; font-weight: 600; color: #46536b; }
.workspace-avatar { display: grid; place-items: center; height: 34px; width: 34px; border-radius: 11px; color: #852033; background: #f1e1e6; font-weight: 700; font-size: .75rem; }
.page-heading { position: relative; padding-left: 72px; min-height: 56px; }
.page-icon { position: absolute; top: 0; left: 0; display: grid; place-items: center; height: 54px; width: 54px; background: linear-gradient(135deg,#fff,#f6e8ed); border: 1px solid #ecd9e0; border-radius: 17px; color: var(--primary); font-size: 1.25rem; box-shadow: 0 4px 12px #85203308; }
.sidebar-help { display: flex; align-items: center; gap: 10px; margin: 32px 4px 16px; padding: 14px 12px; color: #f1d4dc; background: #ffffff06; border: 1px solid #ffffff14; border-radius: 11px; font-size: .75rem; text-align: left; cursor: pointer; }
.sidebar-help span { flex: 1; }.sidebar-help i:last-child { font-size: .65rem; color: #a6adc1; }.sidebar-help:hover { background: #ffffff10; }
.motion-toggle { display: grid; place-items: center; width: 30px; height: 30px; min-height: 30px; padding: 0; border: 1px solid #d8dee8; background: #ffffffb8; color: #667085; border-radius: 50%; cursor: pointer; font-size: .65rem; flex-shrink: 0; }
.login-visual>.motion-toggle { position: absolute; bottom: 24px; right: 24px; z-index: 11; background: #ffffff16; border-color: #ffffff50; color: white; width: 36px; height: 36px; }
.password-field { position: relative; }.password-field input { padding-right: 48px; }.password-toggle { position: absolute; inset: 2px 4px 2px auto; width: 40px; border: 0; border-radius: 8px; color: #7c8799; background: transparent; cursor: pointer; }.password-toggle:hover { color: var(--primary); background: #f7f3f5; }
.ticket-overview { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 24px; }
.ticket-stat { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 20px; border: 1px solid #e1e5ed; border-radius: 13px; background: #ffffffeb; color: #667085; cursor: pointer; text-align: left; transition: border-color .2s, background .2s; }
.ticket-stat>span { display: flex; gap: 8px; align-items: center; font-size: .79rem; }.ticket-stat strong { color: #29354a; font-size: 1.7rem; font-weight: 650; letter-spacing: -.04em; }
.ticket-stat:hover { border-color: #c59ca7; }.ticket-stat.is-selected { background: #f9eff2; border-color: #d9aab6; }.ticket-stat.is-selected strong { color: #852033; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #98a2b3; }.status-open { background: #b05268; }.status-progress { background: #c38a25; }.status-resolved { background: #2a9071; }
.ticket-list { width: 100%; min-width: 0; table-layout: auto; }.ticket-list th { text-transform: uppercase; }.ticket-list td { vertical-align: middle; }.ticket-reference strong { color: #788396; font-weight: 600; font-size: .73rem; }.ticket-reference { white-space: nowrap; }
.ticket-list small { display: block; color: #8892a3; font-size: .7rem; margin-top: 5px; }.ticket-person { max-width: 190px; }.ticket-subject { min-width: 180px; }.ticket-subject strong { color: #25314a; font-size: .84rem; font-weight: 600; }.ticket-state { white-space: nowrap; }
.ticket-action { white-space: nowrap; }.ticket-action button { border-color: transparent; background: #f5f6fa; font-size: .74rem; }.ticket-action button:hover { color: var(--primary); background: #f6e9ee; }
.ticket-list .priority-label { font-size: .65rem; }.ticket-list .priority-high { color: #b33b4e; }.ticket-list .priority-low { color: #41816e; }
.empty-state { padding: 42px 20px !important; text-align: center; color: var(--text-muted); font-size: .85rem; }.empty-state button { margin-left: 10px; }
.directory-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding: 16px; margin: 0 auto 24px; max-width: 1200px; border: 1px solid var(--border); background: #ffffffec; border-radius: 14px; }
.search-field { position: relative; flex: 1; min-width: 210px; }.search-field>i { position: absolute; top: 50%; left: 14px; transform: translateY(-50%); color: #8c95a6; font-size: .85rem; }.search-field input { width: 100%; padding-left: 39px; }.directory-toolbar select { max-width: 310px; }.result-count { color: var(--text-muted); font-size: .72rem; }
.directory-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; padding-top: 18px; }.directory-field { min-width: 0; }.directory-field:nth-of-type(3), .directory-field-wide, .directory-leader-option, .directory-form-feedback, .directory-form-grid>button { grid-column: 1/-1; }.directory-form-grid .corp-input { width: 100%; }.directory-form-grid label { display: block; margin-bottom: 6px; }.directory-form-grid .directory-leader-option { display: flex; margin: 0; font-size: .82rem; }.directory-form-feedback { margin: 0; }.directory-modal-title { padding-right: 35px; }
.directory-person-card { position: relative; padding: 14px; gap: 8px; align-items: flex-start; }.directory-person-detail { flex: 1; display: flex; align-items: center; gap: 12px; padding: 0; min-width: 0; border: none; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; }.directory-person-detail .org-info { min-width: 0; }.directory-person-detail h4, .directory-person-detail h5 { white-space: normal; margin: 0; line-height: 1.4; font-size: .88rem; }.directory-person-role { font-size: .72rem; line-height: 1.5; margin: 3px 0 0; color: var(--text-muted); }
.directory-card-actions { display: flex; flex-direction: column; gap: 6px; }.directory-card-actions button { border-radius: 7px; min-width: 28px; min-height: 28px; padding: 5px; font-size: .7rem; cursor: pointer; }
.directory-leaders { margin-bottom: 16px; }.directory-leaders .org-leader { margin: 0; height: 100%; }.directory-contact-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: .86rem; overflow-wrap: anywhere; }.directory-contact-row>i { margin-top: 5px; color: var(--primary); width: 18px; }.directory-contact-row small { display: block; font-size: .7rem; color: var(--text-muted); margin-bottom: 3px; }
.draft-notice { padding: 16px; margin: 16px 0; border-radius: 10px; border: 1px solid #d7c0cc; background: #faf2f6; font-size: .83rem; color: #64485a; }.draft-notice>div { display: flex; gap: 8px; margin-top: 12px; }
.chart-detail-list { list-style: none; padding: 0; margin: 0; }.chart-detail-list li { padding: 13px; border-bottom: 1px solid var(--border); font-size: .85rem; }
.modal-ficha .modal-header, .modal-ficha .modal-footer { background: #fff; }.modal-ficha .modal-header { position: sticky; top: 0; z-index: 2; }.modal-ficha .modal-footer { position: sticky; bottom: 0; z-index: 2; border-top: 1px solid var(--border); }.modal-ficha .modal-body { overscroll-behavior: contain; }.modal-ficha .section:has(.mini-table) { overflow-x: auto; }
.chat-actions { background: #f7f8fb !important; border-top: 1px solid #edf0f5; padding-top: 10px !important; flex-shrink: 0; }
.chat-action { color: #536177 !important; background: #fff !important; border-color: #dbe1eb !important; font-size: .72rem !important; }
.chat-action-primary { color: #fff !important; background: var(--primary) !important; border-color: var(--primary) !important; }
.chat-footer-wrap, .chat-header, .chat-starters { flex-shrink: 0; }.chat-action:focus-visible { outline: 2px solid #377cbd; }.chat-action:hover { border-color: var(--primary) !important; }
@media (max-width:1180px) { .workspace-account>span:first-child { display: none; }.ticket-stat { padding: 15px; }.ticket-stat>span { font-size: .73rem; }.ticket-person { max-width: 150px; }.ticket-overview { gap: 10px; } }
@media (max-width:900px) { .sidebar-help { display: none; }.workspace-account { border: 0; padding: 0; }.workspace-context { gap: 10px; }.workspace-brand { font-size: .77rem; }.page-heading { padding-left: 62px; }.page-icon { width: 46px; height: 46px; border-radius: 14px; font-size: 1.1rem; }.workspace-context .motion-toggle { display: none; } }
@media (max-width:600px) {
  .workspace-context .workspace-date { display: none; }.workspace-brand { font-size: .78rem; }.page-heading { padding-left: 0; }.page-icon { display: none; }
  .ticket-overview { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 18px; }.ticket-stat { padding: 12px 14px; }.ticket-stat strong { font-size: 1.45rem; }
  .ticket-list, .ticket-list tbody { display: block; }.ticket-list thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .ticket-list tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 16px 12px; border-bottom: 1px solid var(--border); }.ticket-list td { display: block; padding: 0; border: 0; }.ticket-list .ticket-person { grid-column: 1; grid-row: 3; color: #69748a; font-size: .73rem; max-width: none; }.ticket-list .ticket-reference { grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 8px; }.ticket-list .ticket-reference small { margin-top: 0; }.ticket-list .ticket-subject { grid-column: 1/-1; grid-row: 2; min-width: 0; }.ticket-list .ticket-state { grid-column: 2; grid-row: 1; text-align: right; }.ticket-list .ticket-action { grid-column: 2; grid-row: 3; }.ticket-list .ticket-state .priority-label { display: none; }.ticket-list td.empty-state { grid-column: 1/-1; }
  .directory-toolbar { padding: 12px; gap: 8px; }.directory-toolbar .search-field, .directory-toolbar select { width: 100%; min-width: 0; max-width: none; flex-basis: 100%; }.directory-form-grid { grid-template-columns: 1fr; gap: 12px; }
  .directory-person-card { padding: 13px; }.directory-person-detail h4 { font-size: .84rem; }.modal-ficha .modal-footer { flex-wrap: wrap; }.modal-ficha .modal-footer button { flex: 1 1 130px; }.modal-ficha .row-inline { flex-wrap: wrap; }
  .login-visual-content { padding-bottom: 6px; }.login-visual-content::before { width: 30px; margin-bottom: 16px; }
}

@media (min-width:1600px) { .dashboard-main { padding-inline: 48px; } }
@media (max-width:1150px) { .charts-grid { grid-template-columns: 1fr 1fr; }.charts-grid .chart-card:nth-child(3) { grid-column: 1/-1; }.dashboard-main { padding-inline: 24px; }.dashboard-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }.login-card { padding: 35px; }.login-visual { padding: 35px; } }
@media (max-width:900px) {
  .dashboard-layout { grid-template-columns: 1fr; padding-top: 66px; padding-bottom: 80px; }
  .sidebar { position: fixed; inset: 0 0 auto; height: 66px; padding: 10px 20px; flex-direction: row; align-items: center; justify-content: space-between; overflow: visible; z-index: 1000; }
  .sidebar-brand { margin: 0; padding: 0; }.sidebar-brand img { width: 160px; }.workspace-label, .sidebar-note { display: none; }
  .sidebar-footer { padding: 0; margin: 0; }.sidebar-logout { margin: 0; font-size: .72rem; }#userRoleDisplay { display: none; }
  .sidebar-nav { position: fixed; inset: auto 0 0; display: flex; flex-direction: row; gap: 2px; overflow-x: auto; background: #172237; padding: 8px 10px max(8px,env(safe-area-inset-bottom)); border-top: 1px solid #ffffff18; }
  .sidebar-link { flex: 1 0 70px; flex-direction: column; gap: 4px; justify-content: center; padding: 8px 6px; font-size: .6rem; min-height: 55px; white-space: nowrap; }.sidebar-link span { font-size: 1rem; }.sidebar-link.active { box-shadow: inset 0 2px #d66577; }
  .dashboard-main { padding: 0 20px 30px; }.workspace-topbar { height: 58px; margin-bottom: 23px; }.workspace-date { font-size: .65rem; }
  .login-shell { grid-template-columns: 1fr; min-height: 0; max-width: 570px; }.login-visual { padding: 30px; }.login-features { display: none; }.login-visual-description { margin: 16px 0 0; }.animate-title { font-size: 2rem; }.login-card { padding: 32px; }
  .chatbot-container { bottom: 94px !important; right: 16px !important; }.login-page .chatbot-container { bottom: 18px !important; }.chatbot-window { height: min(520px,calc(100svh - 230px)) !important; }.login-page .chatbot-window { height: min(520px,calc(100svh - 110px)) !important; }
}
@media (max-width:600px) {
  .inv-table th:first-child { width: 85px; }.inv-table th:last-child { width: 95px; }.inv-table thead th, .inv-table tbody td { padding: 12px 9px; }.inv-table .clickable-name { font-size: .8rem; }
  .dashboard-main { padding-inline: 14px; }.workspace-topbar { font-size: .66rem; }.workspace-topbar>span:first-child { max-width: 62%; }.workspace-date { white-space: normal; text-align: right; }
  .dashboard-header { gap: 15px; }.dashboard-header h1 { font-size: 1.65rem; }.header-copy { font-size: .79rem; }.header-actions { width: 100%; }.header-actions>a { flex: 1; }
  .dashboard-kpis { gap: 10px; }.kpi-card { padding: 16px; gap: 10px; }.kpi-card strong { font-size: 1.9rem; }.kpi-card p { font-size: .69rem; }
  .charts-grid, .inventory-charts { grid-template-columns: 1fr; }.charts-grid .chart-card:nth-child(3) { grid-column: auto; }.dashboard-panel, .chart-card, .org-section { padding: 17px; border-radius: 12px; }
  .panel-heading { align-items: stretch; }.panel-heading h2 { width: 100%; }.ticket-tools, .ticket-search { width: 100%; min-width: 0; }.ticket-tools select { width: 100%; }
  .toolbar { padding: 12px; }.toolbar input[type=text] { min-width: 100%; }.toolbar .spacer { width: 100%; margin: 0; }.toolbar .spacer button { width: 100%; }
  .modal-overlay, .ticket-modal { padding: 12px; }.modal-content, .modal-ficha { max-height: calc(100svh - 24px); border-radius: 13px; }.ticket-modal .modal-content { padding: 20px; }.modal-body { padding: 16px; }.modal-header { padding: 16px; }.ticket-meta { grid-template-columns: 1fr 1fr; }
  .grid-ficha, .grid-ficha.cols2, .grid-2-col, .corp-row, #formNuevoActivo { grid-template-columns: 1fr !important; }.corporate-form-container { padding: 22px; margin: 0; }.corporate-form-container .corp-title { font-size: 1.2rem; }
  .org-section>div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }.org-section-title { font-size: .9rem; }.upload-steps { grid-template-columns: 1fr; gap: 9px; }.upload-step { padding: 15px; }.upload-controls { flex-direction: column; align-items: stretch !important; }
  .login-page { padding: 14px; }.login-shell { border-radius: 17px; }.login-visual { padding: 26px; }.login-card { padding: 26px; }.login-massive-logo { max-width: 250px; }
}
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }.login-visual video, .workspace-video { display: none; } }
@media print { .sidebar, .workspace-topbar, .chatbot-container, .skip-link, .workspace-video, .workspace-video-veil { display: none !important; }.dashboard-layout { display: block; padding: 0; }.dashboard-main { padding: 0; }.app-page { background: white; } }

/* Directorio: Accesos directos de contacto (WhatsApp, Llamada, Correo) */
.directory-person-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 8px !important;
  position: relative;
  padding: 14px;
}
.dir-card-main-block {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.dir-card-contact-box {
  width: 100%;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.77rem;
}
.dir-card-contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
}
.dir-card-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.76rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  transition: color 0.15s ease;
}
.dir-card-contact-link:hover {
  color: var(--primary);
  text-decoration: underline;
}
.dir-card-contact-link i {
  color: var(--primary);
  width: 14px;
  text-align: center;
  flex-shrink: 0;
  font-size: 0.8rem;
}
.dir-card-contact-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dir-card-phone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.dir-card-phone-info {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.76rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dir-card-phone-info i {
  color: #0284c7;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
  font-size: 0.8rem;
}
.dir-card-action-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.dir-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  text-decoration: none;
  font-size: 0.82rem;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
  border: 1px solid transparent;
}
.dir-icon-btn:hover {
  transform: scale(1.1);
}
.dir-icon-btn:active {
  transform: scale(0.95);
}
.dir-icon-call {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}
.dir-icon-call:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}
.dir-icon-wa {
  background: #dcfce7;
  color: #15803d;
  border-color: #bbf7d0;
}
.dir-icon-wa:hover {
  background: #25D366;
  color: #ffffff;
  border-color: #25D366;
}

/* Modal de detalle directorio */
.dir-modal-val-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}
.dir-modal-link {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  word-break: break-all;
  transition: color 0.15s ease;
}
.dir-modal-link:hover {
  color: var(--primary);
  text-decoration: underline;
}
.dir-modal-phone-num {
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}
.dir-modal-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.dir-btn-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.dir-btn-mini:hover {
  transform: translateY(-1px);
}
.dir-btn-mini-mail {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}
.dir-btn-mini-mail:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}
.dir-btn-mini-call {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #bae6fd;
}
.dir-btn-mini-call:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}
.dir-btn-mini-wa {
  background: #dcfce7;
  color: #15803d;
  border-color: #bbf7d0;
}
.dir-btn-mini-wa:hover {
  background: #25D366;
  color: #ffffff;
  border-color: #25D366;
}

/* ==========================================
   Utilidades de Páginas (Inventario, Actas, Directorio)
========================================== */
.btn-excel {
  background-color: #10b981;
  color: #ffffff;
  border: 1px solid #059669;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
  transition: all 0.2s ease;
}
.btn-excel:hover {
  background-color: #059669;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.actas-upload-body {
  padding: 20px;
}

.actas-upload-description {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.upload-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.upload-status-msg {
  margin-top: 12px;
  font-size: 0.9rem;
  font-weight: 500;
}

.usuarios-panel-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.usuarios-stats-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.usuarios-search-input {
  min-width: 280px;
}

/* ==========================================================================
   LOZADA & PARTNERS — 2026 SENIOR PRO EXECUTIVE DESIGN SYSTEM
   High-Contrast Corporate SaaS UI + 1-Click Dark Tech Mode + iOS/Android Pro
========================================================================== */

/* 1. Ambient Mesh Background & Video Veil Refinement */
body.app-page {
  background-color: #eef2f9;
  background-image:
    radial-gradient(at 0% 0%, rgba(12, 45, 77, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(163, 40, 59, 0.07) 0px, transparent 48%),
    radial-gradient(at 50% 100%, rgba(37, 99, 235, 0.05) 0px, transparent 55%);
  background-attachment: fixed;
}

.workspace-video-veil {
  background: linear-gradient(135deg, rgba(238, 242, 249, 0.90) 0%, rgba(241, 245, 252, 0.86) 55%, rgba(248, 240, 243, 0.90) 100%);
  backdrop-filter: blur(2px);
}

/* 2. Floating Glass Topbar + Live DB Status + Theme Switcher */
.workspace-topbar {
  height: 60px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(203, 213, 225, 0.85);
  border-radius: 14px;
  padding: 0 20px;
  margin: 18px 0 22px;
  box-shadow: 0 8px 24px -6px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.workspace-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: #0f172a;
}

.workspace-brand i {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #a3283b 0%, #be123c 100%);
  color: #ffffff;
  margin-right: 2px;
  box-shadow: 0 4px 10px rgba(163, 40, 59, 0.28);
}

.workspace-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-left: 4px;
}

.live-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
  animation: pulseLiveDot 2s infinite;
}

@keyframes pulseLiveDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45); }
  50% { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  color: #1e293b;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.05);
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  border-color: #94a3b8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.theme-toggle-btn i {
  color: #a3283b;
  margin: 0 !important;
  font-size: 0.82rem;
}

.workspace-avatar {
  background: linear-gradient(135deg, #0C2D4D 0%, #1e3a8a 100%);
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(12, 45, 77, 0.25);
}

/* 3. Obsidian & Crimson Executive Sidebar */
.sidebar {
  background:
    radial-gradient(circle at 15% 0%, rgba(190, 18, 60, 0.26) 0%, transparent 48%),
    radial-gradient(circle at 85% 100%, rgba(30, 64, 175, 0.22) 0%, transparent 50%),
    linear-gradient(180deg, #071120 0%, #0c1b33 54%, #081326 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 8px 0 32px rgba(7, 17, 32, 0.22);
}

.sidebar-brand {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 14px;
  margin: 0 0 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.workspace-label {
  color: #94a3b8;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 6px 12px 10px;
}

.sidebar-link {
  position: relative;
  border-radius: 11px;
  padding: 11px 13px;
  color: #cbd5e1;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-link span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  transition: all 0.2s ease;
}

.sidebar-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.sidebar-link:hover span {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.sidebar-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, #be123c 0%, #881337 100%);
  border-color: rgba(251, 113, 133, 0.35);
  box-shadow: 0 8px 20px -4px rgba(190, 18, 60, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.sidebar-link.active span {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.sidebar-footer {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  margin-top: auto;
}

/* 4. Executive Dark-Navy & Crimson Hero Header Banner (.dashboard-header) */
.dashboard-header {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 15%, rgba(225, 29, 72, 0.32) 0%, transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(37, 99, 235, 0.22) 0%, transparent 50%),
    linear-gradient(125deg, #091526 0%, #102542 55%, #3b0d1e 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: 0 16px 36px -8px rgba(9, 21, 38, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.dashboard-header h1 {
  color: #ffffff !important;
  font-size: clamp(1.55rem, 2.2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0 0 6px;
}

.dashboard-header h1 span {
  background: linear-gradient(135deg, #fda4af 0%, #fb7185 50%, #fecdd3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}

.dashboard-header .header-copy {
  color: rgba(226, 232, 240, 0.86) !important;
  font-size: 0.88rem;
  margin: 0;
}

.dashboard-header .page-icon {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fda4af;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.dashboard-header .btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.dashboard-header .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
  transform: translateY(-1px);
}

.dashboard-header .btn-primary {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  box-shadow: 0 8px 20px -4px rgba(225, 29, 72, 0.55);
}

.dashboard-header .btn-primary:hover {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  transform: translateY(-2px);
}

/* 5. Color-Coded Multi-Layered KPI Cards (.kpi-card, .ticket-stat, .upload-step) */
.kpi-card {
  position: relative;
  overflow: hidden;
  flex-direction: row !important;
  align-items: center !important;
  gap: 16px !important;
  padding: 22px 22px !important;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(203, 213, 225, 0.85);
  border-radius: 16px;
  box-shadow: 0 10px 25px -6px rgba(15, 23, 42, 0.07), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
}

.kpi-card:nth-child(2)::before {
  background: linear-gradient(90deg, #059669, #34d399);
}

.kpi-card:nth-child(3)::before {
  background: linear-gradient(90deg, #d97706, #fbbf24);
}

.kpi-card:nth-child(4)::before {
  background: linear-gradient(90deg, #7c3aed, #c084fc);
}

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px -8px rgba(15, 23, 42, 0.13);
}

.kpi-icon {
  width: 52px !important;
  height: 52px !important;
  border-radius: 14px !important;
  font-size: 1.25rem !important;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 4px 12px rgba(15, 23, 42, 0.06);
}

.kpi-card p {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b !important;
  margin: 0 !important;
}

.kpi-card strong {
  font-size: 2.15rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  margin-top: 2px !important;
}

/* Ticket Stat Cards (tickets.html) */
.ticket-stat {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding: 18px 20px;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #cbd5e1;
  box-shadow: 0 6px 18px -4px rgba(15, 23, 42, 0.06);
  transition: all 0.2s ease;
}

.ticket-stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: #64748b;
}

.ticket-stat[data-ticket-state="todos"]::before { background: #be123c; }
.ticket-stat[data-ticket-state="Abierto"]::before { background: #e11d48; }
.ticket-stat[data-ticket-state="En Progreso"]::before { background: #d97706; }
.ticket-stat[data-ticket-state="Resuelto"]::before { background: #059669; }

.ticket-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -6px rgba(15, 23, 42, 0.12);
}

.ticket-stat.is-selected {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  border-color: #fda4af;
  box-shadow: 0 10px 24px -6px rgba(190, 18, 60, 0.18);
}

/* Upload Steps (acta.html) */
.upload-step {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #cbd5e1;
  border-top: 4px solid #0C2D4D;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 8px 22px -6px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease;
}

.upload-step:nth-child(2) { border-top-color: #be123c; }
.upload-step:nth-child(3) { border-top-color: #059669; }

.upload-step:hover { transform: translateY(-3px); }

.upload-step span {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #be123c;
  font-size: 0.68rem;
  font-weight: 800;
}

/* 6. Elevated Panels, Chart Cards & Enterprise Data Tables */
.dashboard-panel,
.chart-card,
.org-section,
.corporate-form-container {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid rgba(203, 213, 225, 0.9) !important;
  border-radius: 16px !important;
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.07), 0 2px 6px -1px rgba(15, 23, 42, 0.03) !important;
}

.panel-heading h2,
.chart-card h3,
.org-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.02em;
}

.panel-heading h2::before,
.chart-card h3::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 18px;
  border-radius: 99px;
  background: linear-gradient(180deg, #be123c 0%, #0C2D4D 100%);
  flex-shrink: 0;
}

/* Enterprise High-Contrast Navy Table Headers */
.recent-table-wrap,
.table-scroll {
  border: 1px solid #cbd5e1 !important;
  border-radius: 12px !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.recent-table thead th,
.inv-table thead th,
.ticket-list thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: linear-gradient(90deg, #0b192c 0%, #162a45 100%) !important;
  color: #f8fafc !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.07em !important;
  padding: 14px 16px !important;
  border-bottom: none !important;
}

.recent-table tbody tr,
.inv-table tbody tr,
.ticket-list tbody tr {
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.recent-table tbody tr:nth-child(even) td,
.inv-table tbody tr:nth-child(even) td {
  background-color: #fafbfd;
}

.recent-table tbody tr:hover td,
.inv-table tbody tr:hover td,
.ticket-list tbody tr:hover td {
  background-color: #f1f5f9 !important;
}

.recent-table tbody tr:hover td:first-child,
.inv-table tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 #be123c;
}

/* 7. Segmented Tabs & Toolbars (Inventario & Directorio) */
.tabs,
.directory-tabs-nav {
  background: #e2e8f0 !important;
  padding: 5px !important;
  border-radius: 12px !important;
  border: 1px solid #cbd5e1 !important;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tab-btn,
.directory-tab-btn {
  border-radius: 9px !important;
  font-weight: 700 !important;
  transition: all 0.2s ease !important;
}

.tab-btn.active,
.directory-tab-btn.active {
  background: linear-gradient(135deg, #0C2D4D 0%, #1e3a8a 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(12, 45, 77, 0.25) !important;
}

.toolbar,
.directory-toolbar {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 14px !important;
  padding: 16px 18px !important;
  box-shadow: 0 6px 20px -4px rgba(15, 23, 42, 0.05) !important;
}

/* 8. Directorio & Organigrama Cards */
.org-leader {
  background: linear-gradient(135deg, #fff1f2 0%, #f8fafc 100%) !important;
  border: 1px solid #fecdd3 !important;
  border-left: 5px solid #be123c !important;
  border-radius: 14px !important;
  box-shadow: 0 6px 16px -4px rgba(190, 18, 60, 0.1) !important;
}

.org-leader-avatar {
  background: linear-gradient(135deg, #be123c 0%, #881337 100%) !important;
  box-shadow: 0 4px 10px rgba(190, 18, 60, 0.3);
}

.org-card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 13px !important;
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.04) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.org-card:hover {
  transform: translateY(-3px) !important;
  border-color: #94a3b8 !important;
  box-shadow: 0 12px 24px -6px rgba(15, 23, 42, 0.12) !important;
}

.org-avatar {
  background: linear-gradient(135deg, #0C2D4D 0%, #1e4e79 100%) !important;
  color: #ffffff !important;
}

/* 9. Employee Avatar & Row Polish (usuarios.html) */
.emp-cell-identity {
  display: flex;
  align-items: center;
  gap: 11px;
}

.emp-row-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(12, 45, 77, 0.16);
}

.emp-row-avatar.is-active {
  background: linear-gradient(135deg, #0C2D4D 0%, #1e4e79 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.emp-row-avatar.is-inactive {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  box-shadow: none;
}

.emp-name-btn:hover {
  color: #be123c !important;
  text-decoration: underline;
}

.emp-table-row.is-inactive-row td {
  background-color: rgba(254, 242, 242, 0.45) !important;
}

/* 10. Login Page (index.html) Visual Upgrade */
.login-page {
  background:
    radial-gradient(circle at 10% 10%, rgba(12, 45, 77, 0.14) 0%, transparent 45%),
    radial-gradient(circle at 90% 90%, rgba(190, 18, 60, 0.14) 0%, transparent 45%),
    linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
}

.login-shell {
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.45) !important;
}

.login-visual .visual-orb {
  display: block !important;
}

.btn-login,
.btn-primary,
.btn-submit-ticket {
  background: linear-gradient(135deg, #be123c 0%, #881337 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 18px -3px rgba(190, 18, 60, 0.4);
  font-weight: 700;
}

.btn-login:hover,
.btn-primary:hover,
.btn-submit-ticket:hover {
  background: linear-gradient(135deg, #e11d48 0%, #9f1239 100%);
  box-shadow: 0 10px 24px -4px rgba(190, 18, 60, 0.55);
  transform: translateY(-2px);
}

/* ==========================================================================
   11. 1-CLICK DARK TECH PRO MODE (body.theme-dark)
   Activated from the topbar button (#themeToggleBtn)
========================================================================== */
body.app-page.theme-dark {
  background-color: #070d19 !important;
  color: #f1f5f9 !important;
}

body.app-page.theme-dark .workspace-video-veil {
  background: linear-gradient(135deg, rgba(7, 13, 25, 0.92) 0%, rgba(15, 23, 42, 0.88) 60%, rgba(28, 12, 24, 0.92) 100%) !important;
}

body.app-page.theme-dark .workspace-topbar {
  background: rgba(15, 23, 42, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
}

body.app-page.theme-dark .workspace-brand,
body.app-page.theme-dark .workspace-topbar strong,
body.app-page.theme-dark .workspace-account {
  color: #f8fafc !important;
}

body.app-page.theme-dark .theme-toggle-btn {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #f8fafc !important;
}

body.app-page.theme-dark .theme-toggle-btn i {
  color: #fbbf24 !important;
}

body.app-page.theme-dark .kpi-card,
body.app-page.theme-dark .ticket-stat,
body.app-page.theme-dark .upload-step,
body.app-page.theme-dark .dashboard-panel,
body.app-page.theme-dark .chart-card,
body.app-page.theme-dark .org-section,
body.app-page.theme-dark .toolbar,
body.app-page.theme-dark .directory-toolbar,
body.app-page.theme-dark .corporate-form-container {
  background: rgba(15, 23, 42, 0.86) !important;
  backdrop-filter: blur(16px) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f1f5f9 !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4) !important;
}

body.app-page.theme-dark .kpi-card strong,
body.app-page.theme-dark .ticket-stat strong,
body.app-page.theme-dark .panel-heading h2,
body.app-page.theme-dark .chart-card h3,
body.app-page.theme-dark .org-section-title,
body.app-page.theme-dark .upload-step b,
body.app-page.theme-dark .corp-title {
  color: #ffffff !important;
}

body.app-page.theme-dark .kpi-card p,
body.app-page.theme-dark .ticket-stat > span,
body.app-page.theme-dark .upload-step,
body.app-page.theme-dark .actas-upload-description,
body.app-page.theme-dark label {
  color: #94a3b8 !important;
}

body.app-page.theme-dark .recent-table-wrap,
body.app-page.theme-dark .table-scroll,
body.app-page.theme-dark table.inv-table {
  background: rgba(15, 23, 42, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

body.app-page.theme-dark .recent-table tbody td,
body.app-page.theme-dark .inv-table tbody td,
body.app-page.theme-dark .ticket-list tbody td {
  background-color: transparent !important;
  color: #e2e8f0 !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

body.app-page.theme-dark .recent-table tbody tr:hover td,
body.app-page.theme-dark .inv-table tbody tr:hover td,
body.app-page.theme-dark .ticket-list tbody tr:hover td {
  background-color: rgba(30, 41, 59, 0.85) !important;
}

body.app-page.theme-dark .emp-name-btn,
body.app-page.theme-dark .clickable-name,
body.app-page.theme-dark .ticket-subject strong {
  color: #f8fafc !important;
}

body.app-page.theme-dark .org-card {
  background: rgba(30, 41, 59, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

body.app-page.theme-dark .org-leader {
  background: rgba(45, 18, 34, 0.85) !important;
  border-color: rgba(244, 63, 94, 0.3) !important;
}

body.app-page.theme-dark .org-card h5,
body.app-page.theme-dark .org-leader h4,
body.app-page.theme-dark .dir-card-phone-info {
  color: #f8fafc !important;
}

body.app-page.theme-dark .dashboard-main input:not([type="file"]),
body.app-page.theme-dark .dashboard-main select,
body.app-page.theme-dark .dashboard-main textarea {
  background: rgba(15, 23, 42, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #f8fafc !important;
}

/* ==========================================================================
   12. FULL RESPONSIVE ADAPTATION: iPHONE (iOS Safari) & ANDROID (Chrome Mobile)
   Clean Top Brand Bar + Bottom App Navigation Dock + Zero Auto-Zoom
========================================================================== */

@media (max-width: 900px) {
  /* Prevent iOS Safari automatic zoom when tapping inputs (< 16px triggers zoom on iPhone) */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  input[type="date"],
  input[type="search"],
  select,
  textarea,
  .form-input,
  .ticket-search {
    font-size: 16px !important;
  }

  /* Layout clearance for fixed Top Brand Bar (64px) + Bottom Navigation Dock (74px) */
  .dashboard-layout {
    grid-template-columns: 1fr !important;
    padding-top: 66px !important;
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Fixed Top Brand Header on Mobile (.sidebar container) */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    height: 64px !important;
    padding: 8px 16px !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    z-index: 1000 !important;
    background: rgba(9, 21, 38, 0.96) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  }

  .sidebar-brand {
    margin: 0 !important;
    padding: 6px 10px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .sidebar-brand img {
    width: 142px !important;
  }

  .sidebar-footer {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
  }

  .sidebar-logout {
    margin: 0 !important;
    padding: 6px 11px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    font-size: 0.74rem !important;
  }

  /* Native-App Bottom Navigation Dock (.sidebar-nav) */
  .sidebar-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: stretch !important;
    gap: 3px !important;
    padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    background: rgba(9, 21, 38, 0.97) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 -8px 26px rgba(7, 17, 32, 0.28) !important;
    z-index: 1001 !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
  }

  .sidebar-nav::-webkit-scrollbar {
    display: none !important;
  }

  .sidebar-link {
    flex: 1 1 0 !important;
    min-width: 54px !important;
    min-height: 52px !important;
    padding: 5px 4px !important;
    font-size: 0.63rem !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    text-align: center !important;
    transform: none !important;
  }

  .sidebar-link span {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.92rem !important;
  }

  .dashboard-main {
    padding: 0 14px 28px !important;
  }

  .workspace-topbar {
    height: auto !important;
    min-height: 52px !important;
    padding: 10px 14px !important;
    margin: 12px 0 16px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .workspace-live-pill {
    display: none !important;
  }

  .dashboard-header {
    padding: 18px 18px !important;
    margin-bottom: 18px !important;
    border-radius: 16px !important;
  }

  .panel-heading.usuarios-panel-heading {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .usuarios-search-input,
  .search-box {
    min-width: 0 !important;
    width: 100% !important;
  }
}

@media (max-width: 640px) {
  .header-actions {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .header-actions > *:last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
  }

  .dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .kpi-card {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 15px 14px !important;
    gap: 10px !important;
  }

  .kpi-icon {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.05rem !important;
  }

  .kpi-card strong {
    font-size: 1.65rem !important;
  }

  /* Bottom-sheet Modals on iPhone & Android */
  .modal-overlay {
    padding: 8px !important;
    align-items: flex-end !important;
  }

  .modal-overlay > .modal-content,
  .modal-ficha {
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(92dvh - env(safe-area-inset-top, 0px)) !important;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 8px)) !important;
    border-radius: 18px 18px 12px 12px !important;
  }

  #formFichaColaborador div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 400px) {
  .dashboard-kpis {
    grid-template-columns: 1fr !important;
  }

  .header-actions {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   BIBLIOTECA DIGITAL DE ACTAS OFICIALES & VISOR PDF INTERACTIVO
   ========================================================================== */
.actas-lib-panel {
  margin: 18px 0 24px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 28px -12px rgba(15, 23, 42, 0.08) !important;
  overflow: hidden !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.actas-lib-panel[open] {
  border-color: #cbd5e1 !important;
  box-shadow: 0 18px 40px -15px rgba(15, 23, 42, 0.12) !important;
}

.actas-lib-summary {
  list-style: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 18px 22px !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  cursor: pointer !important;
  user-select: none !important;
  border-bottom: 1px solid transparent !important;
}

.actas-lib-summary::-webkit-details-marker {
  display: none !important;
}

.actas-lib-panel[open] .actas-lib-summary {
  border-bottom-color: #e2e8f0 !important;
}

.actas-lib-summary-left {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  min-width: 0 !important;
}

.actas-lib-summary-icon {
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.1rem !important;
  flex-shrink: 0 !important;
}

.actas-lib-summary-title {
  display: block !important;
  font-size: 1.02rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.01em !important;
}

.actas-lib-summary-subtitle {
  display: block !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  color: #64748b !important;
  margin-top: 2px !important;
}

.actas-lib-kpis {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.actas-lib-kpi {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 5px 11px !important;
  border-radius: 999px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #e2e8f0 !important;
}

.actas-lib-kpi.is-linked {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border-color: #a7f3d0 !important;
}

.actas-lib-kpi.is-pending {
  background: #fffbeb !important;
  color: #b45309 !important;
  border-color: #fde68a !important;
}

.actas-lib-chevron {
  width: 28px !important;
  height: 28px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #64748b !important;
  background: #f1f5f9 !important;
  transition: transform 0.2s ease !important;
}

.actas-lib-panel[open] .actas-lib-chevron {
  transform: rotate(180deg) !important;
  color: #b91c1c !important;
  background: #fef2f2 !important;
}

.actas-lib-body {
  padding: 18px 22px 22px !important;
  background: #f8fafc !important;
}

.actas-lib-toolbar {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  margin-bottom: 12px !important;
}

.actas-lib-search-wrap {
  position: relative !important;
  flex: 1 1 280px !important;
}

.actas-lib-search-wrap > i {
  position: absolute !important;
  left: 13px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #94a3b8 !important;
  font-size: 0.85rem !important;
  pointer-events: none !important;
}

.actas-lib-search {
  width: 100% !important;
  padding: 9px 14px 9px 36px !important;
  border-radius: 10px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  font-size: 0.85rem !important;
  color: #0f172a !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.actas-lib-search:focus {
  outline: none !important;
  border-color: #b91c1c !important;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12) !important;
}

.actas-lib-filters {
  display: inline-flex !important;
  background: #e2e8f0 !important;
  padding: 3px !important;
  border-radius: 10px !important;
  gap: 2px !important;
}

.actas-lib-filter {
  border: none !important;
  background: transparent !important;
  color: #475569 !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.actas-lib-filter.is-active {
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12) !important;
}

.actas-lib-refresh {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 8px 14px !important;
  border-radius: 10px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #1e293b !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.actas-lib-refresh:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
}

.actas-lib-status {
  font-size: 0.78rem !important;
  color: #64748b !important;
  font-weight: 600 !important;
  margin: 0 0 12px !important;
}

.actas-lib-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  max-height: 540px !important;
  overflow-y: auto !important;
  padding-right: 4px !important;
}

.actas-lib-card {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 14px 16px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-left: 4px solid #cbd5e1 !important;
  border-radius: 12px !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease !important;
}

.actas-lib-card.is-linked {
  border-left-color: #10b981 !important;
}

.actas-lib-card.is-pending {
  border-left-color: #f59e0b !important;
}

.actas-lib-card:hover {
  box-shadow: 0 8px 20px -10px rgba(15, 23, 42, 0.12) !important;
  border-color: #cbd5e1 !important;
}

.actas-lib-card-info {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  min-width: 0 !important;
  flex: 1 1 320px !important;
}

.actas-lib-pdf-icon {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.05rem !important;
  flex-shrink: 0 !important;
  margin-top: 2px !important;
}

.actas-lib-pdf-icon.recibido {
  background: #eff6ff !important;
  color: #2563eb !important;
  border-color: #bfdbfe !important;
}

.actas-lib-card-details {
  min-width: 0 !important;
  flex: 1 !important;
}

.actas-lib-card-header {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  margin-bottom: 5px !important;
}

.actas-lib-person {
  margin: 0 !important;
  font-size: 0.93rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
}

.actas-lib-type-badge {
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
}

.actas-lib-type-badge.recibido {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
}

.actas-lib-status-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 2px 9px !important;
  border-radius: 999px !important;
}

.actas-lib-status-badge.is-linked {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
}

.actas-lib-status-badge.is-pending {
  background: #fffbeb !important;
  color: #b45309 !important;
  border: 1px solid #fde68a !important;
}

.actas-lib-meta-row {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  font-size: 0.76rem !important;
  color: #475569 !important;
}

.actas-lib-meta-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: #f1f5f9 !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
  color: #334155 !important;
}

.actas-lib-filename {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace !important;
  font-size: 0.7rem !important;
  color: #94a3b8 !important;
  max-width: 280px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.actas-lib-card-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
}

.actas-lib-view-group {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.actas-lib-btn-view {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 7px 13px !important;
  border-radius: 9px !important;
  border: 1px solid #fecaca !important;
  background: #fef2f2 !important;
  color: #b91c1c !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}

.actas-lib-btn-view:hover {
  background: #b91c1c !important;
  color: #ffffff !important;
  border-color: #b91c1c !important;
}

.actas-lib-btn-tab {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #475569 !important;
  font-size: 0.78rem !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.actas-lib-btn-tab:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.actas-lib-link-group {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.actas-lib-select {
  width: 220px !important;
  max-width: 100% !important;
  padding: 7px 10px !important;
  border-radius: 9px !important;
  border: 1px solid #cbd5e1 !important;
  background: #f8fafc !important;
  color: #1e293b !important;
  font-size: 0.78rem !important;
}

.actas-lib-btn-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 7px 13px !important;
  border-radius: 9px !important;
  border: 1px solid #0f172a !important;
  background: #0f172a !important;
  color: #ffffff !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}

.actas-lib-btn-link:hover {
  background: #1e293b !important;
}

.actas-lib-empty {
  text-align: center !important;
  padding: 36px 20px !important;
  color: #64748b !important;
  background: #ffffff !important;
  border: 1px dashed #cbd5e1 !important;
  border-radius: 12px !important;
}

.actas-lib-empty i {
  font-size: 1.8rem !important;
  color: #94a3b8 !important;
  margin-bottom: 8px !important;
}

/* Visor PDF Modal Interactivo */
.acta-viewer-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  background: rgba(15, 23, 42, 0.72) !important;
  backdrop-filter: blur(4px) !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 18px !important;
}

.acta-viewer-backdrop.is-open {
  display: flex !important;
}

.acta-viewer-dialog {
  width: min(1080px, 96vw) !important;
  height: min(88vh, 920px) !important;
  background: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.45) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.acta-viewer-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  padding: 14px 20px !important;
  background: #0f172a !important;
  color: #ffffff !important;
}

.acta-viewer-title-group {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0 !important;
}

.acta-viewer-icon {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  background: rgba(239, 68, 68, 0.2) !important;
  color: #fca5a5 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.1rem !important;
  flex-shrink: 0 !important;
}

.acta-viewer-title-group h3 {
  margin: 0 !important;
  font-size: 0.98rem !important;
  font-weight: 800 !important;
  color: #ffffff !important;
}

.acta-viewer-title-group p {
  margin: 2px 0 0 !important;
  font-size: 0.76rem !important;
  color: #94a3b8 !important;
}

.acta-viewer-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.acta-viewer-close {
  width: 34px !important;
  height: 34px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.acta-viewer-close:hover {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
}

.acta-viewer-body {
  flex: 1 !important;
  background: #334155 !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.acta-viewer-iframe {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  background: #ffffff !important;
}

.acta-viewer-loading,
.acta-viewer-error {
  text-align: center !important;
  color: #f8fafc !important;
  padding: 28px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px !important;
}

.acta-viewer-loading i,
.acta-viewer-error i {
  font-size: 2rem !important;
  color: #f87171 !important;
}

/* Protector de Sesión Inactiva (5 Minutos) */
.idle-security-banner {
  position: fixed !important;
  bottom: 24px !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(20px) !important;
  z-index: 10000 !important;
  background: #0f172a !important;
  color: #ffffff !important;
  border: 1px solid #f59e0b !important;
  border-radius: 14px !important;
  padding: 12px 18px !important;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.55) !important;
  display: none !important;
  align-items: center !important;
  gap: 14px !important;
  max-width: min(560px, 94vw) !important;
}

.idle-security-banner.is-visible {
  display: flex !important;
  transform: translateX(-50%) translateY(0) !important;
}

.idle-security-banner-icon {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  background: rgba(245, 158, 11, 0.18) !important;
  color: #fbbf24 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.1rem !important;
  flex-shrink: 0 !important;
}

.idle-security-banner-text {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  font-size: 0.8rem !important;
}

.idle-security-banner-text strong {
  color: #fde68a !important;
  font-size: 0.84rem !important;
}

.idle-security-banner-btn {
  padding: 8px 14px !important;
  border-radius: 9px !important;
  border: none !important;
  background: #f59e0b !important;
  color: #0f172a !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}

.idle-security-banner-btn:hover {
  background: #fbbf24 !important;
}

@media (max-width: 768px) {
  .actas-lib-summary {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .actas-lib-card {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .actas-lib-card-actions,
  .actas-lib-link-group {
    width: 100% !important;
    justify-content: stretch !important;
  }
  .actas-lib-select {
    flex: 1 !important;
  }
}

/* ==========================================================================
   13. CENTRO VISUAL DE INVENTARIO (HERO HUB + TARJETAS + MUEBLES Y ENSERES)
       & DIRECTORIO EJECUTIVO DE CONTACTO (2026-8)
========================================================================== */

[hidden] {
  display: none !important;
}

/* --- Hub Visual Ejecutivo de 3 Categorías con Imagen de Estudio --- */
.inv-hero-hub {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.inv-hero-card {
  appearance: none;
  font: inherit;
  text-align: left;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  border: 2px solid rgba(203, 213, 225, 0.9);
  box-shadow: 0 12px 28px -10px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.24s ease, border-color 0.2s ease;
}

.inv-hero-card:hover {
  transform: translateY(-4px);
  border-color: #94a3b8;
  box-shadow: 0 20px 38px -12px rgba(15, 23, 42, 0.16);
}

.inv-hero-card.active {
  border-color: #be123c;
  box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.16), 0 20px 40px -12px rgba(190, 18, 60, 0.24);
}

.inv-hero-media {
  position: relative;
  width: 100%;
  height: 184px;
  overflow: hidden;
  background: #0f172a;
}

.inv-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.36) 0%, rgba(15, 23, 42, 0.04) 48%, rgba(15, 23, 42, 0.52) 100%);
  pointer-events: none;
}

.inv-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.inv-hero-card:hover .inv-hero-media img {
  transform: scale(1.05);
}

.inv-hero-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #ffffff;
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.inv-hero-card.active .inv-hero-tag {
  background: linear-gradient(135deg, #be123c 0%, #881337 100%);
  border-color: rgba(255, 255, 255, 0.38);
}

.inv-hero-content {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.inv-hero-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.inv-hero-heading h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.inv-hero-number {
  font-size: 1.7rem;
  font-weight: 800;
  color: #be123c;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
}

.inv-hero-content p {
  margin: 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.45;
}

.inv-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
}

.inv-hero-pills span {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
}

.inv-hero-card.active .inv-hero-pills span:first-child {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #9f1239;
}

/* --- Selector de Vista: Tarjetas vs Tabla --- */
.inv-view-toggle {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}

.inv-view-btn {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 0.77rem;
  font-weight: 700;
  padding: 6px 12px;
  min-height: 34px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.inv-view-btn:hover {
  color: #0f172a;
}

.inv-view-btn.active {
  background: linear-gradient(135deg, #0C2D4D 0%, #1e3a8a 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(12, 45, 77, 0.25);
}

/* --- Cuadrícula Visual de Tarjetas de Equipos y Muebles --- */
.inv-visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(282px, 1fr));
  gap: 18px;
  margin-top: 4px;
}

.inv-asset-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 22px -8px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.inv-asset-card.inv-hw-card {
  cursor: pointer;
}

.inv-asset-card:hover {
  transform: translateY(-4px);
  border-color: #94a3b8;
  box-shadow: 0 18px 34px -10px rgba(15, 23, 42, 0.15);
}

.inv-asset-visual {
  position: relative;
  height: 148px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #ffffff;
}

.inv-asset-bg-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  mix-blend-mode: luminosity;
  pointer-events: none;
  transition: transform 0.45s ease, opacity 0.3s ease;
}

.inv-asset-card:hover .inv-asset-bg-photo {
  transform: scale(1.06);
  opacity: 0.34;
}

.inv-asset-real-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.inv-asset-visual.has-real-photo .inv-asset-svg {
  display: none;
}

.inv-asset-svg {
  position: relative;
  z-index: 1;
  width: 112px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
  margin-top: 14px;
}

.inv-asset-svg svg {
  width: 100%;
  height: 100%;
}

.inv-asset-visual-top {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.inv-asset-plate {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.inv-asset-plate-soft {
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: rgba(15, 23, 42, 0.64);
}

.inv-asset-qty-pill {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 0.71rem;
  font-weight: 700;
}

.inv-asset-visual .badge {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  font-weight: 700;
}

.badge.b-activo { background: #dcfce7; color: #166534; }
.badge.b-bodega { background: #e0f2fe; color: #075985; }
.badge.b-reparacion { background: #fef3c7; color: #92400e; }
.badge.b-baja { background: #f1f5f9; color: #475569; }

.inv-asset-body {
  padding: 15px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.inv-asset-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #be123c;
}

.inv-asset-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.inv-asset-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inv-asset-specs span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-asset-specs span i {
  color: #64748b;
  font-size: 0.7rem;
}

.inv-asset-footer {
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inv-owner-block {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.inv-owner-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0C2D4D 0%, #1e4e79 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.73rem;
  font-weight: 800;
  flex-shrink: 0;
}

.inv-owner-avatar.is-warehouse {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.inv-owner-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.inv-owner-meta strong {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inv-owner-meta small {
  font-size: 0.7rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inv-asset-owner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inv-asset-owner i {
  color: #0C2D4D;
}

.inv-table th:first-child {
  width: auto !important;
  min-width: 210px;
}

.inv-table-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.16);
}

.inv-empty-showcase {
  grid-column: 1 / -1;
  text-align: center;
  padding: 44px 24px;
  background: #ffffff;
  border: 1.5px dashed #cbd5e1;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.inv-empty-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #fff1f2;
  color: #be123c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.inv-empty-showcase h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  color: #0f172a;
}

.inv-empty-showcase p {
  margin: 0;
  max-width: 510px;
  font-size: 0.84rem;
  color: #64748b;
}

/* --- KPIs y Selector de Foto de Muebles y Enseres --- */
.muebles-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.muebles-summary-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 15px 17px;
  display: flex;
  align-items: center;
  gap: 13px;
  box-shadow: 0 6px 18px -8px rgba(15, 23, 42, 0.06);
}

.muebles-summary-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.muebles-summary-card small {
  display: block;
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.muebles-summary-card strong {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.muebles-sede-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.muebles-sede-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 0.72rem;
  color: #334155;
  font-weight: 600;
}

.muebles-sede-chip strong {
  font-size: 0.75rem !important;
  font-weight: 800;
  color: #be123c;
}

.mueble-photo-picker {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
}

.mueble-photo-thumb {
  position: relative;
  width: 126px;
  height: 92px;
  border-radius: 11px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mueble-photo-thumb .inv-asset-svg {
  margin-top: 0;
  width: 84px;
  height: 62px;
}

.mueble-photo-controls strong {
  display: block;
  font-size: 0.86rem;
  color: #0f172a;
  margin-bottom: 3px;
}

.mueble-photo-controls p {
  margin: 0;
  font-size: 0.77rem;
  color: #64748b;
  line-height: 1.42;
}

/* --- Directorio Ejecutivo de Contacto (100% Limpio y Rápido) --- */
.org-container,
.directory-toolbar {
  max-width: 1440px !important;
}

.org-grid {
  grid-template-columns: repeat(auto-fill, minmax(286px, 1fr)) !important;
  gap: 14px !important;
}

.org-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1.5px solid #e2e8f0;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.org-section-header .org-section-title {
  margin-bottom: 0 !important;
  border-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.org-section-count {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.73rem;
  font-weight: 700;
}

.directory-person-role {
  display: block;
  font-weight: 600;
  color: #475569;
}

.dir-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.dir-sede-badge,
.dir-tenure-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
}

.dir-sede-badge {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.dir-tenure-badge {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
}

.dir-copy-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.74rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.dir-copy-mini-btn:hover {
  background: #0C2D4D;
  border-color: #0C2D4D;
  color: #ffffff;
}

.dir-personal-link i {
  color: #0284c7 !important;
}

.dir-tag-label {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.64rem;
  font-weight: 700;
  flex-shrink: 0;
}

.dir-wa-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  height: 28px;
  border-radius: 8px;
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #15803d;
  font-size: 0.74rem;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.16s ease;
}

.dir-wa-pill:hover {
  background: #22c55e;
  border-color: #16a34a;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.28);
}

.dir-card-contact-empty {
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  color: #94a3b8;
  font-size: 0.75rem;
}

.dir-complete-link {
  border: 1px solid #fecdd3;
  background: #fff1f2;
  color: #be123c;
  font-size: 0.71rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
}

.dir-complete-link:hover {
  background: #be123c;
  color: #ffffff;
}

.org-avatar.dir-dept-gerencia { background: linear-gradient(135deg, #be123c 0%, #881337 100%) !important; }
.org-avatar.dir-dept-admin,
.org-avatar.dir-dept-nomina { background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%) !important; }
.org-avatar.dir-dept-ti { background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important; }
.org-avatar.dir-dept-impuestos,
.org-avatar.dir-dept-auditoria { background: linear-gradient(135deg, #0f766e 0%, #115e59 100%) !important; }
.org-avatar.dir-dept-comercial { background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important; }

/* --- Modo Oscuro (body.app-page.theme-dark) para Nuevos Módulos --- */
body.app-page.theme-dark .inv-hero-card,
body.app-page.theme-dark .inv-asset-card,
body.app-page.theme-dark .muebles-summary-card,
body.app-page.theme-dark .inv-empty-showcase,
body.app-page.theme-dark .mueble-photo-picker {
  background: rgba(15, 23, 42, 0.88) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #f1f5f9 !important;
}

body.app-page.theme-dark .inv-hero-card.active {
  border-color: #f43f5e !important;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.24), 0 20px 40px -12px rgba(0, 0, 0, 0.5) !important;
}

body.app-page.theme-dark .inv-hero-heading h3,
body.app-page.theme-dark .inv-asset-title,
body.app-page.theme-dark .inv-owner-meta strong,
body.app-page.theme-dark .muebles-summary-card strong,
body.app-page.theme-dark .inv-empty-showcase h3,
body.app-page.theme-dark .mueble-photo-controls strong {
  color: #f8fafc !important;
}

body.app-page.theme-dark .inv-hero-number,
body.app-page.theme-dark .inv-asset-category {
  color: #fb7185 !important;
}

body.app-page.theme-dark .inv-hero-content p,
body.app-page.theme-dark .inv-owner-meta small,
body.app-page.theme-dark .muebles-summary-card small,
body.app-page.theme-dark .inv-empty-showcase p,
body.app-page.theme-dark .mueble-photo-controls p,
body.app-page.theme-dark .directory-person-role {
  color: #94a3b8 !important;
}

body.app-page.theme-dark .inv-hero-pills span,
body.app-page.theme-dark .inv-asset-specs span,
body.app-page.theme-dark .muebles-sede-chip,
body.app-page.theme-dark .org-section-count,
body.app-page.theme-dark .dir-tenure-badge,
body.app-page.theme-dark .inv-view-toggle {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
}

body.app-page.theme-dark .inv-view-btn {
  color: #cbd5e1;
}

body.app-page.theme-dark .inv-view-btn.active {
  background: linear-gradient(135deg, #be123c 0%, #881337 100%) !important;
  color: #ffffff !important;
}

body.app-page.theme-dark .inv-asset-footer,
body.app-page.theme-dark .org-section-header,
body.app-page.theme-dark .dir-card-contact-box {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body.app-page.theme-dark .inv-asset-owner,
body.app-page.theme-dark .dir-card-contact-link {
  color: #cbd5e1 !important;
}

body.app-page.theme-dark .dir-sede-badge {
  background: rgba(37, 99, 235, 0.22) !important;
  border-color: rgba(96, 165, 250, 0.35) !important;
  color: #93c5fd !important;
}

body.app-page.theme-dark .dir-copy-mini-btn {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #cbd5e1 !important;
}

/* --- Responsive para Móviles y Tablets --- */
@media (max-width: 1060px) {
  .inv-hero-hub {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .inv-hero-card {
    flex-direction: row;
    align-items: stretch;
  }

  .inv-hero-media {
    width: 190px;
    height: auto;
    min-height: 142px;
    flex-shrink: 0;
  }

  .muebles-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .inv-hero-card {
    flex-direction: column;
  }

  .inv-hero-media {
    width: 100%;
    height: 152px;
  }

  .inv-visual-grid {
    grid-template-columns: 1fr;
  }

  .muebles-kpis {
    grid-template-columns: 1fr;
  }

  .mueble-photo-picker {
    flex-direction: column;
    align-items: flex-start;
  }

  .mueble-photo-thumb {
    width: 100%;
    height: 130px;
  }

  .inv-view-toggle {
    width: 100%;
  }

  .toolbar .spacer .inv-view-toggle .inv-view-btn {
    width: auto !important;
    flex: 1;
  }
}




