/* ============================================================
   Portfólio Diego Boscolo — estilo Windows XP
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  font-family: "Tahoma", "Verdana", sans-serif;
  font-size: 11px;
  user-select: none;
  -webkit-user-select: none;
}

button {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; color: inherit;
}

a { color: inherit; text-decoration: none; }

.hidden { display: none !important; }

/* ============================================================
   DESKTOP
   ============================================================ */
#desktop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 30px;
  background: #4b8ce8 url('../assets/bliss.jpg') no-repeat center center;
  background-size: cover;
  overflow: hidden;
}

.desktop-icons {
  position: absolute;
  top: 12px; left: 12px;
  display: grid;
  grid-template-columns: repeat(2, 82px);
  gap: 6px 8px;
  z-index: 2;
}
.desktop-icons .icon-group-start {
  margin-top: 14px; /* separador visual entre grupos */
}
.desktop-icons > span { pointer-events: none; }

.desktop-icon {
  display: flex; flex-direction: column; align-items: center;
  padding: 4px; border-radius: 2px;
  background: transparent;
  transition: background 60ms;
}
.desktop-icon:hover { background: rgba(80, 130, 245, 0.25); }
.desktop-icon.selected {
  background: rgba(80, 130, 245, 0.5);
  outline: 1px dotted rgba(255,255,255,0.75);
}
.desktop-icon img {
  width: 40px; height: 40px; object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  filter: drop-shadow(1px 1px 0 rgba(0,0,0,0.3));
  pointer-events: none;
}
.desktop-icon .icon-label {
  margin-top: 3px;
  font-size: 11px; color: #fff;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0,0,0,1), 0 0 3px rgba(0,0,0,0.7);
  line-height: 1.15;
  max-width: 78px;
  word-wrap: break-word;
  pointer-events: none;
}

/* ============================================================
   TASKBAR
   ============================================================ */
#taskbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 30px;
  background: linear-gradient(to bottom,
    #245edb 0%, #3f8ff5 8%, #1c5fdc 15%,
    #245edb 88%, #072a83 100%);
  display: flex; align-items: stretch;
  z-index: 100;
  border-top: 1px solid #08246b;
}

#start-button {
  height: 30px; display: block; flex-shrink: 0;
}
#start-button img { height: 30px; display: block; }
#start-button.active { filter: brightness(0.85); }

#taskbar-tasks {
  flex: 1;
  display: flex; align-items: center; padding: 0 6px; gap: 3px;
  overflow-x: auto; overflow-y: hidden;
  min-width: 0;
}
#taskbar-tasks::-webkit-scrollbar { display: none; }

.taskbar-task {
  height: 22px; padding: 0 12px 0 6px;
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(to bottom, #3c81f3, #1a5edb 50%, #245edb);
  color: #fff; font-size: 11px;
  border: 1px solid #072a83; border-radius: 2px;
  max-width: 180px; min-width: 140px;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.4);
  font-family: "Tahoma", sans-serif;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
}
.taskbar-task.active {
  background: linear-gradient(to bottom, #164ec0, #1a5edb 40%, #3d81f5);
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.4);
}
.taskbar-task img { width: 16px; height: 16px; flex-shrink: 0; }
.taskbar-task .task-label {
  overflow: hidden; text-overflow: ellipsis;
}

#taskbar-tray {
  display: flex; align-items: center; padding: 0 10px 0 8px; gap: 8px;
  background: linear-gradient(to bottom,
    #1697e6 0%, #14a3f0 10%, #0c78c8 50%, #1697e6 90%);
  border-left: 1px solid #0651a0;
  color: #fff; font-size: 11px;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.4);
  font-family: "Tahoma", sans-serif;
}
#taskbar-tray img { width: 16px; height: 16px; display: block; }
#language-toggle {
  display: flex; align-items: center; gap: 4px;
  padding: 2px 6px; color: #fff;
  border: 1px solid transparent; border-radius: 2px;
  font-size: 11px; font-family: "Tahoma", sans-serif;
}
#language-toggle:hover {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.15);
}
#lang-flag { font-size: 14px; }
#clock {
  padding-left: 8px; border-left: 1px solid rgba(255,255,255,0.25);
  min-width: 40px; text-align: center;
}

/* ============================================================
   MENU INICIAR
   ============================================================ */
