:root {
  --bg-main: #06090e;
  --card-bg: rgba(17, 24, 39, 0.85);
  --card-inner: #151d2a;
  --border-color: #232d42;
  --accent-orange: #f59e0b;
  --accent-orange-hover: #d97706;
  --text-main: #ffffff;
  --green-btn: #10b981;
  --blue-btn: #0ea5e9;
  --purple-btn: #6366f1;
  --red-btn: #ef4444;
  --menu-bg: #0d1526;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 30px rgba(0, 0, 0, 0.8);
}

* { box-sizing: border-box; font-family: 'Inter', system-ui, -apple-system, sans-serif; margin: 0; padding: 0; color: #ffffff; }
body { background-color: var(--bg-main); color: #ffffff; min-height: 100vh; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
::selection { color: #0b1220; background: rgba(245, 158, 11, 0.78); }
button, input, select, textarea { font: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .sidebar-item:focus-visible { outline: 2px solid #fbbf24; outline-offset: 3px; }

#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 12px; max-width: 380px; width: 100%; pointer-events: none; }
.toast-item { pointer-events: auto; background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(16px); border: 1px solid var(--border-color); border-radius: 14px; padding: 16px 20px; box-shadow: 0 10px 25px rgba(0,0,0,0.6); display: flex; align-items: flex-start; gap: 14px; transform: translateX(120%); transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1); position: relative; overflow: hidden; }
.toast-item.show { transform: translateX(0); }
.toast-icon { font-size: 1.4rem; line-height: 1; margin-top: 2px; }
.toast-content h4 { font-size: 0.92rem; font-weight: 700; color: #ffffff; margin-bottom: 2px; }
.toast-content p { font-size: 0.82rem; color: #cbd5e1; font-weight: 500; line-height: 1.3; }
.toast-progress { position: absolute; bottom: 0; left: 0; height: 3px; background: var(--accent-orange); width: 100%; animation: toastProgress 4s linear forwards; }
.toast-item.success { border-left: 4px solid var(--green-btn); }
.toast-item.success .toast-progress { background: var(--green-btn); }
.toast-item.info { border-left: 4px solid var(--blue-btn); }
.toast-item.info .toast-progress { background: var(--blue-btn); }
.toast-item.warning { border-left: 4px solid var(--accent-orange); }
.toast-item.warning .toast-progress { background: var(--accent-orange); }
.toast-item.error { border-left: 4px solid var(--red-btn); }
.toast-item.error .toast-progress { background: var(--red-btn); }
@keyframes toastProgress { from { width: 100%; } to { width: 0%; } }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(4, 7, 13, 0.85); backdrop-filter: blur(12px); z-index: 10000; display: none; justify-content: center; align-items: center; padding: 20px; }
.modal-overlay.active { display: flex; animation: fadeInModal 0.2s ease-out; }
@keyframes fadeInModal { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
.modal-box { background: rgba(17, 24, 39, 0.95); border: 1px solid var(--border-color); border-radius: 20px; padding: 32px; width: 100%; max-width: 480px; box-shadow: var(--shadow-lg); }
.modal-box h3 { font-size: 1.3rem; font-weight: 800; color: var(--accent-orange); margin-bottom: 8px; }
.modal-box p { font-size: 0.9rem; color: #cbd5e1; margin-bottom: 20px; }
.modal-inputs { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.modal-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.modal-field label { color: #cbd5e1; font-size: 0.82rem; font-weight: 700; }
.modal-inputs input, .modal-inputs select, .modal-inputs textarea { width: 100%; padding: 12px 14px; background: #07090e; border: 1px solid var(--border-color); border-radius: 10px; color: #ffffff; font: inherit; font-size: 0.92rem; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.modal-inputs input:focus, .modal-inputs select:focus, .modal-inputs textarea:focus { border-color: var(--accent-orange); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14); }
.modal-inputs textarea { resize: vertical; min-height: 88px; }
.modal-field-help { color: #94a3b8; font-size: 0.75rem; line-height: 1.4; }
.modal-box.maintenance-dialog { max-width: 560px; }
.maintenance-dialog .modal-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.maintenance-dialog .modal-field.full-width { grid-column: 1 / -1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; }
.modal-btn { padding: 12px 20px; border-radius: 10px; border: none; font-weight: 700; cursor: pointer; font-size: 0.9rem; }
.modal-btn:disabled { cursor: wait; opacity: 0.65; }
.modal-btn.cancel { background: #1e293b; color: #ffffff; border: 1px solid var(--border-color); }
.modal-btn.confirm { background: var(--accent-orange); color: #000000; }
.modal-btn.danger { background: var(--red-btn); color: #ffffff; }

@keyframes pulse-live { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); } 70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
.pulse-dot { width: 10px; height: 10px; background-color: var(--green-btn); border-radius: 50%; display: inline-block; animation: pulse-live 2s infinite; margin-right: 6px; }

#pantalla-login { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; background: radial-gradient(circle at center, #1e293b 0%, #06090e 100%); }
.caja-login { background: rgba(17, 23, 38, 0.95); backdrop-filter: blur(16px); border: 1px solid var(--border-color); padding: 44px; border-radius: 20px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); text-align: center; }
.logo-container { margin-bottom: 20px; display: flex; justify-content: center; }
.logo-img { max-width: 150px; height: auto; border-radius: 10px; background: white; padding: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.caja-login h1 { font-size: 1.5rem; font-weight: 800; color: var(--accent-orange); margin-bottom: 4px; }
.caja-login .login-subtitle { color: #cbd5e1; font-size: 0.84rem; margin-bottom: 24px; }
.caja-login .login-heading { color: #ffffff; font-size: 1.08rem; font-weight: 750; margin-bottom: 5px; }
.caja-login .login-instructions { color: #94a3b8; font-size: 0.8rem; line-height: 1.5; margin-bottom: 16px; }
.login-form { display: flex; flex-direction: column; text-align: left; }
.login-label { color: #cbd5e1; font-size: 0.86rem; font-weight: 700; margin: 8px 0 4px; }
.caja-login input { width: 100%; padding: 14px 16px; margin: 0 0 8px; background: #07090e; border: 1px solid var(--border-color); border-radius: 10px; color: #ffffff; font-size: 1rem; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.caja-login input:focus { border-color: var(--accent-orange); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15); }
.password-field { position: relative; margin-bottom: 8px; }
.caja-login .password-field input { margin-bottom: 0; padding-right: 88px; }
.caja-login .password-field .password-toggle { position: absolute; top: calc(50% - 4px); right: 8px; width: auto; margin: 0; padding: 7px 8px; border: 0; background: transparent; color: #cbd5e1; font-size: .78rem; }
.caja-login .password-field .password-toggle:hover:not(:disabled) { background: transparent; color: #ffffff; text-decoration: underline; }
.caja-login .password-field .password-toggle:focus-visible { outline: 2px solid var(--accent-orange); outline-offset: 1px; }
.caja-login #login-caps-warning { margin: 0 0 4px; color: #fbbf24; font-size: .78rem; text-align: left; }
.caja-login #login-caps-warning[hidden] { display: none; }
.caja-login button { width: 100%; padding: 14px; background: var(--accent-orange); border: none; border-radius: 10px; font-weight: 700; cursor: pointer; margin-top: 8px; font-size: 1rem; color: #000000; transition: background-color 0.2s, opacity 0.2s; }
.caja-login button:hover:not(:disabled) { background: var(--accent-orange-hover); }
.caja-login button:disabled { cursor: wait; opacity: 0.7; }
#login-error { display: none; color: #fca5a5; font-size: 0.85rem; line-height: 1.4; margin: 12px 0 0; text-align: left; }
.login-support { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-color); text-align: center; }
.caja-login .login-support p { color: #94a3b8; font-size: 0.76rem; margin: 0 0 7px; }
.login-request-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 8px 12px; border: 1px solid rgba(148, 163, 184, 0.22); border-radius: 9px; color: #e2e8f0; font-size: 0.8rem; font-weight: 700; text-decoration: none; transition: color 0.2s, border-color 0.2s, background-color 0.2s; }
.login-request-link:hover { color: #fbbf24; border-color: rgba(251, 191, 36, 0.5); background: rgba(251, 191, 36, 0.06); }
.login-request-link:focus-visible { outline: 2px solid var(--accent-orange); outline-offset: 3px; }

#pantalla-principal { display: none; min-height: 100vh; width: 100%; }
.app-layout { display: flex; width: 100%; min-height: 100vh; }

.sidebar-lateral { width: 280px; background: linear-gradient(180deg, #101a2d 0%, #0b1220 100%); border-right: 1px solid rgba(100, 116, 139, 0.24); display: flex; flex-direction: column; transition: width 0.3s ease; position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; z-index: 100; box-shadow: 10px 0 30px rgba(0, 0, 0, 0.12); }
.sidebar-lateral.collapsed { width: 80px; }

.sidebar-header { padding: 22px 18px; border-bottom: 1px solid rgba(100, 116, 139, 0.2); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sidebar-brand-info { display: flex; align-items: center; gap: 12px; transition: opacity 0.2s; }
.sidebar-lateral.collapsed .sidebar-header { flex-direction: column; justify-content: center; padding: 12px 8px; gap: 10px; }
.sidebar-lateral.collapsed .sidebar-brand-info { display: flex; justify-content: center; }
.sidebar-lateral.collapsed .sidebar-brand-info h2 { display: none; }
.sidebar-header img { height: 38px; width: auto; background: #fff; padding: 3px 6px; border-radius: 6px; flex-shrink: 0; }
.sidebar-lateral.collapsed .sidebar-header img { height: 42px; max-width: 54px; padding: 4px; border-radius: 9px; }
.sidebar-header h2 { font-size: 0.95rem; font-weight: 800; color: #ffffff; line-height: 1.2; white-space: nowrap; }
.sidebar-header h2 span { color: var(--accent-orange); display: block; }

.btn-toggle-sidebar { background: rgba(148, 163, 184, 0.08); border: 1px solid rgba(148, 163, 184, 0.18); color: #cbd5e1; padding: 7px 10px; border-radius: 9px; cursor: pointer; font-size: 0.9rem; transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
.btn-toggle-sidebar:hover { background: rgba(148, 163, 184, 0.16); border-color: rgba(148, 163, 184, 0.32); color: #fff; }
.sidebar-lateral.collapsed .btn-toggle-sidebar { margin: 0 auto; padding: 6px 9px; }

.sidebar-menu-title { padding: 22px 20px 10px 20px; font-size: 0.66rem; font-weight: 700; color: #718198; text-transform: uppercase; letter-spacing: 0.12em; white-space: nowrap; }
.sidebar-lateral.collapsed .sidebar-menu-title { display: none; }
.sidebar-lateral.collapsed .sidebar-item { display: none !important; }

.sidebar-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; margin: 2px 10px; color: #aebbd0; font-size: 0.84rem; font-weight: 550; cursor: pointer; border: 1px solid transparent; border-left: 3px solid transparent; border-radius: 10px; transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease; white-space: nowrap; }
.sidebar-item > span:first-child { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 8px; background: rgba(148, 163, 184, 0.08); font-size: 0.95rem; }
.sidebar-lateral.collapsed .sidebar-item { padding: 14px; justify-content: center; gap: 0; }
.sidebar-item span.menu-text { transition: opacity 0.2s; }
.sidebar-lateral.collapsed .sidebar-item span.menu-text { display: none; }
.sidebar-item:hover { background: rgba(148, 163, 184, 0.08); border-color: rgba(148, 163, 184, 0.08); color: #ffffff; }
.sidebar-item.active { background: linear-gradient(100deg, rgba(245, 158, 11, 0.14), rgba(245, 158, 11, 0.045)); color: #fbbf24; border-color: rgba(245, 158, 11, 0.14); border-left-color: var(--accent-orange); font-weight: 650; }
.sidebar-item.active > span:first-child { background: rgba(245, 158, 11, 0.14); }

.main-content-area { flex: 1; min-width: 0; padding: clamp(24px, 3vw, 42px) clamp(24px, 3.5vw, 52px); overflow-x: hidden; display: flex; flex-direction: column; background: radial-gradient(ellipse at 88% 0%, rgba(30, 58, 95, 0.13), transparent 38%), #080c13; }

header { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 28px; border-bottom: 1px solid rgba(100, 116, 139, 0.22); padding-bottom: 22px; }
.main-content-area > header { position: relative; z-index: 20; min-height: 96px; padding: 18px 20px; margin-bottom: 24px; overflow: visible; background: linear-gradient(115deg, rgba(17, 27, 44, 0.92), rgba(11, 17, 29, 0.7)); border: 1px solid rgba(100, 116, 139, 0.24); border-radius: 16px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16); }
.main-content-area > header::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(180deg, #fbbf24, rgba(245, 158, 11, 0.18)); }
.header-brand { display: flex; align-items: center; gap: 16px; }
.header-brand, .title-area, .user-actions { min-width: 0; }
.title-area h1 { font-size: clamp(1.55rem, 2vw, 1.9rem); font-weight: 750; letter-spacing: -0.045em; line-height: 1.2; color: #f8fafc; }
.title-area h1 span { color: var(--accent-orange); }
.title-area p { font-size: 0.84rem; color: #91a0b5; font-weight: 450; margin-top: 7px; display: flex; align-items: center; }
.pulse-dot { width: 8px; height: 8px; flex: 0 0 8px; box-shadow: 0 0 12px rgba(16, 185, 129, 0.45); }
.user-actions { display: flex; gap: 10px; align-items: center; }
.btn-user { background: rgba(17, 24, 39, 0.78); border: 1px solid rgba(100, 116, 139, 0.28); color: #cbd5e1; padding: 10px 15px; border-radius: 10px; font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.btn-user:hover { background: rgba(30, 41, 59, 0.9); border-color: rgba(148, 163, 184, 0.4); transform: translateY(-1px); }
.btn-user.admin { color: #fbbf24; border-color: rgba(245, 158, 11, 0.28); background: rgba(245, 158, 11, 0.07); }
.btn-user.admin:hover { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.42); }
.notification-center { position: relative; flex: 0 0 auto; }
.notification-trigger { position: relative; display: grid; width: 42px; height: 42px; place-items: center; padding: 0; border: 1px solid rgba(100, 116, 139, 0.3); border-radius: 11px; background: rgba(17, 24, 39, 0.78); color: #cbd5e1; cursor: pointer; transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.notification-trigger:hover, .notification-trigger[aria-expanded="true"] { transform: translateY(-1px); border-color: rgba(148, 163, 184, .48); background: rgba(30, 41, 59, .92); }
.notification-trigger svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.notification-trigger.has-notifications svg { color: #fbbf24; }
.notification-count { position: absolute; top: -6px; right: -6px; display: grid; min-width: 19px; height: 19px; place-items: center; padding: 0 5px; border: 2px solid #111b2b; border-radius: 999px; background: #ef4444; color: #fff; font-size: .64rem; font-weight: 800; line-height: 1; }
.notification-count[hidden] { display: none; }
.notification-menu { position: absolute; top: calc(100% + 12px); right: 0; z-index: 1000; width: min(390px, calc(100vw - 32px)); overflow: hidden; border: 1px solid rgba(100, 116, 139, .34); border-radius: 14px; background: #111a28; box-shadow: 0 18px 48px rgba(0, 0, 0, .52); animation: notificationMenuIn .16s ease-out; }
.notification-menu[hidden] { display: none; }
@keyframes notificationMenuIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.notification-menu-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 17px 13px; border-bottom: 1px solid rgba(100, 116, 139, .2); }
.notification-menu-heading h2 { color: #f1f5f9; font-size: .93rem; font-weight: 750; }
.notification-menu-heading p { margin-top: 3px; color: #91a0b5; font-size: .72rem; }
.notification-live-indicator { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 10px rgba(52, 211, 153, .4); }
.notification-list { display: grid; max-height: min(370px, 55vh); overflow-y: auto; }
.notification-item { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 13px 15px; border: 0; border-bottom: 1px solid rgba(100, 116, 139, .15); background: transparent; cursor: pointer; text-align: left; transition: background .16s ease; }
.notification-item:hover, .notification-item:focus-visible { background: rgba(148, 163, 184, .08); }
.notification-item-indicator { width: 8px; height: 8px; flex: 0 0 8px; margin-top: 4px; border-radius: 50%; background: #fbbf24; }
.notification-item.critical .notification-item-indicator { background: #f87171; box-shadow: 0 0 9px rgba(248, 113, 113, .32); }
.notification-item-copy { display: grid; min-width: 0; flex: 1; gap: 3px; }
.notification-item-copy strong { color: #e2e8f0; font-size: .77rem; font-weight: 700; }
.notification-item-copy small { color: #91a0b5; font-size: .68rem; }
.notification-item-copy > span { overflow: hidden; color: #aab7c8; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.notification-priority { flex: 0 0 auto; padding: 3px 6px; border-radius: 5px; background: rgba(245, 158, 11, .1); color: #fbbf24; font-size: .61rem; font-weight: 750; }
.notification-item.critical .notification-priority { background: rgba(248, 113, 113, .1); color: #fca5a5; }
.notification-empty { display: flex; align-items: center; gap: 9px; padding: 20px 17px; color: #aab7c8; font-size: .76rem; }
.notification-empty span { color: #34d399; font-size: 1rem; }
.notification-view-all { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 12px 16px; border: 0; background: rgba(8, 13, 22, .45); color: #93c5fd; cursor: pointer; font-size: .74rem; font-weight: 700; text-align: left; }
.notification-view-all:hover { background: rgba(59, 130, 246, .1); color: #bfdbfe; }
.notification-view-all span { font-size: 1rem; }

.kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi-card { --kpi-accent: #94a3b8; position: relative; min-width: 0; min-height: 104px; background: linear-gradient(135deg, rgba(17, 24, 39, 0.98), rgba(13, 21, 38, 0.9)); border: 1px solid rgba(71, 85, 105, 0.42); border-radius: 14px; padding: 18px 22px; display: flex; align-items: center; gap: 16px; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18); transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; }
.kpi-card::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 4px 4px 0; background: var(--kpi-accent); opacity: 0.85; }
.kpi-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--kpi-accent) 42%, transparent); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28); }
.kpi-total { --kpi-accent: #38bdf8; }
.kpi-online { --kpi-accent: #34d399; }
.kpi-offline { --kpi-accent: #94a3b8; }
.kpi-network { --kpi-accent: #60a5fa; }
.kpi-sites { --kpi-accent: #fbbf24; }
.kpi-maintenance { --kpi-accent: #c084fc; }
.kpi-icon { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; background: color-mix(in srgb, var(--kpi-accent) 12%, #101827); border: 1px solid color-mix(in srgb, var(--kpi-accent) 24%, transparent); border-radius: 13px; font-size: 1.35rem; }
.kpi-data { min-width: 0; }
.kpi-data h2 { font-size: 2rem; line-height: 1; font-weight: 750; letter-spacing: -0.04em; color: #f8fafc; font-variant-numeric: tabular-nums; }
.kpi-data p { font-size: 0.78rem; line-height: 1.35; color: #aab7c8; font-weight: 600; margin-top: 7px; }

.alerts-panel { margin: -4px 0 24px; padding: 18px 20px; background: linear-gradient(135deg, rgba(17, 24, 39, 0.88), rgba(12, 18, 30, 0.92)); border: 1px solid rgba(71, 85, 105, 0.38); border-radius: 15px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14); }
.alerts-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.alerts-header-actions { display: flex; align-items: center; gap: 10px; }
.alerts-header h2 { color: #f1f5f9; font-size: 0.96rem; font-weight: 700; letter-spacing: -0.015em; }
.alerts-header p { color: #91a0b5; font-size: 0.76rem; margin-top: 4px; }
.alerts-count { flex: 0 0 auto; padding: 6px 10px; color: #aab7c8; background: rgba(148, 163, 184, 0.08); border: 1px solid rgba(148, 163, 184, 0.16); border-radius: 999px; font-size: 0.72rem; font-weight: 650; }
.alerts-list { display: grid; gap: 8px; max-height: 240px; overflow-y: auto; }
.alerts-list:not(:empty) { margin-top: 14px; }
.alert-item { min-width: 0; display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid rgba(100, 116, 139, 0.18); border-radius: 10px; background: rgba(8, 13, 22, 0.52); }
.alert-item.critical { border-left: 3px solid #f87171; }
.alert-item.warning { border-left: 3px solid #fbbf24; }
.alert-indicator { width: 8px; height: 8px; flex: 0 0 8px; margin-top: 4px; border-radius: 50%; background: #fbbf24; }
.alert-item.critical .alert-indicator { background: #f87171; }
.alert-copy { min-width: 0; display: grid; gap: 3px; }
.alert-copy strong { color: #e2e8f0; font-size: 0.78rem; font-weight: 650; overflow-wrap: anywhere; }
.alert-copy span { color: #91a0b5; font-size: 0.72rem; line-height: 1.4; }
.alerts-empty { padding: 12px 13px; color: #8fa0b4; font-size: 0.78rem; background: rgba(8, 13, 22, 0.42); border: 1px solid rgba(100, 116, 139, 0.14); border-radius: 9px; }

.modulo-seccion { display: none; }
.modulo-seccion.active { display: block; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.toolbar-inputs { display: flex; gap: 16px; flex: 1; max-width: 600px; }
.input-search { flex: 2; background: rgba(8, 13, 22, 0.82); border: 1px solid rgba(100, 116, 139, 0.25); padding: 13px 16px; border-radius: 10px; color: #ffffff; outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.select-sede { flex: 1; background: rgba(8, 13, 22, 0.82); border: 1px solid rgba(100, 116, 139, 0.25); padding: 13px 16px; border-radius: 10px; color: #ffffff; outline: none; cursor: pointer; }
.select-estado-pc { flex: 1.35; min-width: 180px; background: rgba(8, 13, 22, 0.82); border: 1px solid rgba(100, 116, 139, 0.25); padding: 13px 14px; border-radius: 10px; color: #ffffff; outline: none; cursor: pointer; }
.input-search:focus, .select-sede:focus, .select-estado-pc:focus { border-color: rgba(96, 165, 250, 0.7); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12); }
.pc-status-help { color: #94a3b8; font-size: 0.82rem; margin: -8px 0 18px; line-height: 1.5; }

.toolbar-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-modulo-action { padding: 12px 18px; border-radius: 10px; border: none; font-size: 0.84rem; font-weight: 650; cursor: pointer; display: flex; align-items: center; gap: 8px; color: #ffffff; transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; }
.btn-modulo-action:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 5px 14px rgba(0, 0, 0, 0.2); }
.btn-modulo-action.green { background: var(--green-btn); color: #000000; }
.btn-modulo-action.blue { background: var(--blue-btn); color: #000000; }
.btn-modulo-action.dark { background: #1e293b; border: 1px solid var(--border-color); color: #ffffff; }
.btn-modulo-action.red-outline { background: transparent; border: 1px solid var(--red-btn); color: var(--red-btn); }

#mod-computadores .toolbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: 16px; background: rgba(17, 24, 39, 0.58); border: 1px solid var(--border-color); border-radius: 16px; }
#mod-computadores .toolbar-inputs { width: 100%; max-width: none; display: grid; grid-template-columns: minmax(180px, 1.6fr) minmax(150px, 1fr) minmax(180px, 1.2fr); gap: 12px; }
#mod-computadores .toolbar-inputs > * { min-width: 0; }
#mod-computadores .toolbar-actions { justify-content: flex-end; padding-top: 14px; margin-top: 14px; border-top: 1px solid rgba(71, 85, 105, 0.35); }
#mod-computadores .btn-modulo-action { min-height: 42px; padding: 10px 14px; }
#mod-computadores .pc-status-help { padding: 10px 14px; margin: -8px 0 18px; background: rgba(30, 41, 59, 0.48); border: 1px solid rgba(71, 85, 105, 0.28); border-left: 3px solid #60a5fa; border-radius: 8px; }
.inventory-view-switch { display: inline-flex; align-items: center; gap: 3px; padding: 4px; background: rgba(7, 12, 21, 0.76); border: 1px solid rgba(100, 116, 139, 0.3); border-radius: 10px; }
.inventory-view-btn { min-height: 34px; padding: 7px 11px; color: #aab7c8; background: transparent; border: 1px solid transparent; border-radius: 7px; font-size: 0.76rem; font-weight: 650; cursor: pointer; transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease; }
.inventory-view-btn:hover { color: #f8fafc; background: rgba(148, 163, 184, 0.08); }
.inventory-view-btn.active { color: #fbbf24; background: rgba(245, 158, 11, 0.11); border-color: rgba(245, 158, 11, 0.2); }
.inventory-view-btn[hidden] { display: none !important; }

.masivo-panel { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 20px 24px; margin-bottom: 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-sm); }
.masivo-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.masivo-title { font-size: 1rem; font-weight: 800; color: var(--accent-orange); display: flex; align-items: center; gap: 8px; }
.masivo-controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.masivo-input-msg { background: #07090e; border: 1px solid var(--border-color); padding: 10px 16px; border-radius: 10px; color: #fff; font-size: 16px; width: 260px; outline: none; }
.btn-masivo { padding: 10px 16px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, 0.08); font-weight: 650; font-size: 0.82rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: filter 0.2s ease, transform 0.2s ease; }
.btn-masivo:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-masivo.orange { background: var(--accent-orange); color: #000; }
.btn-masivo.indigo { background: var(--purple-btn); color: #fff; }
.btn-masivo.red { background: var(--red-btn); color: #fff; }
.btn-masivo.blue { background: var(--blue-btn); color: #000; }

.computer-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 4px 0 14px; padding: 10px 13px; background: rgba(17, 24, 39, 0.52); border: 1px solid rgba(71, 85, 105, 0.28); border-radius: 11px; }
.pagination-summary, .pagination-current { color: #91a0b5; font-size: 0.78rem; }
.pagination-summary strong, .pagination-current strong { color: #e2e8f0; font-weight: 700; }
.pagination-controls { display: flex; align-items: center; gap: 12px; }
.pagination-btn { min-height: 34px; padding: 7px 11px; color: #dbe5f2; background: rgba(30, 41, 59, 0.72); border: 1px solid rgba(100, 116, 139, 0.32); border-radius: 8px; font-size: 0.76rem; font-weight: 600; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease; }
.pagination-btn:hover:not(:disabled) { background: rgba(51, 65, 85, 0.86); border-color: rgba(148, 163, 184, 0.48); }
.pagination-btn:disabled { color: #65748a; cursor: not-allowed; opacity: 0.58; }
.screen-monitor-status { color: #7dd3fc; font-size: 0.68rem; }

.computers-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 16px; }
#grid-computadores.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pc-card.compact { padding: 12px 12px 14px; }
.pc-card.compact .pc-title-row { margin-bottom: 10px; }
.pc-card.compact .pc-sub-info { margin-bottom: 10px; font-size: 0.72rem; }
.pc-card.compact .pc-metrics-grid { gap: 8px; }
.pc-card.compact .metric-group { gap: 4px; }
.pc-card.compact .screen-preview { min-height: 86px; }
.pc-card.compact .pc-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pc-card.compact .actions-area { margin-top: 12px; }
.pc-card.compact .btn-action-pc { padding: 8px 10px; font-size: 0.72rem; }
.computers-grid.table-mode { display: block; }
.computers-grid.table-mode > .inventory-table-wrap { width: 100%; overflow-x: auto; border: 1px solid rgba(71, 85, 105, 0.42); border-radius: 14px; background: rgba(12, 18, 30, 0.92); scrollbar-color: #475569 #0b1220; }
.inventory-table { width: 100%; min-width: 1080px; border-collapse: separate; border-spacing: 0; text-align: left; }
.inventory-table caption { padding: 0; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); position: absolute; white-space: nowrap; }
.inventory-table th { position: sticky; top: 0; z-index: 1; padding: 12px 14px; color: #aebbd0; background: #111b2b; border-bottom: 1px solid rgba(100, 116, 139, 0.28); font-size: 0.69rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.inventory-table td { padding: 11px 14px; color: #dbe5f2; border-bottom: 1px solid rgba(71, 85, 105, 0.22); font-size: 0.76rem; vertical-align: middle; }
.inventory-device-row { background: rgba(17, 24, 39, 0.55); transition: background 0.18s ease; }
.inventory-device-row:hover { background: rgba(30, 41, 59, 0.72); }
.inventory-device-row.critical { box-shadow: inset 3px 0 #f87171; }
.inventory-device-row.offline td { color: #9aa8bb; }
.inventory-device-row:last-of-type td { border-bottom: 0; }
.inventory-device-name { display: flex; align-items: center; gap: 8px; min-width: 170px; }
.inventory-device-name > span:nth-of-type(2) { max-width: 145px; overflow: hidden; color: #f1f5f9; font-size: 0.79rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.inventory-device-name .pc-computer-icon { width: 27px; height: 27px; flex-basis: 27px; }
.inventory-device-name .pc-checkbox { width: 15px; height: 15px; flex: 0 0 15px; accent-color: #f59e0b; cursor: pointer; }
.inventory-details-toggle { flex: 0 0 auto; padding: 4px 7px; color: #7dd3fc; background: rgba(56, 189, 248, 0.08); border: 1px solid rgba(56, 189, 248, 0.2); border-radius: 6px; font-size: 0.66rem; font-weight: 650; cursor: pointer; }
.inventory-details-toggle:hover { background: rgba(56, 189, 248, 0.16); }
.inventory-table td:nth-child(2) strong, .inventory-table td:nth-child(2) small { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inventory-table td:nth-child(2) strong { color: #e2e8f0; font-size: 0.74rem; font-weight: 650; }
.inventory-table td:nth-child(2) small { margin-top: 4px; color: #8292a8; font-size: 0.68rem; }
.inventory-metrics { display: grid; gap: 5px; min-width: 150px; }
.inventory-metric { display: grid; grid-template-columns: 34px minmax(42px, 1fr) 32px; align-items: center; gap: 7px; color: #94a3b8; font-size: 0.65rem; }
.inventory-metric strong { color: #dbe5f2; font-size: 0.65rem; font-variant-numeric: tabular-nums; text-align: right; }
.inventory-metric-bar { height: 4px; overflow: hidden; background: #263348; border-radius: 99px; }
.inventory-metric-bar i { display: block; height: 100%; border-radius: inherit; }
.inventory-last-report { display: block; min-width: 125px; color: #aab7c8; font-size: 0.7rem; line-height: 1.4; }
.inventory-screen { position: relative; display: grid; place-items: center; width: 92px; height: 54px; overflow: hidden; background: #030712; border: 1px solid rgba(100, 116, 139, 0.28); border-radius: 7px; }
.inventory-screen img { display: block; width: 100%; height: 100%; object-fit: contain; }
.inventory-screen > span { position: absolute; right: 3px; bottom: 3px; max-width: calc(100% - 6px); padding: 2px 4px; color: #e2e8f0; background: rgba(2, 6, 23, 0.86); border-radius: 4px; font-size: 0.56rem; }
.inventory-screen > .inventory-screen-empty { position: static; padding: 3px; color: #8292a8; background: transparent; text-align: center; font-size: 0.58rem; }
.inventory-actions { display: flex; flex-wrap: wrap; gap: 5px; min-width: 170px; max-width: 200px; }
.inventory-action-btn { display: grid; place-items: center; width: 29px; height: 28px; padding: 0; color: #cbd5e1; background: rgba(30, 41, 59, 0.8); border: 1px solid rgba(100, 116, 139, 0.28); border-radius: 7px; font-size: 0.77rem; cursor: pointer; }
.inventory-action-btn:hover:not(:disabled) { color: #fff; background: rgba(51, 65, 85, 0.9); border-color: rgba(148, 163, 184, 0.45); }
.inventory-action-btn:disabled { opacity: 0.38; cursor: not-allowed; }
.inventory-readonly { color: #91a0b5; font-size: 0.7rem; }
.inventory-details-row[hidden] { display: none; }
.inventory-details-row > td { padding: 14px 18px; background: rgba(7, 12, 21, 0.72); }
.inventory-details-row .hardware-details { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pc-card { min-width: 0; background: linear-gradient(150deg, rgba(17, 24, 39, 0.98), rgba(12, 18, 30, 0.96)); border: 1px solid rgba(71, 85, 105, 0.42); border-radius: 15px; padding: 16px; position: relative; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
.pc-card:hover { border-color: rgba(100, 116, 139, 0.64); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); transform: translateY(-1px); }
.pc-card.critico { border-color: rgba(248, 113, 113, 0.78); box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.1), 0 8px 20px rgba(239, 68, 68, 0.08); }

.pc-title-row { min-width: 0; font-size: 1rem; font-weight: 700; margin-bottom: 11px; color: #ffffff; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pc-heading { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pc-heading .pc-checkbox { width: 16px; height: 16px; flex: 0 0 16px; accent-color: #f59e0b; cursor: pointer; }
.pc-heading .pc-checkbox:disabled { cursor: not-allowed; }
.pc-computer-icon { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 30px; color: #7dd3fc; background: rgba(56, 189, 248, 0.1); border: 1px solid rgba(56, 189, 248, 0.16); border-radius: 9px; font-size: 1rem; }
.pc-hostname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f1f5f9; }
.pc-card.offline { border-color: rgba(148, 163, 184, 0.3); }
.pc-card.offline .pc-metrics-grid, .pc-card.offline .screen-preview { opacity: 0.55; }
.pc-status-badge { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; font-size: 0.64rem; font-weight: 750; white-space: nowrap; }
.pc-status-badge.online { color: #6ee7b7; background: rgba(16, 185, 129, 0.14); border: 1px solid rgba(16, 185, 129, 0.3); }
.pc-status-badge.offline { color: #cbd5e1; background: rgba(148, 163, 184, 0.12); border: 1px solid rgba(148, 163, 184, 0.25); }
.pc-alert-chip { flex: 0 0 auto; padding: 4px 7px; color: #fecaca; background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.24); border-radius: 999px; font-size: 0.62rem; font-weight: 700; }
.pc-sub-info { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 13px; }
.pc-site, .pc-ip { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #9eacc0; font-size: 0.7rem; }
.pc-ip { color: #8493a9; font-variant-numeric: tabular-nums; }
.pc-offline-notice { color: #fbbf24; font-size: 0.7rem; margin: -5px 0 11px; }

.pc-metrics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.metric-group { min-width: 0; margin: 0; padding: 9px 8px; background: rgba(8, 13, 22, 0.56); border: 1px solid rgba(71, 85, 105, 0.24); border-radius: 9px; }
.metric-label { min-width: 0; font-size: 0.68rem; font-weight: 650; margin-bottom: 7px; color: #aab7c8; display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.metric-label span:last-child { color: #f1f5f9 !important; font-size: 0.7rem; font-variant-numeric: tabular-nums; }
.bar-bg { background: #1d293b; height: 5px; border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; transition: width 0.4s ease, background 0.4s ease; }

.screen-preview { position: relative; width: 100%; min-height: 126px; max-height: 220px; aspect-ratio: 16 / 9; background: radial-gradient(ellipse at center, #111c2d, #030712 78%); border-radius: 10px; display: flex; justify-content: center; align-items: center; color: #aab7c8; font-size: 0.74rem; line-height: 1.45; text-align: center; margin-bottom: 12px; border: 1px solid rgba(100, 116, 139, 0.36); overflow: hidden; }
.screen-preview.pending { border-style: dashed; border-color: rgba(96, 165, 250, 0.35); background: repeating-linear-gradient(135deg, #080e1a, #080e1a 10px, #0b1321 10px, #0b1321 20px); }
.screen-preview.pending span { max-width: 220px; padding: 12px; }
.screen-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.screen-capture-label { position: absolute; right: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 5px 8px; color: #e2e8f0; background: rgba(2, 6, 23, 0.84); border: 1px solid rgba(148, 163, 184, 0.22); border-radius: 7px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3); backdrop-filter: blur(8px); font-size: 0.64rem; font-weight: 600; }

.pc-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 4px; }
.accordion-btn { width: 100%; min-width: 0; background: rgba(30, 41, 59, 0.68); border: 1px solid rgba(71, 85, 105, 0.34); color: #dbe5f2; padding: 9px 10px; border-radius: 8px; font-size: 0.69rem; font-weight: 600; line-height: 1.25; text-align: left; margin: 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.accordion-btn:hover { background: rgba(51, 65, 85, 0.7); border-color: rgba(100, 116, 139, 0.55); }
.pc-info-grid > .accordion-content { grid-column: 1 / -1; min-width: 0; }
.hardware-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid rgba(100, 116, 139, 0.2); border-radius: 8px; background: rgba(100, 116, 139, 0.18); }
.hardware-detail { min-width: 0; padding: 9px 10px; background: #0a0f1d; }
.hardware-detail dt { color: #91a0b5; font-size: 0.7rem; font-weight: 600; margin-bottom: 3px; }
.hardware-detail dd { color: #e2e8f0; font-size: 0.78rem; font-weight: 550; overflow-wrap: anywhere; }

.actions-area { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(71, 85, 105, 0.28); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.btn-action-pc { min-width: 0; width: 100%; padding: 9px 7px; border-radius: 8px; border: none; font-size: 0.7rem; line-height: 1.25; font-weight: 650; cursor: pointer; text-align: center; }
.actions-area > .btn-action-pc.blue-full { grid-column: 1 / -1; }
.btn-action-pc.purple { background: var(--purple-btn); color: #ffffff; }
.btn-action-pc.green { background: var(--green-btn); color: #000000; }
.btn-action-pc.indigo { background: var(--purple-btn); color: #ffffff; }
.btn-action-pc.orange { background: var(--accent-orange); color: #000000; }
.btn-action-pc.red { background: var(--red-btn); color: #ffffff; }
.btn-action-pc.blue-full { background: var(--blue-btn); color: #000000; }
.btn-action-pc:disabled { cursor: not-allowed; opacity: 0.4; filter: grayscale(0.35); }
.btn-row { display: contents; }
.btn-row button { flex: 1; }

.solo-lectura-msg { background: rgba(239, 68, 68, 0.1); border: 1px solid var(--red-btn); color: var(--red-btn); padding: 10px; border-radius: 10px; font-size: 0.82rem; text-align: center; font-weight: 700; }

.modulo-box-vacio { background: linear-gradient(145deg, rgba(17, 24, 39, 0.84), rgba(11, 17, 29, 0.9)); border: 1px solid rgba(100, 116, 139, 0.22); border-radius: 16px; padding: clamp(32px, 5vw, 58px) 20px; text-align: center; grid-column: 1 / -1; }
.modulo-box-vacio h2 { color: #f8fafc; margin-bottom: 9px; font-size: 1.25rem; font-weight: 650; letter-spacing: -0.02em; }
.modulo-box-vacio p { color: #94a3b8; font-size: 0.88rem; line-height: 1.6; }

.tabla-custom { width: 100%; border-collapse: collapse; margin-top: 15px; background: var(--card-bg); border-radius: 14px; overflow: hidden; border: 1px solid var(--border-color); }
.tabla-custom th, .tabla-custom td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border-color); font-size: 0.9rem; }
.tabla-custom th { background: var(--card-inner); color: var(--accent-orange); font-weight: 700; }

.admin-panel { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 18px; padding: 30px; margin-top: 20px; }
.admin-panel h2 { color: var(--accent-orange); margin-bottom: 20px; font-size: 1.4rem; }
.module-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 4px 0 18px; padding: 20px 22px; background: linear-gradient(125deg, rgba(17, 24, 39, 0.94), rgba(12, 18, 30, 0.8)); border: 1px solid rgba(71, 85, 105, 0.38); border-radius: 15px; }
.module-intro h2 { color: #f8fafc; font-size: 1.12rem; letter-spacing: -0.02em; }
.module-intro p { max-width: 740px; margin-top: 6px; color: #94a3b8; font-size: 0.8rem; line-height: 1.55; }
.module-stat-grid, .report-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.module-stat-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-width: 0; padding: 15px 17px; background: rgba(17, 24, 39, 0.82); border: 1px solid rgba(71, 85, 105, 0.32); border-radius: 12px; }
.module-stat-card span { color: #aab7c8; font-size: 0.76rem; font-weight: 600; }
.module-stat-card strong { color: #f8fafc; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.module-table-wrap { width: 100%; overflow-x: auto; border: 1px solid rgba(71, 85, 105, 0.38); border-radius: 13px; background: rgba(12, 18, 30, 0.72); scrollbar-color: #475569 #0b1220; }
.tabla-custom.module-table { width: 100%; min-width: 780px; margin: 0; border: 0; border-radius: 0; background: transparent; }
.module-table th { position: sticky; top: 0; z-index: 1; padding: 12px 14px; color: #aebbd0; background: #111b2b; border-bottom: 1px solid rgba(100, 116, 139, 0.28); font-size: 0.68rem; letter-spacing: 0.055em; text-transform: uppercase; white-space: nowrap; }
.module-table td { max-width: 320px; padding: 12px 14px; color: #cbd5e1; font-size: 0.76rem; line-height: 1.45; vertical-align: middle; overflow-wrap: anywhere; }
.module-table td strong, .module-table td small { display: block; }
.module-table td strong { color: #f1f5f9; font-weight: 650; }
.module-table td small { margin-top: 4px; color: #8292a8; font-size: 0.68rem; line-height: 1.4; }
.module-table .module-empty { padding: 28px 16px; color: #94a3b8; text-align: center; }
.module-status { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 8px; color: #cbd5e1; background: rgba(148, 163, 184, 0.1); border: 1px solid rgba(148, 163, 184, 0.2); border-radius: 999px; font-size: 0.66rem; font-weight: 700; white-space: nowrap; }
.status-critica { color: #fecaca; background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.28); }
.status-advertencia { color: #fde68a; background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.24); }
.status-activa { color: #fecaca; background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.28); }
.status-reconocida { color: #bfdbfe; background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.24); }
.status-resuelta { color: #a7f3d0; background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.24); }
.alert-toolbar .toolbar-inputs { width: 100%; max-width: none; display: grid; grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(150px, 1fr)); }
.alert-table { min-width: 900px; }
.alert-stat-card { min-height: 72px; }
.module-muted { color: #718096; }
.status-urgente, .status-fallido { color: #fecaca; background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.28); }
.status-alta, .status-en-progreso { color: #fed7aa; background: rgba(249, 115, 22, 0.12); border-color: rgba(249, 115, 22, 0.28); }
.status-media, .status-pendiente, .status-programado, .status-programada, .status-en-espera { color: #fde68a; background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.24); }
.status-resuelto, .status-cerrado, .status-completada, .status-completado, .status-en-uso { color: #a7f3d0; background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.24); }
.status-en-reparacion, .status-no-aplica { color: #bfdbfe; background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.24); }
.table-action-link { padding: 6px 9px; color: #7dd3fc; background: rgba(56, 189, 248, 0.08); border: 1px solid rgba(56, 189, 248, 0.2); border-radius: 7px; font-size: 0.69rem; font-weight: 650; cursor: pointer; white-space: nowrap; }
.table-action-link:hover { color: #e0f2fe; background: rgba(56, 189, 248, 0.16); }
.module-subheading { margin: 24px 0 12px; color: #e2e8f0; font-size: 0.98rem; }
.report-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.report-summary-card { display: flex; align-items: center; gap: 14px; min-height: 95px; padding: 17px; background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(13, 21, 38, 0.86)); border: 1px solid rgba(71, 85, 105, 0.38); border-radius: 13px; }
.report-summary-card > span { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.16); border-radius: 11px; font-size: 1.2rem; }
.report-summary-card div { display: grid; gap: 5px; min-width: 0; }
.report-summary-card small { color: #94a3b8; font-size: 0.72rem; }
.report-summary-card strong { color: #f8fafc; font-size: 1.55rem; line-height: 1; font-variant-numeric: tabular-nums; }
.report-disclaimer { margin-top: 16px; padding: 12px 14px; color: #aab7c8; background: rgba(30, 41, 59, 0.48); border-left: 3px solid #60a5fa; border-radius: 8px; font-size: 0.78rem; line-height: 1.5; }
.form-row { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.form-row input, .form-row select { background: var(--card-inner); border: 1px solid var(--border-color); padding: 12px 16px; border-radius: 10px; color: #fff; flex: 1; min-width: 180px; }
.form-row button { background: var(--green-btn); color: #000; border: none; padding: 12px 24px; border-radius: 10px; font-weight: 700; cursor: pointer; }

.btn-ver-pass { background: rgba(255,255,255,0.08); border: 1px solid var(--border-color); border-radius: 6px; padding: 4px 8px; font-size: 0.78rem; cursor: pointer; margin-left: 8px; }
.btn-edit-alias { background: rgba(56, 189, 248, 0.1); border: 1px solid var(--blue-btn); color: var(--blue-btn); border-radius: 6px; padding: 4px 8px; font-size: 0.75rem; cursor: pointer; margin-left: 6px; font-weight: 700; }
@media (max-width: 1100px) {
  .sidebar-lateral {
    width: 240px;
  }

  .sidebar-item {
    white-space: normal;
    line-height: 1.25;
  }

  .main-content-area {
    padding: 24px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .module-stat-grid, .report-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .computers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  #grid-computadores.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  header {
    align-items: flex-start;
    gap: 18px;
  }

  .title-area h1 {
    font-size: 1.55rem;
  }
}

@media (max-width: 720px) {
  .app-layout {
    flex-direction: column;
  }

  .sidebar-lateral,
  .sidebar-lateral.collapsed {
    width: 100%;
    height: auto;
    min-height: 0;
    position: relative;
    overflow: visible;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-header {
    grid-column: 1 / -1;
    padding: 14px 16px;
  }

  .sidebar-lateral.collapsed .sidebar-brand-info {
    display: flex;
  }

  .sidebar-lateral.collapsed .sidebar-brand-info h2 {
    display: block;
  }

  .sidebar-lateral.collapsed .sidebar-item {
    padding: 12px 14px;
    justify-content: flex-start;
    gap: 10px;
  }

  .sidebar-lateral.collapsed .sidebar-item span.menu-text {
    display: inline;
  }

  .sidebar-item {
    min-width: 0;
    padding: 12px 14px;
    white-space: normal;
    font-size: 0.82rem;
  }

  .sidebar-item span.menu-text {
    display: inline;
  }

  .sidebar-lateral.collapsed .sidebar-header {
    justify-content: space-between;
  }

  .sidebar-lateral.collapsed .btn-toggle-sidebar {
    margin: 0;
  }

  .main-content-area {
    padding: 20px 16px;
  }

  .module-intro { align-items: stretch; flex-direction: column; padding: 16px; }
  .module-intro .btn-modulo-action { justify-content: center; }
  .alert-toolbar .toolbar-inputs { grid-template-columns: minmax(0, 1fr); }

  header {
    flex-direction: column;
    margin-bottom: 20px;
    padding-bottom: 16px;
  }

  .user-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .btn-user {
    flex: 1 1 auto;
  }

  .kpi-grid {
    gap: 12px;
    margin-bottom: 20px;
  }

  .alerts-panel {
    padding: 15px;
    margin-bottom: 20px;
  }
  .alerts-header { align-items: flex-start; flex-direction: column; }
  .alerts-header-actions { width: 100%; justify-content: space-between; }

  .kpi-card {
    padding: 14px;
    gap: 10px;
  }

  .kpi-icon {
    padding: 10px;
    font-size: 1.4rem;
  }

  .kpi-data h2 {
    font-size: 1.7rem;
  }

  .kpi-data p {
    font-size: 0.68rem;
  }

  .toolbar-inputs {
    width: 100%;
    max-width: none;
    flex-direction: column;
  }

  #mod-computadores .toolbar-inputs {
    display: flex;
  }

  .toolbar-inputs input,
  .toolbar-inputs select {
    min-height: 46px;
  }

  .pc-sub-info {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .pc-sub-info > span:last-child {
    margin-left: 0;
    text-align: left;
  }

  .toolbar-actions {
    width: 100%;
  }

  #mod-computadores .toolbar-actions {
    justify-content: stretch;
  }

  .toolbar-actions .btn-modulo-action {
    flex: 1 1 140px;
    justify-content: center;
  }

  .masivo-panel {
    padding: 16px;
  }

  .masivo-controls {
    width: 100%;
  }

  .masivo-input-msg {
    width: 100%;
  }

  .masivo-controls .btn-masivo {
    flex: 1 1 130px;
    justify-content: center;
  }

  .computers-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .inventory-view-switch { flex: 1 1 100%; justify-content: center; }
  .inventory-view-btn { flex: 1 1 auto; }
  .inventory-details-row .hardware-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  #grid-computadores.compact {
    grid-template-columns: minmax(0, 1fr);
  }

  .computer-pagination {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .pagination-controls {
    width: 100%;
    justify-content: space-between;
  }

  .hardware-details {
    grid-template-columns: minmax(0, 1fr);
  }

  .tabla-custom {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .admin-panel {
    padding: 18px;
  }

  .form-row {
    flex-direction: column;
  }

  .form-row input,
  .form-row select,
  .form-row button {
    width: 100%;
  }

  .modal-box {
    padding: 24px;
  }

  .maintenance-dialog .modal-inputs {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .maintenance-dialog .modal-field.full-width {
    grid-column: auto;
  }

  .modal-actions .modal-btn {
    flex: 1;
  }
}

@media (max-width: 420px) {
  .kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .title-area h1 {
    font-size: 1.35rem;
  }

  .caja-login {
    padding: 28px 22px;
  }
}