/* Copyright (c) 2026 Jose Enrique Carrillo (jcarrillo.ojd@gmail.com)
 * The Office FS — Software propietario. Todos los derechos reservados. Ver archivo LICENSE. */
  :root {
    --bg: #4f494b;
    --panel: rgba(11, 23, 48, 0.78);
    --panel-strong: rgba(13, 27, 56, 0.90);
    --card: rgba(20, 39, 78, 0.62);
    --line: rgba(147, 197, 253, 0.16);
    --glass-border: rgba(186, 230, 253, 0.24);
    --ink: #f1f5f9;
    --muted: #9eb1cc;
    --warn: #f6ad7b;
    --ok: #6ee7b7;
    --work: #f4975c;
    --queue: #f6c979;
    --fs-peach: #fbc49c;
    --fs-orange-pastel: #f4975c;
    --fs-orange-soft: rgba(244, 151, 92, 0.20);
    --fs-amber-soft: rgba(246, 201, 121, 0.22);
    --fs-sky-soft: rgba(147, 197, 253, 0.20);
    --fs-mint-soft: rgba(110, 231, 183, 0.16);
    --shadow-lg: 0 22px 54px rgba(4, 10, 24, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    --shadow-sm: 0 8px 24px rgba(4, 10, 24, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  .ico { width: 14px; height: 14px; vertical-align: -2px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; display: inline-block; }
  .ico-lg { width: 18px; height: 18px; vertical-align: -3px; }

  html, body {
    height: 100%;
    background: #4f494b;
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Helvetica, Arial, sans-serif;
    overflow: hidden;
  }

  /* Barra superior flotante Deep Blue Liquid Glass + Firstrong suave */
  header {
    position: fixed;
    top: 12px;
    left: 14px;
    right: 14px;
    height: 54px;
    background: var(--panel);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 25;
  }
  .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; letter-spacing: .08em; color: #f8fafc; }
  .brand span.hl { color: #f4975c; }
  .pill {
    background: var(--fs-mint-soft);
    color: #6ee7b7;
    border: 1px solid rgba(110, 231, 183, 0.32);
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0;
  }
  .controls { display: flex; align-items: center; gap: 7px; font-size: 12px; }
  select, button, input, textarea {
    background: rgba(15, 31, 66, 0.72);
    color: var(--ink);
    border: 1px solid rgba(147, 197, 253, 0.24);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 12px;
    font-family: inherit;
    transition: all 0.16s ease;
  }
  select:focus, input:focus, textarea:focus {
    outline: none;
    border-color: #f4975c;
    background: rgba(18, 38, 78, 0.92);
    box-shadow: 0 0 0 3px rgba(244, 151, 92, 0.22);
  }
  button {
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(4, 10, 24, 0.22);
  }
  button:hover:not(:disabled) {
    border-color: rgba(244, 151, 92, 0.65);
    background: rgba(28, 54, 106, 0.85);
    transform: translateY(-0.5px);
  }
  button:disabled { opacity: 0.45; cursor: not-allowed; }
  .btn-primary {
    background: linear-gradient(135deg, #f4975c, #f6ad7b);
    border-color: rgba(247, 178, 131, 0.65);
    color: #1c1008;
    box-shadow: 0 4px 14px rgba(244, 151, 92, 0.30);
  }
  .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #f6ad7b, #fbc49c);
    color: #140b05;
  }
  .btn-danger {
    background: linear-gradient(135deg, #fb7185, #f43f5e);
    border-color: rgba(251, 113, 133, 0.5);
    color: #fff;
  }
  .btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
  }
  .user-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(20, 39, 78, 0.72);
    border: 1px solid rgba(147, 197, 253, 0.25);
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 11px;
    color: var(--ink);
  }
  .avatar-foto-wrap {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex: none;
    border: 2px solid var(--c, #f4975c);
    box-shadow: 0 0 14px var(--c, #f4975c), 0 0 24px rgba(244, 151, 92, 0.28);
    overflow: hidden;
    background: #0d1b38;
  }
  .avatar-foto-wrap.editable { cursor: pointer; }
  .avatar-foto-wrap img, .avatar-foto-wrap canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .avatar-foto-wrap.editable::after {
    content: "Editar"; font-size: 10px; font-weight: 700; color: #fff;
    position: absolute;
    inset: 0;
    background: rgba(9, 18, 38, 0.62);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.15s;
  }
  .avatar-foto-wrap.editable:hover::after { opacity: 1; }

  .main {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
  }
  #vista {
    position: absolute;
    inset: 0;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
    background: #4f494b;
  }
  #vista.arrastrando { cursor: grabbing; }
  #lienzo {
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: 0 0;
    image-rendering: auto;
  }
  #etiquetas {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
  }
  .ayuda {
    position: absolute;
    left: 16px;
    bottom: 14px;
    z-index: 6;
    font-size: 11px;
    color: var(--muted);
    background: var(--panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    padding: 7px 12px;
    border-radius: 999px;
    pointer-events: none;
  }

  /* Tarjetas flotantes Deep Blue Liquid Glass */
  .placa {
    position: absolute;
    transform: translate(-50%, 6px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    min-width: 198px;
    max-width: 260px;
    background: rgba(11, 23, 48, 0.86);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(186, 230, 253, 0.25);
    border-left: 3px solid rgba(244, 151, 92, 0.75);
    border-radius: 14px;
    padding: 8px 12px;
    font-size: 11px;
    line-height: 1.34;
    color: var(--ink);
    box-shadow: 0 14px 32px rgba(4, 10, 24, 0.42);
    transition: opacity .16s ease, transform .16s ease;
    display: flex;
    gap: 10px;
    align-items: center;
  }
  .placa.hover {
    opacity: 1;
    transform: translate(-50%, -4px) scale(1.03);
  }
  .placa canvas.ava, .placa img.ava {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex: none;
    object-fit: cover;
    background: #0d1b38;
    border: 2px solid var(--c, #f4975c);
    box-shadow: 0 0 12px var(--c, #f4975c);
  }
  .placa .tx { min-width: 0; flex: 1; }
  .placa b { font-size: 12px; letter-spacing: .03em; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
  .placa .cli { color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .placa .st { margin-top: 2px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .placa .perm { font-size: 9.5px; color: var(--muted); margin-top: 2px; display: flex; justify-content: space-between; }

  /* Inspector derecho flotante Deep Blue Liquid Glass */
  aside {
    position: fixed;
    top: 78px;
    right: 14px;
    bottom: 14px;
    width: 396px;
    background: var(--panel);
    backdrop-filter: blur(26px) saturate(180%);
    -webkit-backdrop-filter: blur(26px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 18;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  body.panel-oculto aside {
    transform: translateX(430px);
    opacity: 0;
    pointer-events: none;
  }
  .panel-sec { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .panel-sec h2 { font-size: 16px; margin-bottom: 4px; color: var(--ink); }
  .muted { color: var(--muted); font-size: 12px; }
  .alert-lock {
    background: rgba(251, 113, 133, 0.14);
    border: 1px solid rgba(251, 113, 133, 0.35);
    color: #fecdd3;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 12px;
    margin-top: 8px;
  }
  .alert-ok {
    background: rgba(110, 231, 183, 0.12);
    border: 1px solid rgba(110, 231, 183, 0.32);
    color: #a7f3d0;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 12px;
    margin-top: 8px;
  }
  .skill-box {
    background: var(--card);
    border: 1px solid rgba(147, 197, 253, 0.16);
    box-shadow: 0 4px 14px rgba(4, 10, 24, 0.22);
    border-radius: 14px;
    padding: 12px;
    margin-top: 8px;
  }
  .skill-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
  .tag-dev { font-size: 10px; background: rgba(246, 201, 121, 0.18); color: #fde68a; padding: 2px 8px; border-radius: 999px; font-weight: 700; }
  .tag-act { font-size: 10px; background: rgba(110, 231, 183, 0.16); color: #6ee7b7; padding: 2px 8px; border-radius: 999px; font-weight: 700; }
  .field { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
  .field label { font-size: 11px; color: var(--muted); font-weight: 600; }
  .logs { flex: 1; overflow-y: auto; padding: 12px 16px; }
  .log-item {
    font-size: 12px;
    padding: 9px 11px;
    background: var(--card);
    border: 1px solid rgba(147, 197, 253, 0.16);
    box-shadow: 0 2px 10px rgba(4, 10, 24, 0.18);
    border-radius: 12px;
    margin-bottom: 8px;
  }
  .log-item .meta { font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: 3px; }

  /* Pantalla de Login Deep Blue Liquid Glass + Firstrong suave */
  #login-screen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 30% 25%, rgba(19, 41, 86, 0.86), rgba(8, 16, 36, 0.94));
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
  }
  #login-screen.oculto { display: none; }
  .login-card {
    background: var(--panel-strong);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid var(--glass-border);
    border-top: 3px solid #f4975c;
    border-radius: 24px;
    width: min(440px, 100%);
    padding: 26px 26px 22px;
    box-shadow: var(--shadow-lg);
  }
  .quick-acc {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    border-radius: 10px;
    background: rgba(20, 39, 78, 0.65);
    border: 1px solid rgba(147, 197, 253, 0.18);
    margin-top: 5px;
    font-size: 11px;
    cursor: pointer;
  }
  .quick-acc:hover { border-color: #f4975c; background: rgba(28, 54, 106, 0.85); }

  /* Modales Deep Blue Liquid Glass */
  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 11, 26, 0.62);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 60;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
  }
  .modal-overlay.abierto { display: flex; }
  .modal-card {
    background: var(--panel-strong);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.96);
    border-radius: 22px;
    width: min(500px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px 22px;
    box-shadow: var(--shadow-lg);
    position: relative;
  }
  .modal-top-bar {
    position: sticky;
    top: -20px;
    z-index: 5;
    display: flex;
    justify-content: flex-end;
    margin: -10px -8px 6px 0;
    pointer-events: none;
  }
  .modal-close-top {
    pointer-events: auto;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.45);
    color: #e2e8f0;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  }
  .modal-close-top:hover { background: rgba(239, 68, 68, 0.25); border-color: rgba(248, 113, 113, 0.65); color: #fff; }
  .preview-box {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(241, 245, 249, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    padding: 10px 14px;
    margin: 10px 0;
  }
  .preview-box canvas {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--work);
  .placa .ava-wrap { position: relative; }
  .placa.has-pend { border-color: rgba(244, 151, 92, 0.78); box-shadow: 0 0 14px rgba(244, 151, 92, 0.28); }
  .placa.senior {
    border: 1.5px solid #ff7a18;
    border-left: 4px solid #ff6b00;
    background: linear-gradient(135deg, rgba(22, 24, 42, 0.94), rgba(194, 65, 12, 0.58));
    box-shadow: 0 0 24px rgba(249, 115, 22, 0.85), 0 0 44px rgba(249, 115, 22, 0.42), inset 0 0 18px rgba(249, 115, 22, 0.30);
  }
  .panel-sec.senior-card {
    border: 1.5px solid #ff7a18 !important;
    background: linear-gradient(135deg, rgba(14, 24, 48, 0.94), rgba(154, 52, 18, 0.42)) !important;
    box-shadow: 0 0 26px rgba(249, 115, 22, 0.65), 0 0 46px rgba(249, 115, 22, 0.25), inset 0 0 18px rgba(249, 115, 22, 0.22) !important;
  }
  .badge-pend {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 17px; height: 17px; padding: 0 5px;
    border-radius: 999px; font-size: 10px; font-weight: 800;
    background: linear-gradient(135deg, #f97316, #ea580c); color: #fff;
    margin-left: 5px; vertical-align: middle;
    box-shadow: 0 2px 6px rgba(234, 88, 12, 0.45);
  }