#start-menu {
  position: fixed;
  bottom: 30px; left: 0;
  width: 380px;
  background: #ece9d8;
  border: 2px solid #0831d8; border-bottom: none;
  border-radius: 8px 8px 0 0;
  box-shadow: 3px -3px 12px rgba(0,0,0,0.35);
  font-family: "Tahoma", sans-serif; color: #222;
  overflow: hidden;
  z-index: 200;
  animation: slideUp 120ms ease-out;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.sm-header {
  min-height: 62px;
  background: linear-gradient(to right, #1c65e0 0%, #3f8ff5 50%, #1c65e0 100%);
  display: flex; align-items: center; padding: 8px 12px; gap: 12px;
  color: #fff; border-bottom: 3px solid #f5a623;
}
.sm-avatar {
  width: 44px; height: 44px;
  background: #fff; border: 2px solid #fff; border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}
.sm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sm-header-name {
  font-size: 15px; font-weight: bold;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.4);
}
.sm-header-role { font-size: 11px; opacity: 0.9; }

.sm-body { display: grid; grid-template-columns: 1fr 1fr; background: #fff; }
.sm-col { padding: 8px 6px; display: flex; flex-direction: column; gap: 1px; }
.sm-col.right { background: #d3e5fa; border-left: 1px solid #b3c6e5; }

.sm-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 6px; border-radius: 2px;
  font-size: 11px; color: #222; text-align: left; width: 100%;
}
.sm-item:hover { background: #316ac5; color: #fff; }
.sm-item img { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.sm-item.header {
  font-weight: bold; color: #0a3e91;
  padding: 6px 6px 4px; cursor: default;
  border-bottom: 1px solid #b3c6e5; margin-bottom: 4px;
}
.sm-item.header:hover { background: transparent; color: #0a3e91; }
.sm-sep { height: 1px; background: #b3c6e5; margin: 4px 0; }

.sm-footer {
  background: linear-gradient(to right, #1c65e0, #3f8ff5, #1c65e0);
  padding: 8px; display: flex; justify-content: flex-end; gap: 8px;
}
.sm-footer-btn {
  display: flex; align-items: center; gap: 6px; padding: 4px 10px;
  color: #fff; font-size: 11px;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.4);
  border-radius: 2px;
  font-family: "Tahoma", sans-serif;
}
.sm-footer-btn:hover { background: rgba(255,255,255,0.15); }
.sm-footer-btn img { width: 20px; height: 20px; }

.brand-icon {
  width: 22px; height: 22px; border-radius: 3px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: bold; font-size: 11px;
  font-family: -apple-system, sans-serif;
  flex-shrink: 0;
}
.brand-linkedin { background: #0077b5; }
.brand-github { background: #24292e; }
.brand-whatsapp { background: #25d366; }
.brand-mail { background: #ea4335; font-size: 14px; }

/* ============================================================
   JANELAS
   ============================================================ */
.window {
  position: absolute;
  font-family: "Tahoma", sans-serif;
  box-shadow: 3px 3px 12px rgba(0,0,0,0.35);
  min-width: 320px;
  min-height: 200px;
  display: flex; flex-direction: column;
}
.window.minimized {
  display: none;
}
/* Slot de conteúdo da janela — fundo branco pra não vazar o bege XP.css default */
.window > .window-content-slot,
.window .window-content-slot {
  background: #fff !important;
}
/* .window do XP.css tem fundo bege por padrão — força branco pra tudo que rende dentro */
.window {
  background: #fff !important;
}
.window .title-bar {
  cursor: move;
  user-select: none;
}
.window .title-bar-text {
  display: flex; align-items: center; gap: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.window .title-bar-text img {
  width: 16px; height: 16px; flex-shrink: 0;
}

/* Window body (para janelas simples tipo Notepad) */
.window-body {
  padding: 12px; background: #fff; font-family: "Tahoma", sans-serif;
  font-size: 12px; color: #222; line-height: 1.5;
  overflow: auto;
  flex: 1;
}
.window-body h2 { font-size: 15px; margin-bottom: 8px; color: #0a3e91; }
.window-body h3 { font-size: 12px; margin-top: 12px; margin-bottom: 4px; color: #0a3e91; }
.window-body p { margin-bottom: 8px; }
.window-body ul { margin: 4px 0 8px 18px; }
.window-body a { color: #0056d2; text-decoration: underline; }
.window-body a:hover { color: #003a99; }

/* Explorer (folder) view */
.explorer-menubar {
  background: linear-gradient(to bottom, #f3f1e5, #ece9d8);
  border-bottom: 1px solid #ada99a;
  padding: 3px 8px; display: flex; gap: 14px;
  font-family: "Tahoma", sans-serif; font-size: 11px; color: #333;
  flex-shrink: 0;
}
.explorer-menubar u { text-decoration: underline; }

.explorer-toolbar {
  background: linear-gradient(to bottom, #f3f1e5, #dcd6be);
  border-bottom: 1px solid #ada99a;
  padding: 4px 6px; display: flex; align-items: center; gap: 4px;
  font-family: "Tahoma", sans-serif; font-size: 11px;
  flex-shrink: 0;
}
.explorer-toolbar .tb-btn {
  padding: 3px 8px; display: flex; align-items: center; gap: 4px;
  border: 1px solid transparent; border-radius: 2px;
}
.explorer-toolbar .tb-btn:hover {
  border-color: #7ba9dd; background: rgba(80,130,240,0.15);
}
.explorer-toolbar button.tb-btn {
  min-width: 0 !important; height: auto; background: none;
  color: #333; font-family: "Tahoma", sans-serif; font-size: 11px;
  cursor: pointer;
}
.explorer-toolbar .tb-btn-disabled {
  opacity: 0.4; cursor: default; pointer-events: none;
}
.explorer-toolbar .tb-sep { width: 1px; height: 22px; background: #ada99a; margin: 0 4px; }

.explorer-address {
  background: #ece9d8; border-bottom: 1px solid #ada99a;
  padding: 4px 8px; display: flex; align-items: center; gap: 8px;
  font-family: "Tahoma", sans-serif; font-size: 11px;
  flex-shrink: 0;
}
.explorer-address .addr-field {
  flex: 1; height: 20px; background: #fff;
  border: 1px inset #7f9db9; padding: 2px 6px;
  display: flex; align-items: center; gap: 4px;
}
.explorer-address .addr-field img { width: 14px; height: 14px; }

.explorer-body {
  display: flex;
  flex: 1;
  min-height: 0;
  background: #fff;
}
.explorer-sidebar {
  width: 190px;
  background: linear-gradient(to bottom, #7aa6e0, #4d7ac3);
  padding: 10px; color: #fff; font-size: 11px;
  border-right: 1px solid #2a5493;
  display: flex; flex-direction: column; gap: 10px;
  font-family: "Tahoma", sans-serif;
  overflow-y: auto;
  flex-shrink: 0;
}
.sidebar-panel {
  background: linear-gradient(to bottom, #ecf3ff, #d0dff5);
  color: #222; border-radius: 4px; padding: 8px;
  border: 1px solid #7a9ccc;
}
.sidebar-panel h4 {
  font-size: 11px; color: #0a3e91;
  margin: 0 0 6px; padding-bottom: 4px;
  border-bottom: 1px solid #b3c6e5; font-weight: bold;
}
.sidebar-panel a, .sidebar-panel button {
  display: flex; align-items: center; gap: 6px;
  color: #0a3e91; text-decoration: none;
  padding: 2px 0; font-size: 11px;
  width: 100%; text-align: left; background: none;
}
.sidebar-panel a:hover, .sidebar-panel button:hover { text-decoration: underline; }
.sidebar-panel a img, .sidebar-panel button img { width: 14px; height: 14px; }
.sidebar-panel .details {
  font-size: 11px; color: #333; line-height: 1.5;
}

.explorer-items {
  flex: 1; padding: 12px;
  display: grid; grid-template-columns: repeat(auto-fill, 100px);
  gap: 8px; align-content: start; background: #fff;
  overflow-y: auto;
}
.explorer-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 4px; border-radius: 2px;
  font-family: "Tahoma", sans-serif;
  transition: background 60ms;
}
.explorer-item:hover { background: #ecf3ff; }
.explorer-item.selected {
  background: #e1eafe; outline: 1px dotted #7ba9dd;
}
.explorer-item img {
  width: 40px; height: 40px; object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  pointer-events: none;
}
.explorer-item .icon-label {
  margin-top: 4px; color: #222; font-size: 11px; text-align: center;
  max-width: 92px; word-wrap: break-word;
  pointer-events: none;
}

.explorer-status {
  background: #ece9d8; border-top: 1px solid #ada99a;
  padding: 3px 8px; display: flex;
  font-family: "Tahoma", sans-serif; font-size: 11px; color: #333;
  flex-shrink: 0;
}
.explorer-status .spacer { flex: 1; }

/* Grid de imagens de projeto */
.project-header {
  padding: 14px; border-bottom: 1px solid #dcd6be;
  background: #fff;
  flex-shrink: 0;
}
.project-header h2 {
  font-size: 16px; color: #0a3e91; margin-bottom: 4px;
}
.project-meta {
  font-size: 11px; color: #666; margin-bottom: 8px;
}
.project-description {
  font-size: 12px; color: #333; line-height: 1.5;
}
.project-tools {
  margin-top: 8px; font-size: 11px; color: #555;
}
.project-tools strong { color: #0a3e91; }

.project-gallery {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  /* Linhas com altura mínima explícita — evita que grid compress rows
     quando container é curto e faz thumbs se sobreporem */
  grid-auto-rows: min-content;
  gap: 12px;
  background: #fff !important;
  overflow-y: auto;
  flex: 1 1 auto !important;   /* preenche a altura restante da janela */
  min-height: 0 !important;     /* permite scroll interno em containers flex */
  align-content: start;         /* thumbs alinhadas no topo, sem esticar linhas */
}
/* Wrapper flexível pra garantir que a galeria expanda mesmo se o slot XP.css
   tiver alguma regra específica esquisita */
.window-content-slot > .project-gallery,
.window-content-slot .project-gallery {
  flex: 1 1 auto !important;
  background: #fff !important;
}
button.project-thumb, .project-thumb {
  aspect-ratio: 1;
  width: 100%;      /* ocupa toda a coluna do grid */
  height: auto;     /* deixa aspect-ratio calcular altura */
  background: #ece9d8;
  border: 1px solid #ada99a !important;
  min-width: 0 !important; min-height: 0 !important;
  display: flex; align-items: center; justify-content: center;
  color: #999; font-size: 11px;
  overflow: hidden;
  cursor: pointer;
  padding: 0 !important;
  transition: transform 100ms, box-shadow 100ms;
}
.project-thumb:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.project-thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-thumb.placeholder {
  background:
    repeating-linear-gradient(45deg, #f5f2df, #f5f2df 6px, #ece9d8 6px, #ece9d8 12px);
}

/* CV Selector */
.cv-selector {
  padding: 40px 20px;
  display: flex; justify-content: center; gap: 30px;
  flex-wrap: wrap;
}
.cv-option {
  display: flex; flex-direction: column; align-items: center;
  padding: 20px; border: 1px solid #ada99a;
  background: linear-gradient(to bottom, #fff, #f5f2df);
  min-width: 140px;
  border-radius: 4px;
  transition: all 100ms;
}
.cv-option:hover {
  background: linear-gradient(to bottom, #fff, #e1eafe);
  border-color: #7ba9dd;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.cv-option .flag { font-size: 48px; margin-bottom: 8px; }
.cv-option .cv-label { font-size: 13px; font-weight: bold; color: #0a3e91; }
.cv-option .cv-desc { font-size: 11px; color: #666; margin-top: 2px; }

/* Contact links */
.contact-list {
  padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.contact-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  border: 1px solid #ada99a;
  background: linear-gradient(to bottom, #fff, #f5f2df);
  border-radius: 4px;
  color: #222;
  transition: all 100ms;
}
.contact-item:hover {
  background: linear-gradient(to bottom, #fff, #e1eafe);
  border-color: #7ba9dd;
}
.contact-item .contact-icon {
  width: 40px; height: 40px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: bold; font-size: 20px;
  font-family: -apple-system, sans-serif;
  flex-shrink: 0;
}
.contact-item .contact-body { flex: 1; }
.contact-item .contact-label { font-size: 13px; font-weight: bold; color: #0a3e91; }
.contact-item .contact-value { font-size: 12px; color: #444; margin-top: 2px; }

/* ============================================================
   CLIPPY
   ============================================================ */
#clippy {
  position: fixed;
  bottom: 46px; right: 20px;
  z-index: 90;
  display: flex; align-items: flex-end; gap: 8px;
  animation: bounceIn 400ms ease-out;
}
@keyframes bounceIn {
  0% { transform: translateY(50px); opacity: 0; }
  60% { transform: translateY(-8px); opacity: 1; }
  100% { transform: translateY(0); }
}
.clippy-bubble {
  background: #fffcd7; border: 1px solid #6d6d6d;
  padding: 22px 12px 10px 12px;
  font-family: "Tahoma", sans-serif; font-size: 12px;
  color: #222; border-radius: 6px;
  box-shadow: 3px 3px 6px rgba(0,0,0,0.25);
  max-width: 280px; line-height: 1.4; position: relative;
}
.clippy-bubble::after {
  content: ''; position: absolute;
  bottom: 30px; right: -8px; width: 0; height: 0;
  border-top: 6px solid transparent; border-bottom: 6px solid transparent;
  border-left: 8px solid #fffcd7;
  filter: drop-shadow(1px 0 0 #6d6d6d);
}
button.clippy-close {
  position: absolute; top: 4px; right: 4px;
  width: 16px !important; height: 16px !important;
  min-width: 0 !important; min-height: 0 !important;
  background: #d4d0c8; border: 1px solid #6d6d6d;
  border-radius: 2px; font-size: 10px; line-height: 12px;
  color: #222; font-family: "Tahoma", sans-serif;
  padding: 0 !important; margin: 0;
  display: flex; align-items: center; justify-content: center;
  box-sizing: border-box;
}
button.clippy-close:hover { background: #e8e2c5; }
button.clippy-close:active { background: #b8b4a8; }
.clippy-char {
  width: 100px; height: 100px; flex-shrink: 0;
  display: flex; align-items: flex-end; justify-content: center;
}
.clippy-char img {
  width: 100px; height: 100px;
  image-rendering: -webkit-optimize-contrast;
  animation: roverIdle 3s ease-in-out infinite;
  transform-origin: center bottom;
}
@keyframes roverIdle {
  0%, 92%, 100% { transform: rotate(0deg) translateY(0); }
  94% { transform: rotate(-3deg) translateY(-2px); }
  96% { transform: rotate(3deg) translateY(-2px); }
  98% { transform: rotate(-2deg) translateY(-1px); }
}

/* ============================================================
   MOBILE — soft block
   ============================================================ */
#mobile-view { display: none; }
#mobile-modal { display: none; }

@media (max-width: 767px) {
  html, body { overflow: auto; }
  #desktop, #taskbar, #start-menu, #clippy { display: none !important; }
  #mobile-view {
    display: flex;
    align-items: center; justify-content: center;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    padding: 24px 20px;
    background:
      linear-gradient(180deg, rgba(75,140,232,0.85) 0%, rgba(107,167,240,0.75) 55%, rgba(121,176,74,0.6) 100%),
      url('../assets/bliss.jpg') no-repeat center center;
    background-size: cover;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    font-family: -apple-system, "Segoe UI", sans-serif;
  }
  /* Modo "force desktop" — usuário optou por acessar mesmo assim */
  body.force-desktop #mobile-view { display: none !important; }
  body.force-desktop #desktop { display: block !important; }
  body.force-desktop #taskbar { display: flex !important; }
  body.force-desktop html, body.force-desktop body { overflow: hidden; }
}

.mb-container {
  width: 100%; max-width: 420px;
  background: #fff;
  border-radius: 20px;
  padding: 32px 24px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  text-align: center;
  margin: auto;
}
.mb-icon {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  background: #f5f5f7;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
}
.mb-icon img { width: 42px; height: 42px; }
.mb-title {
  font-size: 26px; font-weight: 700; color: #111;
  margin-bottom: 8px;
}
.mb-message {
  font-size: 15px; line-height: 1.55;
  color: #333;
  margin-bottom: 12px;
}
.mb-sub {
  font-size: 14px; line-height: 1.5;
  color: #666;
  margin-bottom: 20px;
  padding: 10px 14px;
  background: #f5f5f7;
  border-radius: 10px;
}
.mb-actions {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 20px;
}
.mb-action, .mb-action-primary {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: #f5f5f7;
  border-radius: 14px;
  color: #222; text-decoration: none;
  text-align: left;
  transition: background 100ms, transform 80ms;
  min-height: 60px;
}
.mb-action:active, .mb-action-primary:active {
  background: #ebebef; transform: scale(0.98);
}
.mb-action-primary {
  background: linear-gradient(135deg, #25d366, #1eb954);
  color: #fff;
}
.mb-action-primary:active { background: #1a9d47; }
.mb-a-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: bold; font-size: 15px;
  flex-shrink: 0;
}
.mb-action-primary .mb-a-icon {
  background: rgba(255,255,255,0.25);
  border: 1px solid rgba(255,255,255,0.4);
}
.mb-a-label {
  font-size: 14px; font-weight: 600;
}
.mb-a-sub {
  font-size: 12px; opacity: 0.7; margin-top: 2px;
}
.mb-action-primary .mb-a-sub { opacity: 0.9; }

.mb-force {
  width: 100%;
  padding: 12px 16px !important;
  background: none !important;
  border: 1px solid #ddd !important;
  border-radius: 10px;
  color: #666; font-size: 13px;
  min-height: 42px; min-width: 0 !important;
  font-family: -apple-system, "Segoe UI", sans-serif;
}
.mb-force:active { background: #f5f5f7 !important; }
.mb-force-hint {
  font-size: 11px; color: #999;
  margin-top: 6px; margin-bottom: 20px;
  font-style: italic;
}

.mb-footer {
  padding-top: 16px;
  border-top: 1px solid #eee;
  font-size: 11px; color: #999;
  line-height: 1.6;
}
.mb-footer button {
  margin-top: 8px;
  padding: 6px 12px !important;
  border: 1px solid #ddd !important;
  border-radius: 8px;
  background: #fff;
  color: #333; font-size: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  min-width: 0 !important;
}
.mb-footer button:active { background: #f5f5f7; }

#mobile-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #fff;
  z-index: 500;
  flex-direction: column;
}
#mobile-modal:not(.hidden) { display: flex; }
.mobile-modal-header {
  min-height: 52px;
  background: linear-gradient(to bottom,
    #0058e6 0%, #3390ff 10%, #1974e6 55%, #0058e6 100%);
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  color: #fff; font-weight: bold; font-size: 14px;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.4);
  flex-shrink: 0;
}
#mobile-modal-close {
  width: 32px; height: 32px;
  background: linear-gradient(to bottom, #f19b8c, #d93526 45%, #a01c10);
  color: #fff; border: 1px solid rgba(0,0,0,0.3);
  border-radius: 3px; font-size: 14px; font-weight: bold;
}
#mobile-modal-body {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============================================================
   OUTLOOK EXPRESS — janela de compor mensagem
   ============================================================ */
.window.oe-window {
  min-width: 500px;
  min-height: 400px;
}

.oe-toolbar {
  background: linear-gradient(to bottom, #f5f3e5, #dcd6be);
  border-bottom: 1px solid #ada99a;
  padding: 4px 6px;
  display: flex; align-items: center; gap: 2px;
  font-family: "Tahoma", sans-serif; font-size: 10px;
  color: #333;
  flex-shrink: 0;
  overflow-x: auto;
}
.oe-toolbar::-webkit-scrollbar { display: none; }

.oe-tb-btn {
  padding: 4px 8px;
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; min-width: 46px !important;
  border: 1px solid transparent; border-radius: 2px;
  background: transparent; color: #333; font-size: 10px;
  font-family: "Tahoma", sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.oe-tb-btn:hover { border-color: #7ba9dd; background: rgba(80,130,240,0.15); }
.oe-tb-btn.oe-tb-primary {
  color: #0a3e91; font-weight: bold;
}
.oe-tb-btn:disabled, .oe-format-bar button:disabled, .oe-format-bar select:disabled {
  opacity: 0.5; cursor: default;
}
.oe-tb-icon { font-size: 18px; line-height: 1; }
.oe-tb-sep {
  width: 1px; height: 34px;
  background: #ada99a;
  margin: 0 4px;
  flex-shrink: 0;
}

.oe-form {
  background: #ece9d8;
  padding: 0;
  display: flex; flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.oe-field {
  display: flex; align-items: center;
  background: #ece9d8;
  border-bottom: 1px solid #b8b39f;
  padding: 0;
  flex-shrink: 0;
}
.oe-field-label {
  width: 100px;
  padding: 4px 8px;
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
  color: #333;
  background: #ece9d8;
  border-right: 1px solid #b8b39f;
  flex-shrink: 0;
  font-weight: bold;
}
.oe-field-input {
  flex: 1;
  padding: 4px 8px;
  border: none;
  background: #fff;
  font-family: "Tahoma", sans-serif;
  font-size: 12px;
  color: #222;
  outline: none;
  min-width: 0;
}
.oe-field-input:disabled {
  background: #f5f3e5; color: #555;
}
.oe-field-input:focus {
  background: #fffce8;
}

.oe-format-bar {
  display: flex; align-items: center;
  gap: 3px;
  background: linear-gradient(to bottom, #f5f3e5, #dcd6be);
  border-bottom: 1px solid #ada99a;
  padding: 3px 6px;
  flex-shrink: 0;
}
.oe-format-bar select {
  height: 22px; font-size: 11px;
  border: 1px inset #7f9db9; background: #fff;
  padding: 0 2px;
  font-family: "Tahoma", sans-serif;
}
.oe-format-bar button {
  width: 24px !important; min-width: 0 !important;
  height: 22px; padding: 0;
  border: 1px solid transparent; background: transparent;
  font-family: "Tahoma", sans-serif; font-size: 12px;
  color: #333;
  border-radius: 2px;
}
.oe-format-bar button:hover:not(:disabled) {
  border-color: #7ba9dd; background: rgba(80,130,240,0.15);
}
.oe-fb-sep {
  width: 1px; height: 18px;
  background: #ada99a; margin: 0 3px;
}

.oe-message {
  flex: 1;
  min-height: 120px;
  padding: 10px 12px;
  border: none;
  background: #fff;
  font-family: "Tahoma", sans-serif;
  font-size: 12px;
  color: #222;
  outline: none;
  resize: none;
}
.oe-message:focus { background: #fffce8; }

.oe-status {
  padding: 0 12px;
  flex-shrink: 0;
  max-height: 100px;
  overflow-y: auto;
}
.oe-status:empty { padding: 0; }
.oe-status-sending {
  padding: 10px 12px; margin: 8px 0;
  background: #fffce8; border: 1px solid #d4c98a;
  color: #666; font-size: 12px;
  font-family: "Tahoma", sans-serif;
  border-radius: 2px;
  text-align: center;
}
.oe-status-success {
  padding: 12px; margin: 8px 0;
  background: #e5f5e5; border: 1px solid #6ba86b;
  color: #1a4d1a;
  font-family: "Tahoma", sans-serif; font-size: 12px;
  border-radius: 2px;
  display: flex; align-items: center; gap: 10px;
}
.oe-status-error {
  padding: 12px; margin: 8px 0;
  background: #fce6e6; border: 1px solid #d97575;
  color: #7d1e1e;
  font-family: "Tahoma", sans-serif; font-size: 12px;
  border-radius: 2px;
  display: flex; align-items: center; gap: 10px;
}
.oe-status-icon {
  font-size: 24px; flex-shrink: 0;
}

/* ============================================================
   Formulário no MOBILE (fullscreen modal)
   ============================================================ */
.oe-form-mobile {
  display: flex; flex-direction: column;
  gap: 4px;
}
.oe-mobile-label {
  font-size: 12px; font-weight: bold; color: #0a3e91;
  margin-top: 8px;
}
.oe-mobile-input, .oe-mobile-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px inset #7f9db9;
  background: #fff;
  font-family: "Tahoma", sans-serif; font-size: 13px;
  color: #222; outline: none;
  border-radius: 2px;
}
.oe-mobile-input:focus, .oe-mobile-textarea:focus { background: #fffce8; }
.oe-mobile-textarea { min-height: 140px; resize: vertical; }
.oe-mobile-send {
  margin-top: 12px;
  padding: 12px 20px !important;
  min-height: 44px;
  background: linear-gradient(to bottom, #3f8ff5, #164ec0);
  color: #fff; font-weight: bold;
  border: 1px solid #072a83; border-radius: 3px;
  font-size: 14px; font-family: "Tahoma", sans-serif;
  cursor: pointer;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
}
.oe-mobile-send:hover { background: linear-gradient(to bottom, #4b9eff, #1a5edb); }

/* ============================================================
   LIGHTBOX / ÁLBUM DE FOTOS
   ============================================================ */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  animation: lbFadeIn 200ms ease-out;
}
#lightbox.hidden { display: none !important; }
@keyframes lbFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3) !important;
  color: #fff;
  cursor: pointer;
  font-family: "Tahoma", sans-serif;
  z-index: 2;
  transition: background 100ms;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover {
  background: rgba(255,255,255,0.25);
}

.lb-close {
  top: 20px; right: 20px;
  width: 44px !important; height: 44px;
  min-width: 0 !important;
  border-radius: 3px;
  font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.lb-prev, .lb-next {
  top: 50%; transform: translateY(-50%);
  width: 60px !important; height: 100px;
  min-width: 0 !important;
  font-size: 40px; line-height: 1;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
}
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

.lb-content {
  max-width: 92vw; max-height: 92vh;
  display: flex; flex-direction: column; align-items: center;
  gap: 12px;
}
.lb-image {
  max-width: 92vw; max-height: 82vh;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  border: 4px solid #fff;
}
.lb-caption {
  color: #fff; font-family: "Tahoma", sans-serif; font-size: 13px;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
  max-width: 700px;
}
.lb-counter {
  color: #ccc; font-family: "Tahoma", sans-serif; font-size: 11px;
}
@media (max-width: 767px) {
  .lb-close { top: 12px; right: 12px; width: 40px !important; height: 40px; }
  .lb-prev, .lb-next {
    width: 44px !important; height: 60px;
    font-size: 28px;
  }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-image { max-height: 74vh; }
}

/* ============================================================
   PROGRAMAS — grid de ferramentas
   ============================================================ */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  padding: 14px;
  background: #fff;
}
.prog-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px;
  background: linear-gradient(to bottom, #fff, #f5f2df);
  border: 1px solid #ada99a; border-radius: 4px;
  transition: all 100ms;
}
.prog-card:hover {
  background: linear-gradient(to bottom, #fff, #e1eafe);
  border-color: #7ba9dd;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.08);
}
.prog-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 6px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.prog-icon img { width: 100%; height: 100%; object-fit: cover; }
.prog-icon-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: bold;
  font-family: -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  border-radius: 6px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.35);
}
.prog-body { flex: 1; min-width: 0; }
.prog-name {
  font-size: 13px; font-weight: bold; color: #0a3e91;
  margin-bottom: 3px;
}
.prog-used {
  font-size: 11px; color: #333;
  line-height: 1.4; margin-bottom: 4px;
}
.prog-meta {
  font-size: 11px; color: #666;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.prog-meta strong { color: #222; }
.prog-dot { color: #999; }

/* ============================================================
   PROJECT FILES — cards de arquivo (TXT, PDF) na galeria
   ============================================================ */
.project-thumb.project-thumb-file {
  background: linear-gradient(180deg, #fff 0%, #f9f9f9 60%, #f0f0f0 100%);
  border: 1px solid #d0d0d0 !important;
  padding: 10px !important;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  text-decoration: none;
  color: #333;
}
.project-thumb.project-thumb-file:hover {
  border-color: #7ba9dd !important;
  background: linear-gradient(180deg, #fff 0%, #f0f5ff 100%);
}
.project-thumb.project-thumb-file .file-icon {
  width: 42px !important; height: 42px !important;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  pointer-events: none;
}
.project-thumb.project-thumb-file .file-label {
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
  color: #222;
  text-align: center;
  line-height: 1.3;
  word-break: break-word;
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  pointer-events: none;
}
/* Sombra sutil vermelha no hover do PDF (só pra diferenciar visualmente) */
.project-thumb.project-thumb-pdf:hover {
  border-color: #d93526 !important;
}

/* ============================================================
   TXT WINDOW BODY — janela estilo Notepad
   ============================================================ */
.txt-body {
  background: #fff;
  padding: 12px 16px;
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.txt-body pre {
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #000;
  white-space: pre-wrap;
  word-wrap: break-word;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}
/* Força tudo dentro do <pre> a manter estética Notepad — mesmo se você
   usar <h1>/<h2>/<h3>/<p> por engano, não quebra a fonte monoespaçada */
.txt-body pre * {
  font-family: inherit !important;
  font-size: inherit !important;
  color: inherit !important;
  line-height: inherit !important;
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  display: inline !important;   /* impede h1/h2/h3/p de virar bloco e adicionar espaço vertical extra */
}
/* Exceção: as tags de destaque continuam funcionando */
.txt-body pre strong, .txt-body pre b { font-weight: bold !important; }
.txt-body pre em, .txt-body pre i    { font-style: italic !important; }
.txt-body pre u                       { text-decoration: underline !important; }
.txt-body pre a                       { color: #0056d2 !important; text-decoration: underline !important; }
.txt-body pre a:hover                 { color: #003a99 !important; }
.txt-body pre br                      { display: inline !important; }
