:root {
    --os-bg: #1b2838;
    --os-taskbar: #0d1117;
    --os-taskbar-h: 42px;
    --os-window-titlebar: #1e3a5c;
    --os-window-bg: #f0f2f5;
    --os-accent: #c9a227;
    --os-text: #e6edf3;
    --os-sidebar-w: 220px;
    --os-radius: 6px;
}

/* === RESET === */
body.csr-os, html { margin:0; padding:0; width:100%; height:100%; overflow:hidden; font-family:'Segoe UI',system-ui,sans-serif; font-size:14px; }

/* Desktop/taskbar ocultos até desbloquear (lock ou boot) */
body.csr-os.os-locked #osDesktop,
body.csr-os.os-locked .os-taskbar,
body.csr-os.os-locked #osPrograms,
body.csr-os.os-boot-pending #osDesktop,
body.csr-os.os-boot-pending .os-taskbar,
body.csr-os.os-boot-pending #osPrograms {
    visibility: hidden;
    pointer-events: none;
}

/* === LOCK SCREEN === */
.os-lockscreen {
    position:fixed; top:0; left:0; width:100%; height:100%; z-index:9000;
    display:flex; flex-direction:column;
    align-items:center; justify-content:center;
    background: linear-gradient(135deg, #0d1117 0%, #1b2838 50%, #0d1117 100%);
    color:#e6edf3;
}
.os-lock-avatar { width:80px; height:80px; border-radius:50%; background:rgba(255,255,255,0.1); display:flex; align-items:center; justify-content:center; font-size:36px; color:var(--os-accent); margin-bottom:16px; border:2px solid rgba(255,255,255,0.1); }
.os-lock-user { font-size:18px; font-weight:600; margin-bottom:20px; }
.os-lock-form { display:flex; gap:8px; }
.os-lock-input { padding:10px 16px; border-radius:4px; border:1px solid rgba(255,255,255,0.15); background:rgba(255,255,255,0.08); color:#fff; font-size:14px; width:240px; outline:none; }
.os-lock-input:focus { border-color:var(--os-accent); }
.os-lock-input::placeholder { color:rgba(255,255,255,0.3); }
.os-lock-btn { padding:10px 20px; border-radius:4px; border:none; background:var(--os-accent); color:#000; font-weight:700; font-size:13px; cursor:pointer; }
.os-lock-btn:hover { background:#d4ad2e; }
.os-lock-form-guest {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: min(280px, 85vw);
}
.os-lock-form-row {
    display: flex;
    gap: 8px;
    width: 100%;
}
.os-lock-form-guest .os-lock-email {
    width: 100%;
    box-sizing: border-box;
}
.os-lock-form-guest .os-lock-input:not(.os-lock-email) {
    flex: 1;
    min-width: 0;
}
.os-lock-signup {
    margin-top: 14px;
    font-size: 12px;
}
.os-lock-signup a {
    color: var(--os-accent);
    text-decoration: none;
}
.os-lock-signup a:hover {
    text-decoration: underline;
}
.os-lock-time { font-size:48px; font-weight:200; margin-bottom:4px; letter-spacing:2px; }
.os-lock-date { font-size:14px; color:rgba(255,255,255,0.5); margin-bottom:30px; }

/* === DESKTOP === */
.os-desktop {
    width:100%; height:calc(100% - var(--os-taskbar-h));
    background: #2a3a4e;
    display:flex; flex-direction:column; flex-wrap:wrap; align-content:flex-start;
    padding:20px 16px; gap:4px; overflow-y:auto; box-sizing:border-box;
    position:relative;
}
.os-desktop::before {
    content:'\f3ed'; font-family:'Font Awesome 6 Free'; font-weight:900;
    position:absolute; top:50%; left:55%; transform:translate(-50%,-55%);
    font-size:280px; color:rgba(255,255,255,0.10); pointer-events:none;
}
.os-desktop::after {
    content:'Departamento de Policia Civil\ASIIC - Sistema Integrado de Investigacao Criminal';
    position:absolute; top:50%; left:55%; transform:translate(-50%, calc(-50% + 160px));
    font-size:14px; letter-spacing:3px; text-transform:uppercase;
    color:rgba(255,255,255,0.12); pointer-events:none; text-align:center;
    font-weight:600; white-space:pre; line-height:1.8;
}
.os-desktop-blur { filter:blur(3px) brightness(0.5); pointer-events:none; position:fixed; top:0; left:0; z-index:0; }

/* Desktop icons */
.os-icon {
    width:90px; padding:10px 4px; border-radius:6px; cursor:pointer;
    display:flex; flex-direction:column; align-items:center; gap:6px;
    transition:background .15s; text-decoration:none;
}
.os-icon:hover { background:rgba(255,255,255,0.08); }

/* Sem caso em andamento: só Meus Casos + Manual */
body.csr-sem-partida .os-icon-investigacao { display:none !important; }
.os-icon-img {
    width:48px; height:48px; border-radius:10px; display:flex;
    align-items:center; justify-content:center; font-size:22px; color:#fff;
}
.os-icon-label { font-size:11px; color:#d1d5db; text-align:center; line-height:1.3; word-break:break-word; text-shadow:0 1px 3px rgba(0,0,0,0.8); }

/* Icon colors */
.os-icon-siic .os-icon-img { background:linear-gradient(135deg,#1e3a5c,#2c5282); }
.os-icon-renape .os-icon-img { background:linear-gradient(135deg,#065f46,#059669); }
.os-icon-denatran .os-icon-img { background:linear-gradient(135deg,#92400e,#d97706); }
.os-icon-infocrim .os-icon-img { background:linear-gradient(135deg,#7f1d1d,#dc2626); }
.os-icon-trabalho .os-icon-img { background:linear-gradient(135deg,#1e40af,#3b82f6); }
.os-icon-saude .os-icon-img { background:linear-gradient(135deg,#047857,#10b981); }
.os-icon-educacao .os-icon-img { background:linear-gradient(135deg,#1e3a8a,#3b82f6); }
.os-icon-pulse .os-icon-img { background:linear-gradient(135deg,#5b21b6,#a78bfa); }
.os-icon-email .os-icon-img { background:linear-gradient(135deg,#374151,#6b7280); }
.os-icon-geocid .os-icon-img { background:linear-gradient(135deg,#064e3b,#10b981); }
.os-icon-casos .os-icon-img { background:linear-gradient(135deg,#44403c,#78716c); }
.os-icon-notas .os-icon-img { background:linear-gradient(135deg,#854d0e,#ca8a04); }
.os-icon-telefonica .os-icon-img { background:linear-gradient(135deg,#4338ca,#6366f1); }
.os-icon-bacen .os-icon-img { background:linear-gradient(135deg,#166534,#22c55e); }
.os-icon-cimoc .os-icon-img { background:linear-gradient(135deg,#581c87,#a855f7); }
.os-icon-endereco .os-icon-img { background:linear-gradient(135deg,#0e7490,#06b6d4); }
.os-icon-manual .os-icon-img { background:linear-gradient(135deg,#475569,#94a3b8); }

/* === TASKBAR === */
.os-taskbar {
    height:var(--os-taskbar-h); background:var(--os-taskbar); border-top:1px solid rgba(255,255,255,0.06);
    display:flex; align-items:center; padding:0 8px; position:fixed; bottom:0; left:0; right:0; z-index:100;
}
.os-taskbar-left { display:flex; align-items:center; }
.os-taskbar-center { flex:1; display:flex; align-items:center; gap:4px; padding:0 8px; overflow-x:auto; }
.os-taskbar-right { display:flex; align-items:center; gap:8px; margin-left:auto; }
.os-taskbar-btn { width:36px; height:32px; border:none; border-radius:4px; background:transparent; color:#8b949e; cursor:pointer; font-size:16px; display:flex; align-items:center; justify-content:center; }
.os-taskbar-btn:hover { background:rgba(255,255,255,0.08); color:#e6edf3; }
.os-start { color:var(--os-accent); font-size:18px; }
.os-taskbar-app {
    padding:4px 12px; border-radius:4px; font-size:12px; color:#8b949e;
    display:flex; align-items:center; gap:6px; cursor:pointer; background:transparent;
    border-bottom:2px solid transparent; height:28px;
}
.os-taskbar-app.active { background:rgba(255,255,255,0.06); color:#e6edf3; border-bottom-color:var(--os-accent); }
.os-taskbar-app:hover { background:rgba(255,255,255,0.08); }
.os-taskbar-user { font-size:11px; color:#8b949e; }
.os-taskbar-clock { font-size:12px; color:#e6edf3; font-weight:500; min-width:45px; text-align:right; }

/* === WINDOW === */
.os-window {
    position:fixed; top:0; left:0; right:0; bottom:var(--os-taskbar-h);
    display:flex; flex-direction:column; z-index:10;
    background:var(--os-window-bg); border-bottom:1px solid rgba(0,0,0,0.1);
}
.os-window-titlebar {
    height:36px; background:var(--os-window-titlebar); color:#fff;
    display:flex; align-items:center; justify-content:space-between;
    padding:0 12px; flex-shrink:0; border-bottom:2px solid var(--os-accent);
}
.os-window-titlebar-left { display:flex; align-items:center; gap:8px; font-size:13px; font-weight:600; letter-spacing:0.5px; }
.os-window-titlebar-left i { color:var(--os-accent); font-size:14px; }
.os-window-titlebar-right { display:flex; gap:2px; }
.os-window-btn { width:28px; height:24px; border:none; border-radius:3px; background:transparent; color:rgba(255,255,255,0.6); cursor:pointer; font-size:12px; display:flex; align-items:center; justify-content:center; }
.os-window-btn:hover { background:rgba(255,255,255,0.15); color:#fff; }
.os-window-close:hover { background:#e81123; color:#fff; }

/* Window body */
.os-window-body { flex:1; overflow-y:auto; padding:20px 28px; }
.os-window-body-sidebar { display:flex; padding:0; }

/* Program sidebar */
.os-program-sidebar {
    width:var(--os-sidebar-w); min-width:var(--os-sidebar-w);
    background:#fff; border-right:1px solid #d1d5db; overflow-y:auto; flex-shrink:0;
}
.os-program-sidebar-section {
    padding:10px 14px 4px; font-size:9px; font-weight:700;
    text-transform:uppercase; letter-spacing:1.2px; color:#9ca3af;
    border-top:1px solid #f3f4f6; margin-top:4px;
}
.os-program-sidebar-section:first-child { border-top:none; margin-top:0; }
.os-program-sidebar-item {
    display:flex; align-items:center; gap:10px; padding:7px 14px;
    font-size:12px; color:#374151; text-decoration:none;
    border-left:3px solid transparent; transition:all .1s;
}
.os-program-sidebar-item:hover { background:#f9fafb; color:#1e3a5c; text-decoration:none; }
.os-program-sidebar-item.active { background:#eff6ff; color:#1e3a5c; font-weight:600; border-left-color:#1e3a5c; }
.os-program-sidebar-item i { width:16px; text-align:center; font-size:12px; color:#6b7280; }
.os-program-sidebar-item.active i { color:#1e3a5c; }
.os-program-content { flex:1; overflow-y:auto; padding:20px 24px; background:#f3f4f6; }

/* === REUSE OLD STYLES === */
/* Cards, buttons, tables, docs, etc - keep from old CSS */

.csr-card { background:#fff; border:1px solid #e2e8f0; border-radius:6px; padding:20px; }
.csr-card-header { font-size:15px; font-weight:600; color:#1e3a5c; padding-bottom:12px; margin-bottom:16px; border-bottom:2px solid var(--os-accent); }

.csr-btn { padding:8px 20px; border-radius:4px; border:1px solid transparent; font-size:13px; font-weight:600; cursor:pointer; transition:all .2s; display:inline-flex; align-items:center; gap:6px; }
.csr-btn-primary { background:#1e3a5c; color:#fff; }
.csr-btn-primary:hover { background:#2c5282; }
.csr-btn-outline { background:transparent; border-color:#e2e8f0; color:#1a202c; }
.csr-btn-outline:hover { border-color:#1e3a5c; color:#1e3a5c; }
.csr-btn-sm { padding:5px 12px; font-size:12px; }
.csr-btn:disabled { opacity:.5; cursor:not-allowed; }

.csr-badge { display:inline-block; padding:2px 8px; border-radius:3px; font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.5px; }
.csr-badge-facil { background:#c6f6d5; color:#22543d; }
.csr-badge-dificil { background:#fed7d7; color:#742a2a; }
.csr-badge-andamento { background:#bee3f8; color:#2a4365; }

.csr-input, .csr-select, .csr-textarea { width:100%; padding:8px 12px; box-sizing:border-box; background:#fff; border:1px solid #e2e8f0; border-radius:4px; color:#1a202c; font-size:13px; font-family:inherit; }
.csr-input:focus, .csr-select:focus { outline:none; border-color:#1e3a5c; box-shadow:0 0 0 2px rgba(26,58,92,.1); }

.csr-empty { text-align:center; padding:50px 20px; color:#9ca3af; font-size:13px; }
.csr-empty i { font-size:40px; margin-bottom:12px; display:block; opacity:.25; }

/* Tables */
.tbl-inst { width:100%; border-collapse:collapse; font-size:12px; background:#fff; border:1px solid #c9cdd3; }
.tbl-inst th { background:#1e3a5f; color:#fff; padding:8px 10px; font-size:10px; text-transform:uppercase; letter-spacing:.5px; font-weight:600; text-align:left; }
.tbl-inst td { padding:7px 10px; border-bottom:1px solid #e5e7eb; color:#374151; }
.tbl-inst tr:nth-child(even) td { background:#f9fafb; }
.tbl-inst tr:hover td { background:#eff6ff; }

/* Docs */
.doc-oficial { background:#fff; border:1px solid #c9cdd3; font-family:'Times New Roman',Georgia,serif; font-size:13px; line-height:1.65; color:#1f2937; }
.doc-oficial-header { background:#1e3a5f; color:#fff; padding:16px 28px; display:flex; align-items:center; gap:16px; }
.doc-oficial-header .doc-brasao { font-size:28px; color:#c9a227; flex-shrink:0; }
.doc-oficial-header .doc-titulo-area { flex:1; }
.doc-oficial-header h2 { margin:0; font-size:15px; font-weight:700; letter-spacing:1px; text-transform:uppercase; }
.doc-oficial-header .doc-subtitulo { font-size:11px; opacity:.7; margin-top:2px; font-family:'Segoe UI',sans-serif; }
.doc-oficial-header .doc-numero { font-family:'Courier New',monospace; font-size:13px; font-weight:700; background:rgba(255,255,255,.15); padding:4px 12px; border-radius:3px; }
.doc-oficial-body { padding:24px 28px; }
.doc-oficial-footer { border-top:2px solid #1e3a5f; padding:12px 28px; font-size:10px; color:#6b7280; font-family:'Segoe UI',sans-serif; display:flex; justify-content:space-between; }
.doc-campo-grid { display:grid; grid-template-columns:1fr 1fr; gap:0; border:1px solid #d1d5db; margin-bottom:16px; }
.doc-campo-grid.cols-3 { grid-template-columns:1fr 1fr 1fr; }
.doc-campo { padding:8px 12px; border-bottom:1px solid #e5e7eb; border-right:1px solid #e5e7eb; }
.doc-campo-label { font-size:9px; text-transform:uppercase; letter-spacing:.8px; color:#6b7280; font-family:'Segoe UI',sans-serif; font-weight:600; margin-bottom:2px; }
.doc-campo-valor { font-size:13px; color:#111827; }
.doc-campo-full { grid-column:1/-1; padding:12px; border-bottom:1px solid #e5e7eb; }
.doc-narrativa { text-align:justify; text-indent:2em; margin:16px 0; padding:12px 0; border-top:1px solid #e5e7eb; }

/* Busca */
.busca-box { background:#fff; border:1px solid #c9cdd3; padding:16px; margin-bottom:16px; }
.busca-box h4 { margin:0 0 12px; font-size:13px; color:#1e3a5c; }
.busca-row { display:flex; gap:8px; }
.busca-row .csr-input { flex:1; }

/* Fichas */
.ficha-policial { background:#fff; border:1px solid #c9cdd3; margin-bottom:12px; }
.ficha-policial-header { background:#f8f9fa; padding:10px 16px; border-bottom:1px solid #d1d5db; display:flex; align-items:center; gap:14px; }
.ficha-avatar { width:44px; height:44px; border-radius:4px; background:#1e3a5f; color:#fff; display:flex; align-items:center; justify-content:center; font-size:16px; font-weight:700; flex-shrink:0; }
.ficha-nome { font-size:14px; font-weight:700; color:#111827; }
.ficha-detalhe { font-size:11px; color:#6b7280; }

/* Evidencias */
.ev-item { display:flex; align-items:flex-start; gap:10px; padding:10px 14px; border:1px solid #d1d5db; background:#fff; margin-bottom:6px; font-size:12px; }
.ev-titulo { font-weight:600; color:#111827; font-size:13px; }
.ev-desc { color:#6b7280; margin-top:2px; }

/* Solicitacao */
.sol-card { padding:10px 14px; border-left:3px solid #d1d5db; background:#fff; margin-bottom:8px; font-size:12px; }
.sol-card-deferida { border-left-color:#16a34a; }
.sol-card-indeferida { border-left-color:#dc2626; }
.sol-card-pendente { border-left-color:#d97706; }

/* Laudo */
.laudo-secao-titulo { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:1px; color:#1e3a5f; padding:8px 0; border-bottom:1px solid #1e3a5f; margin-bottom:12px; display:flex; align-items:center; gap:8px; }
.laudo-secao-texto { font-size:13px; line-height:2; text-align:justify; text-indent:2em; color:#1f2937; }

/* Nota badge */
.nota-badge { width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:14px; color:#fff; }
.nota-exemplar { background:#16a34a; }
.nota-aceito { background:#2563eb; }
.nota-fragil { background:#d97706; }
.nota-insuficiente { background:#dc2626; }
.nota-arquivado { background:#6b7280; }

@media (max-width:768px) {
    .os-window-body-sidebar { flex-direction:column; }
    .os-program-sidebar { width:100%; min-width:100%; max-height:160px; border-right:none; border-bottom:1px solid #d1d5db; }
    .os-program-content { padding:12px; }
    .doc-campo-grid { grid-template-columns:1fr; }
}


/* Boot screen */
@keyframes pulse {
    0%, 100% { opacity: 0.25; }
    50% { opacity: 0.7; }
}


/* === PROGRAM WINDOWS === */
.os-program-window {
    position:fixed; top:0; left:0; width:100%; height:calc(100% - var(--os-taskbar-h));
    z-index:10; display:none; flex-direction:column; background:var(--os-window-bg);
}
.os-program-window.visible { display:flex; }
.os-program-window .os-window-titlebar {
    height:36px; min-height:36px; background:#1e3a5c; color:#fff;
    display:flex; align-items:center; justify-content:space-between;
    padding:0 12px; flex-shrink:0; border-bottom:2px solid #c9a227;
}
.os-window-titlebar-left { display:flex; align-items:center; gap:8px; font-size:13px; font-weight:600; letter-spacing:.5px; }
.os-window-titlebar-left i { color:#c9a227; font-size:14px; }
.os-window-titlebar-right { display:flex; gap:2px; }
.os-window-btn {
    width:28px; height:24px; border:none; border-radius:3px;
    background:transparent; color:rgba(255,255,255,.6); cursor:pointer;
    font-size:12px; display:flex; align-items:center; justify-content:center;
}
.os-window-btn:hover { background:rgba(255,255,255,.15); color:#fff; }
.os-window-close:hover { background:#e81123; color:#fff; }
.os-program-iframe {
    flex:1; border:none; width:100%; height:0; min-height:0;
}


/* === START MENU === */
.os-start-menu {
    display:none; position:absolute; bottom:var(--os-taskbar-h); left:8px;
    width:220px; background:#161b22; border:1px solid rgba(255,255,255,0.08);
    border-radius:8px 8px 0 0; box-shadow:0 -4px 20px rgba(0,0,0,0.5);
    z-index:200; overflow:hidden;
}
.os-start-menu.open { display:block; }
.os-start-header {
    padding:14px 16px; font-size:13px; font-weight:700; color:#c9a227;
    border-bottom:1px solid rgba(255,255,255,0.06); letter-spacing:1px;
    display:flex; align-items:center; gap:8px;
}
.os-start-item {
    padding:10px 16px; font-size:13px; color:#c9d1d9; cursor:pointer;
    display:flex; align-items:center; gap:10px; transition:background .1s;
}
.os-start-item:hover { background:rgba(255,255,255,0.06); }
.os-start-item i { width:16px; text-align:center; color:#8b949e; font-size:13px; }
.os-start-danger { color:#f87171; }
.os-start-danger i { color:#f87171; }
.os-start-danger:hover { background:rgba(248,113,113,0.1); }
.os-start-separator { height:1px; background:rgba(255,255,255,0.06); margin:4px 0; }


/* Lock screen shutdown button */
.os-lock-shutdown {
    position:fixed; bottom:20px; right:20px;
    width:40px; height:40px; border-radius:50%;
    background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.1);
    color:rgba(255,255,255,0.4); font-size:16px; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    transition:all .2s;
}
.os-lock-shutdown:hover {
    background:rgba(248,113,113,0.15); border-color:rgba(248,113,113,0.3);
    color:#f87171;
}


/* === BOOT SCREEN (ligar) — estilo Linux/Ubuntu === */
.os-bootscreen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 2147483646;
    background: #000; display: flex; flex-direction: column;
    align-items: center; justify-content: center; cursor: pointer;
}
.os-boot-idle {
    display: flex; flex-direction: column; align-items: center; text-align: center;
}
.os-boot-linux-title {
    font-family: "Ubuntu Mono", Consolas, Monaco, "Courier New", monospace;
    font-size: 14px; color: rgba(255,255,255,0.45); letter-spacing: 0.4px;
    margin-bottom: 10px;
}
.os-bootscreen.os-boot-ativo,
.os-bootscreen.os-boot-linux {
    cursor: default; align-items: stretch; justify-content: flex-start;
    padding: 0;
}
.os-boot-console {
    flex: 1; display: flex; flex-direction: column;
    width: 100%; height: 100%; min-height: 0;
    padding: 14px 18px 18px;
    font-family: "Ubuntu Mono", Consolas, Monaco, "Courier New", monospace;
    font-size: 13px; line-height: 1.45;
    background: #000;
}
.os-boot-console-inner {
    flex: 1; overflow-y: auto; min-height: 0;
    scrollbar-width: thin; scrollbar-color: #333 #000;
}
.os-boot-console-inner::-webkit-scrollbar { width: 6px; }
.os-boot-console-inner::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
.os-boot-banner {
    color: #e0e0e0; font-weight: 600; margin-bottom: 2px;
}
.os-boot-banner-spacer { height: 8px; }
.os-boot-kernel {
    color: #b0b0b0; white-space: pre-wrap; word-break: break-word;
    margin-bottom: 1px;
}
.os-boot-systemd {
    color: #d4d4d4; margin-bottom: 1px;
}
.os-boot-st { font-weight: 700; }
.os-boot-st.ok { color: #87d787; }
.os-boot-st.wait { color: #888; }
.os-boot-cursor-row {
    flex-shrink: 0; margin-top: 6px; min-height: 1.45em;
}
.os-boot-cursor {
    color: #87d787; animation: osBootBlink 1s step-end infinite;
}
.os-boot-ready {
    color: #e0e0e0;
}
@keyframes osBootBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
body.os-boot-pending .mom-cc-root,
body.os-boot-pending .mom-cc-banner,
body.os-boot-pending #mom-cc-root {
    display: none !important;
}
.os-boot-icon {
    width: 88px; height: 88px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; color: rgba(255,255,255,0.15);
    transition: all .3s; margin-bottom: 16px;
}
.os-boot-power {
    font-size: 40px; line-height: 1; font-family: Segoe UI Symbol, sans-serif;
}
.os-bootscreen:hover .os-boot-icon {
    border-color: rgba(201,162,39,0.4); color: rgba(201,162,39,0.6);
    box-shadow: 0 0 30px rgba(201,162,39,0.1);
}
.os-boot-text {
    font-size: 12px; color: rgba(255,255,255,0.22);
    animation: pulse 2s infinite; letter-spacing: 1px;
}
.os-boot-text kbd {
    background:rgba(255,255,255,0.12); padding:3px 10px; border-radius:3px;
    font-family:monospace; color:#c9a227; font-size:13px; font-weight:700;
    border:1px solid rgba(255,255,255,0.08);
}


/* === TASKBAR TRAY === */
.os-taskbar-tray {
    display:flex; align-items:center; gap:10px;
    font-size:12px; color:#6e7681;
}
.os-taskbar-tray i { cursor:default; }
.os-taskbar-tray i:hover { color:#c9d1d9; }
.os-taskbar-separator {
    width:1px; height:18px; background:rgba(255,255,255,0.08); margin:0 4px;
}
.os-taskbar-date {
    font-size:11px; color:#8b949e; min-width:70px; text-align: right;
}


/* Taskbar datetime stacked */
.os-taskbar-datetime {
    display:flex; flex-direction:column; align-items:flex-end;
    line-height:1.2;
}


/* Programas que ocupam 100% da janela */
.os-window-body:has(.notepad) { padding:0; display:flex; flex-direction:column; }


/* =============================================================================
   SIIC OS — Mobile (telefone / tablet retrato)
   ============================================================================= */
@media (max-width: 768px) {
    :root {
        --os-taskbar-h: 52px;
    }

    body.csr-os.os-mobile {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    /* Launcher: sem marca d'agua desktop */
    .os-desktop::before,
    .os-desktop::after { display: none; }

    .os-desktop {
        height: calc(100% - var(--os-taskbar-h) - env(safe-area-inset-bottom, 0px));
    }

    /* Taskbar compacta */
    .os-taskbar {
        height: calc(var(--os-taskbar-h) + env(safe-area-inset-bottom, 0px));
        padding: 0 6px env(safe-area-inset-bottom, 0px);
    }
    .os-taskbar-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    .os-taskbar-tray,
    .os-taskbar-user,
    .os-taskbar-separator,
    .os-taskbar-date,
    .os-taskbar-center { display: none !important; }

    .os-taskbar-mobile-title {
        flex: 1;
        text-align: center;
        font-size: 13px;
        font-weight: 600;
        color: #e6edf3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0 8px;
        display: none;
    }
    body.csr-os.os-mobile.os-app-open .os-taskbar-mobile-title { display: block; }

    .os-start-menu {
        left: 0;
        right: 0;
        width: auto;
        max-height: 70vh;
        border-radius: 16px 16px 0 0;
        bottom: calc(var(--os-taskbar-h) + env(safe-area-inset-bottom, 0px));
    }
    .os-start-item { padding: 14px 18px; font-size: 15px; }

    /* App em tela cheia */
    .os-program-window {
        height: calc(100% - var(--os-taskbar-h) - env(safe-area-inset-bottom, 0px));
        z-index: 50;
    }
    .os-program-window .os-window-titlebar {
        height: 44px;
        min-height: 44px;
        padding: 0 8px;
    }
    .os-window-titlebar-left span {
        max-width: 55vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .os-window-btn {
        width: 40px;
        height: 36px;
        font-size: 16px;
    }
    .os-mobile-back { color: #c9a227 !important; }
    .os-mobile-back i { font-size: 18px !important; }
    .os-window-btn.os-mobile-min { display: none; }

    /* Lock / boot mobile */
    .os-lock-time { font-size: 56px; }
    .os-lock-input { width: min(280px, 85vw); font-size: 16px; }
    .os-lock-btn { min-width: 48px; }
    .os-boot-text kbd { display: none; }

    /* Tabelas e docs nos apps */
    .doc-campo-grid,
    .doc-campo-grid.cols-3 { grid-template-columns: 1fr; }
    .busca-row { flex-direction: column; }
}

/* Desktop: esconder titulo mobile */
.os-taskbar-mobile-title { display: none; }
