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

body {
    font-family: 'MS Sans Serif', sans-serif;
    background: #c0c0c0;
    padding: 0;
    font-size: 11px;
    height: 100vh;
    overflow: hidden;
}


.notepad-window {
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column; 
}

.title-bar {
    background: linear-gradient(90deg, #000080 0%, #a6caf8 100%);
    height: 18px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 2px 3px; 
    border-bottom: 1px solid #000080;
}

.title-content {
    display: flex;
    align-items: center;
    gap: 4px;
}

.title-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.title-text {
    color: white;
    font-size: 11px;
    font-weight: bold;
}

.window-controls {
    display: flex;
    gap: 2px;
}

.control-btn {
    width: 16px;
    height: 14px;
    background: #c0c0c0;
    border: 1px outset #c0c0c0;
    font-size: 8px;
    color: black;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'MS Sans Serif', sans-serif; 
}

.control-btn:active {
    border: 1px inset #c0c0c0; 
}

.menu-bar {
    background: #c0c0c0; 
    height: 20px; 
    display: flex; 
    align-items: center; 
    border-bottom: 1px solid #808080; 
}

.menu-item {
    padding: 4px 8px; 
    cursor: pointer; 
    font-size: 11px;  
    color: black;  
    position: relative;
}

.menu-item:hover {
    background: #0a246a;
    color: white;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.dropdown-submenu {
    position: absolute;
    top: -2px;
    left: 100%;
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    min-width: 150px;
    display: none;
    z-index: 1000;
}

.menu-option {
    padding: 4px 8px;
    cursor: pointer;
    font-size: 11px;
    color: black;
    white-space: nowrap;
    display: flex;
    justify-content: space-between;
}

.menu-option:hover {
    background: #0a246a;
    color: white;
}

.menu-option.disabled {
    color: #808080;
    cursor: not-allowed;
}

.menu-option.disabled:hover {
    background: #c0c0c0;
    color: #808080;
}

.menu-separator {
    height: 1px;
    background: #808080;
    margin: 2px 8px;
}

.submenu-arrow {
    font-size: 8px;
    margin-left: 10px;
}

.main-content {
    flex: 1;
    padding: 3px;
    background: #c0c0c0; 
}

.text-area {
    width: 100%;
    height: 100%;
    background: white;
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    padding: 4px;
    font-family: 'Fixedsys', 'Courier New', monospace;
    font-size: 12px;
    color: black;
    resize: none;
    outline: none;
    transition: background-color 0.3s ease, color 0.3s ease, font-family 0.3s ease;
}

.text-area::-webkit-scrollbar {
    width: 17px;
    background: #c0c0c0;
}

.text-area::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    min-height: 20px;
}

.text-area::-webkit-scrollbar-thumb:hover {
    background: #d0d0d0;
}

.text-area::-webkit-scrollbar-track {
    background: #c0c0c0;
    background-image: repeating-conic-gradient(#c0c0c0 0% 25%, #d4d0c8 0% 50%);
    background-size: 2px 2px;
}

.text-area::-webkit-scrollbar-button {
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    height: 17px;
    display: block;
}

.text-area::-webkit-scrollbar-button:active {
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

.text-area::-webkit-scrollbar-corner {
    background: #c0c0c0;
}

.status-bar {
    background: #c0c0c0;
    height: 20px;
    border-top: 1px solid #808080;
    display: flex;
    align-items: center;
    font-size: 11px;
    color: black;
}

.status-section {
    padding: 2px 8px;
    border-right: 1px solid #808080;
    display: flex;
    align-items: center;
    height: 100%;
}

.status-section:last-child {
    border-right: none; 
}

.status-item {
    white-space: nowrap; 
}

.status-section:nth-child(1) { min-width: 80px; }
.status-section:nth-child(2) { min-width: 90px; }
.status-section:nth-child(3) { min-width: 140px; }
.status-section:nth-child(4) { min-width: 50px; }
.status-section:nth-child(5) { min-width: 100px; }
.status-section:nth-child(6) { min-width: 60px; }


/* ===== MODO AERO (Windows 7) ===== */
.aero-window {
    font-family: 'Segoe UI', sans-serif;
    background: rgba(210, 228, 248, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 40, 120, 0.35), inset 0 1px 0 rgba(255,255,255,0.5);
    border: 1px solid rgba(160, 200, 240, 0.7);
    overflow: hidden;
}

/* Barra de título */
.aero-window .title-bar {
    background: linear-gradient(to bottom,
        rgba(180, 215, 248, 0.9) 0%,
        rgba(140, 185, 235, 0.88) 40%,
        rgba(110, 160, 220, 0.88) 100%
    );
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,30,100,0.6);
    border-bottom: 1px solid rgba(80, 140, 210, 0.6);
    padding: 5px 8px;
    font-weight: bold;
    font-size: 12px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

/* Menu */
.aero-window .menu-bar {
    background: rgba(230, 242, 255, 0.75);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(140, 190, 235, 0.5);
    height: 24px;
}

.aero-window .menu-item {
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    color: #1a3a6a;
    border-radius: 3px;
    transition: background-color 0.15s;
}

.aero-window .menu-item:hover {
    background: rgba(180, 220, 255, 0.6);
    color: #001040;
}

/* Área principal */
.aero-window .main-content {
    background: rgba(245, 250, 255, 0.6);
    padding: 6px;
}

/* Área de texto */
.aero-window .text-area {
    background-color: rgba(255, 255, 255, 0.92);
    color: #111;
    border: 1px solid rgba(120, 170, 220, 0.7);
    border-top-color: rgba(80, 130, 200, 0.8);
    border-left-color: rgba(80, 130, 200, 0.8);
    border-radius: 4px;
    padding: 6px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13px;
}

.aero-window .text-area:focus {
    border-color: rgba(60, 120, 200, 0.9);
    box-shadow: 0 0 0 1px rgba(120, 180, 240, 0.5);
}

/* Barra de status */
.aero-window .status-bar {
    background: rgba(215, 235, 255, 0.75);
    backdrop-filter: blur(6px);
    color: #1a3a6a;
    border-top: 1px solid rgba(140, 190, 235, 0.5);
    padding: 2px 8px;
    font-size: 11px;
    display: flex;
    align-items: center;
    height: 22px;
}

/* Menus suspensos */
.aero-window .dropdown-menu,
.aero-window .dropdown-submenu {
    background: rgba(235, 247, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(140, 190, 235, 0.7);
    box-shadow: 0 4px 12px rgba(0, 40, 120, 0.2);
    border-radius: 4px;
    z-index: 9999;
    position: absolute;
}

/* Hover em opções de menu */
.aero-window .menu-option {
    color: #1a3a6a;
}
.aero-window .menu-option:hover {
    background: rgba(180, 220, 255, 0.6);
    color: #001040;
}

.aero-window .menu-separator {
    background: rgba(140, 190, 235, 0.5);
}

.aero-window .text-area::-webkit-scrollbar {
    width: 15px;
    background: rgba(200, 225, 248, 0.4);
}

.aero-window .text-area::-webkit-scrollbar-track {
    background: rgba(210, 232, 252, 0.3);
    border-radius: 6px;
}

.aero-window .text-area::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, rgba(140, 195, 240, 0.85), rgba(100, 160, 220, 0.85));
    border-radius: 6px;
    border: 2px solid rgba(200, 230, 255, 0.3);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}

.aero-window .text-area::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, rgba(110, 175, 230, 0.9), rgba(80, 145, 215, 0.9));
}

.aero-window .text-area::-webkit-scrollbar-button {
    background: linear-gradient(to bottom, rgba(200, 228, 252, 0.7), rgba(170, 210, 245, 0.7));
    border: 1px solid rgba(140, 190, 235, 0.5);
    height: 15px;
    display: block;
}

.aero-window .text-area::-webkit-scrollbar-button:active {
    background: rgba(140, 190, 235, 0.5);
}

.aero-window .text-area::-webkit-scrollbar-corner {
    background: rgba(200, 225, 248, 0.3);
}


/* ====== MODO XP ====== */

.xp-window {
  background: linear-gradient(to bottom, #e3f0ff, #cfe0f7);
  font-family: 'Tahoma', sans-serif;
}

.xp-window .title-bar {
  background: linear-gradient(to right, #316ac5, #5a8dee);
  color: white;
  font-weight: bold;
  padding: 4px 8px;
  border-bottom: 1px solid #1f4e9b;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.xp-window .control-btn {
  background: linear-gradient(to bottom, #ffffff, #dfefff);
  border: 1px solid #7f9db9;
  padding: 2px 6px;
  font-size: 11px;
  font-family: 'Tahoma', sans-serif;
  cursor: pointer;
  border-radius: 2px;
}

.xp-window .control-btn:hover {
  background: linear-gradient(to bottom, #dfefff, #c0d8f0);
}

.xp-window .menu-bar {
  background: linear-gradient(to bottom, #dbe9f9, #bcd1ee);
  height: 25px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid #3a6ea5;
  padding: 0 4px;
}

.xp-window .menu-item {
  font-family: 'Tahoma', sans-serif;
  padding: 4px 8px;
  border-radius: 2px;
  margin-right: 2px;
}

.xp-window .menu-item:hover {
  background-color: #c0d8f0;
  border-color: #5a8dee;
}

.xp-window .status-bar {
  background: linear-gradient(to bottom, #dbe9f9, #bcd1ee);
  height: 20px;
  border-top: 2px solid #3a6ea5;
  display: flex;
  align-items: center;
  font-size: 11px;
  color: black;
  font-family: 'Tahoma', sans-serif;
  padding: 2px 8px;
}

.xp-window .main-content {
  flex: 1;
  padding: 3px;
  background: linear-gradient(to bottom, #f0f8ff, #e0ecff);
  border-top: 1px solid #a3c0e8;
  border-bottom: 1px solid #a3c0e8;
}

.xp-window .text-area {
  background-color: #ffffff;
  color: #000000;
  font-family: 'Tahoma', sans-serif;
  font-size: 13px;
  border: 2px inset #7f9db9;
}

.xp-window .text-area::-webkit-scrollbar {
  width: 16px;
  background: #dbe9f9;
}

.xp-window .text-area::-webkit-scrollbar-thumb {
  background: #a3c0e8;
  border: 1px outset #7f9db9;
}

.xp-window .text-area::-webkit-scrollbar-track {
  background: #e3f0ff;
}

.xp-window .text-area::-webkit-scrollbar-button {
  background: #cfe0f7;
  border: 1px outset #7f9db9;
  height: 16px;
}

.xp-window .text-area::-webkit-scrollbar-button:active {
  border: 1px inset #7f9db9;
}

.xp-window .dropdown-menu {
  background: linear-gradient(to bottom, #e3f0ff, #cfe0f7);
  border: 2px solid #7f9db9;
  min-width: 200px;
  z-index: 1000;
}

.xp-window .dropdown-submenu {
  background: linear-gradient(to bottom, #e3f0ff, #cfe0f7);
  border: 2px solid #7f9db9;
  min-width: 150px;
  z-index: 1000;
}

.xp-window .menu-option {
  background-color: #e3f0ff;
  color: #000;
  font-family: 'Tahoma', sans-serif;
  padding: 4px 8px;
  border: 1px solid #7f9db9;
  border-radius: 2px;
  margin: 1px 0;
}

.xp-window .menu-option:hover {
  background-color: #c0d8f0;
  border-color: #5a8dee;
}

.xp-window .menu-separator {
  background: #cfe0f7;
}


/* ====== MODO VISTA ====== */

.vista-window {
  background: linear-gradient(160deg, #ddeeff 0%, #c8dff7 60%, #b8d0f0 100%);
  border: 1px solid #7aaad8;
  border-top: 1px solid #aad0f5;
  box-shadow: 0 2px 12px rgba(0, 60, 140, 0.25), inset 0 1px 0 rgba(255,255,255,0.6);
  border-radius: 6px;
  font-family: 'Segoe UI', sans-serif;
  color: #000;
  overflow: hidden;
}

.vista-window .title-bar {
  background: linear-gradient(to bottom,
    rgba(120, 180, 240, 0.95) 0%,
    rgba(80, 140, 210, 0.95) 50%,
    rgba(60, 110, 190, 0.95) 100%
  );
  color: white;
  font-weight: bold;
  font-size: 12px;
  text-shadow: 0 1px 2px rgba(0,0,40,0.5);
  padding: 5px 8px;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  border-bottom: 1px solid #4a80c0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vista-window .menu-bar {
  background: linear-gradient(to bottom, #e8f3ff, #cce0f5);
  border-bottom: 1px solid #88b8e0;
  height: 24px;
  display: flex;
  align-items: center;
  padding: 0 4px;
}

.vista-window .menu-item {
  padding: 3px 10px;
  font-family: 'Segoe UI', sans-serif;
  font-size: 12px;
  color: #1a3a6a;
  border-radius: 3px;
  margin-right: 1px;
}

.vista-window .menu-item:hover {
  background: linear-gradient(to bottom, #cce8ff, #a8d0f0);
  color: #001a50;
  border: 1px solid #70a8d8;
  padding: 2px 9px;
}

.vista-window .dropdown-menu,
.vista-window .dropdown-submenu {
  background: linear-gradient(to bottom, #f0f8ff 0%, #ddeeff 100%);
  border: 1px solid #88b8e0;
  border-radius: 4px;
  box-shadow: 2px 2px 6px rgba(0,60,140,0.2);
  min-width: 200px;
  z-index: 1000;
}

.vista-window .menu-option {
  padding: 4px 10px;
  font-family: 'Segoe UI', sans-serif;
  font-size: 12px;
  color: #1a3a6a;
}

.vista-window .menu-option:hover {
  background: linear-gradient(to bottom, #cce8ff, #a8d0f0);
  color: #001a50;
}

.vista-window .status-bar {
  background: linear-gradient(to bottom, #d8ecff, #bcd4f0);
  border-top: 1px solid #88b8e0;
  color: #1a3a6a;
  font-family: 'Segoe UI', sans-serif;
  font-size: 11px;
  padding: 2px 8px;
  display: flex;
  align-items: center;
  height: 25px;
}

.vista-window .main-content {
  background: #e8f3ff;
  padding: 4px;
}

.vista-window .text-area {
  background-color: #ffffff;
  color: #000000;
  font-family: 'Segoe UI', sans-serif;
  font-size: 13px;
  border: 1px solid #88b8e0;
  border-top-color: #5590c8;
  border-left-color: #5590c8;
  border-radius: 3px;
  padding: 6px;
  resize: none;
  outline: none;
}

.vista-window .text-area:focus {
  border-color: #3070b8;
  box-shadow: 0 0 0 1px #80b8e8;
}

.vista-window .text-area::-webkit-scrollbar {
  width: 15px;
  background: #cce0f5;
}

.vista-window .text-area::-webkit-scrollbar-thumb {
  background: linear-gradient(to right, #a8cce8, #80aad0);
  border-radius: 4px;
  border: 2px solid #cce0f5;
}

.vista-window .text-area::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to right, #88b8e0, #60a0c8);
}

.vista-window .text-area::-webkit-scrollbar-track {
  background: #ddeeff;
  border-radius: 4px;
}

.vista-window .text-area::-webkit-scrollbar-button {
  background: linear-gradient(to bottom, #d8ecff, #b8d4f0);
  border: 1px solid #88b8e0;
  height: 15px;
  display: block;
}

.vista-window .text-area::-webkit-scrollbar-button:active {
  background: linear-gradient(to bottom, #b8d4f0, #d8ecff);
}

.vista-window .text-area::-webkit-scrollbar-corner {
  background: #cce0f5;
}

.vista-window .menu-separator {
  background: #a8cce8;
}

/* ===== Tema Modern (Windows 11) ===== */
.modern-window {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background-color: #f3f6fd;
    font-family: 'Segoe UI', 'Inter', sans-serif;
    color: #1f1f1f;
}

.modern-window .title-bar {
    background: linear-gradient(to right, #60bdff, #bdd7f9);
    border-bottom: 1px solid #cbd5e1;
    padding: 6px 12px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    font-weight: 500;
    font-size: 14px;
}

.modern-window .menu-bar {
    background-color: #e0e7ff;
    border-bottom: 1px solid #c7d2fe;
    padding: 4px 8px;
    font-size: 13px;
    height: 25px;
}

.modern-window .menu-item {
    padding: 4px 10px;
    border-radius: 6px;
    margin-right: 4px;
    transition: background-color 0.2s;
}

.modern-window .menu-item:hover {
    background-color: #c7d2fe;
}

.modern-window .main-content {
    padding: 8px;
    background-color: #f0f2f5;
}

.modern-window .text-area {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    resize: none;
    background-color: #ffffff;
    color: #1f2937;
    font-family: 'Segoe UI', 'Inter', sans-serif;
    font-size: 14px;
    padding: 12px;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.modern-window .text-area:focus {
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.08), 0 0 0 2px rgba(99,102,241,0.2);
}

.modern-window .text-area::-webkit-scrollbar {
  width: 12px;
  background: transparent;
}

.modern-window .text-area::-webkit-scrollbar-thumb {
  background-color: rgba(100, 116, 139, 0.4);
  border-radius: 8px;
  border: 3px solid transparent;
  background-clip: content-box;
}

.modern-window .text-area::-webkit-scrollbar-track {
  background: transparent;
}

.modern-window .text-area::-webkit-scrollbar-button {
  display: none;
}

.modern-window .status-bar {
    background-color: #e5e7eb;
    border-top: 1px solid #d1d5db;
    padding: 6px 12px;
    font-size: 12px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.modern-window .status-section {
    border-right-color: #d1d5db;
}

.modern-window .dropdown-menu,
.modern-window .dropdown-submenu {
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    backdrop-filter: blur(6px);
    padding: 6px 0;
}

.modern-window .menu-option {
    padding: 6px 16px;
    font-size: 13px;
    transition: background-color 0.2s;
}

.modern-window .menu-option:hover {
    background-color: #e0e7ff;
    color: #000080;
}

.modern-window .menu-separator {
    background: #e5e7eb;
    margin: 4px 8px;
}

/* =======================================================
   MODO ESCURO
   Camada ortogonal aos temas. Todos os seletores usam
   3 classes (.dark-mode + tema + elemento) para garantir
   especificidade maior que qualquer regra de tema isolada.
   ======================================================= */

/* --- Janela base --- */
.dark-mode,
.dark-mode.xp-window,
.dark-mode.vista-window,
.dark-mode.aero-window,
.dark-mode.modern-window {
    background: #1e1e1e;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* --- Title bar --- */
.dark-mode .title-bar,
.dark-mode .xp-window .title-bar,
.dark-mode .vista-window .title-bar,
.dark-mode .aero-window .title-bar,
.dark-mode .modern-window .title-bar {
    background: linear-gradient(90deg, #1a1a2e 0%, #16213e 100%);
    border-bottom-color: #0f3460;
    color: #d4d4d4;
    text-shadow: none;
}

/* --- Menu bar --- */
.dark-mode .menu-bar,
.dark-mode .xp-window .menu-bar,
.dark-mode .vista-window .menu-bar,
.dark-mode .aero-window .menu-bar,
.dark-mode .modern-window .menu-bar {
    background: #2d2d2d;
    border-bottom-color: #444;
    backdrop-filter: none;
}

/* --- Menu items --- */
.dark-mode .menu-item,
.dark-mode .xp-window .menu-item,
.dark-mode .vista-window .menu-item,
.dark-mode .aero-window .menu-item,
.dark-mode .modern-window .menu-item {
    color: #d4d4d4;
}

.dark-mode .menu-item:hover,
.dark-mode .xp-window .menu-item:hover,
.dark-mode .vista-window .menu-item:hover,
.dark-mode .aero-window .menu-item:hover,
.dark-mode .modern-window .menu-item:hover {
    background: #094771;
    color: #ffffff;
    border-color: transparent;
}

/* --- Dropdowns --- */
.dark-mode .dropdown-menu,
.dark-mode .dropdown-submenu,
.dark-mode .xp-window .dropdown-menu,
.dark-mode .xp-window .dropdown-submenu,
.dark-mode .vista-window .dropdown-menu,
.dark-mode .vista-window .dropdown-submenu,
.dark-mode .aero-window .dropdown-menu,
.dark-mode .aero-window .dropdown-submenu,
.dark-mode .modern-window .dropdown-menu,
.dark-mode .modern-window .dropdown-submenu {
    background: #252526;
    border-color: #454545;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
    backdrop-filter: none;
}

/* --- Menu options --- */
.dark-mode .menu-option,
.dark-mode .xp-window .menu-option,
.dark-mode .vista-window .menu-option,
.dark-mode .aero-window .menu-option,
.dark-mode .modern-window .menu-option {
    background: transparent;
    background-color: transparent;
    color: #d4d4d4;
    border-color: transparent;
}

.dark-mode .menu-option:hover,
.dark-mode .xp-window .menu-option:hover,
.dark-mode .vista-window .menu-option:hover,
.dark-mode .aero-window .menu-option:hover,
.dark-mode .modern-window .menu-option:hover {
    background: #094771;
    background-color: #094771;
    color: #ffffff;
    border-color: transparent;
}

.dark-mode .menu-option.disabled,
.dark-mode .xp-window .menu-option.disabled,
.dark-mode .vista-window .menu-option.disabled,
.dark-mode .aero-window .menu-option.disabled,
.dark-mode .modern-window .menu-option.disabled {
    color: #555;
    background: transparent;
    background-color: transparent;
}

.dark-mode .menu-option.disabled:hover,
.dark-mode .xp-window .menu-option.disabled:hover,
.dark-mode .vista-window .menu-option.disabled:hover,
.dark-mode .aero-window .menu-option.disabled:hover,
.dark-mode .modern-window .menu-option.disabled:hover {
    background: transparent;
    background-color: transparent;
    color: #555;
}

/* --- Separadores --- */
.dark-mode .menu-separator,
.dark-mode .xp-window .menu-separator,
.dark-mode .vista-window .menu-separator,
.dark-mode .aero-window .menu-separator,
.dark-mode .modern-window .menu-separator {
    background: #454545;
}

/* --- Main content --- */
.dark-mode .main-content,
.dark-mode .xp-window .main-content,
.dark-mode .vista-window .main-content,
.dark-mode .aero-window .main-content,
.dark-mode .modern-window .main-content {
    background: #1e1e1e;
    backdrop-filter: none;
}

/* --- Textarea --- */
.dark-mode .text-area,
.dark-mode .xp-window .text-area,
.dark-mode .vista-window .text-area,
.dark-mode .aero-window .text-area,
.dark-mode .modern-window .text-area {
    background: #1e1e1e;
    background-color: #1e1e1e;
    color: #d4d4d4;
    border-color: #3c3c3c;
    border-top-color: #111;
    border-left-color: #111;
    caret-color: #d4d4d4;
    box-shadow: none;
}

.dark-mode .text-area::placeholder,
.dark-mode .xp-window .text-area::placeholder,
.dark-mode .vista-window .text-area::placeholder,
.dark-mode .modern-window .text-area::placeholder {
    color: #555;
}

/* --- Scrollbar --- */
.dark-mode .text-area::-webkit-scrollbar,
.dark-mode .xp-window .text-area::-webkit-scrollbar,
.dark-mode .vista-window .text-area::-webkit-scrollbar,
.dark-mode .modern-window .text-area::-webkit-scrollbar {
    background: #252526;
}

.dark-mode .text-area::-webkit-scrollbar-thumb,
.dark-mode .xp-window .text-area::-webkit-scrollbar-thumb,
.dark-mode .vista-window .text-area::-webkit-scrollbar-thumb,
.dark-mode .modern-window .text-area::-webkit-scrollbar-thumb {
    background: #424242;
    border-color: #252526;
    border-radius: 0;
    box-shadow: none;
}

.dark-mode .text-area::-webkit-scrollbar-thumb:hover,
.dark-mode .xp-window .text-area::-webkit-scrollbar-thumb:hover,
.dark-mode .vista-window .text-area::-webkit-scrollbar-thumb:hover,
.dark-mode .modern-window .text-area::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.dark-mode .text-area::-webkit-scrollbar-track,
.dark-mode .xp-window .text-area::-webkit-scrollbar-track,
.dark-mode .vista-window .text-area::-webkit-scrollbar-track,
.dark-mode .modern-window .text-area::-webkit-scrollbar-track {
    background: #1e1e1e;
    background-image: none;
}

.dark-mode .text-area::-webkit-scrollbar-button,
.dark-mode .xp-window .text-area::-webkit-scrollbar-button,
.dark-mode .vista-window .text-area::-webkit-scrollbar-button,
.dark-mode .modern-window .text-area::-webkit-scrollbar-button {
    background: #2d2d2d;
    border-top-color: #3c3c3c;
    border-left-color: #3c3c3c;
    border-right-color: #111;
    border-bottom-color: #111;
    display: block;
}

/* --- Status bar --- */
.dark-mode .status-bar,
.dark-mode .xp-window .status-bar,
.dark-mode .vista-window .status-bar,
.dark-mode .aero-window .status-bar,
.dark-mode .modern-window .status-bar {
    background: #007acc;
    border-top-color: #005f9e;
    color: #ffffff;
    backdrop-filter: none;
}

.dark-mode .status-section,
.dark-mode .xp-window .status-section,
.dark-mode .vista-window .status-section,
.dark-mode .modern-window .status-section {
    border-right-color: rgba(255,255,255,0.2);
}


/* ======== DIÁLOGOS DO EDITOR ======== */
#editor-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#editor-dialog {
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    min-width: 280px;
    max-width: 400px;
    font-family: 'Fixedsys', 'Courier New', monospace;
    font-size: 12px;
    box-shadow: 4px 4px 0 #000;
}

#editor-dialog-title {
    background: linear-gradient(to right, #000080, #1084d0);
    color: white;
    font-weight: bold;
    padding: 4px 8px;
    font-size: 12px;
    user-select: none;
}

#editor-dialog-body {
    padding: 16px;
    color: #000;
}

#editor-dialog-message {
    margin: 0 0 10px 0;
    line-height: 1.4;
}

#editor-dialog-input {
    width: 100%;
    box-sizing: border-box;
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    background: white;
    padding: 3px 5px;
    font-family: inherit;
    font-size: 12px;
    outline: none;
}

#editor-dialog-footer {
    padding: 8px 16px 12px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.dialog-btn {
    min-width: 70px;
    padding: 3px 10px;
    font-family: 'Fixedsys', 'Courier New', monospace;
    font-size: 12px;
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    cursor: pointer;
}

.dialog-btn:active {
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
}

.dialog-btn:focus {
    outline: 1px dotted #000;
    outline-offset: -4px;
}

/* XP */
.xp-window ~ * #editor-dialog,
.notepad-window.xp-window #editor-dialog { font-family: 'Tahoma', sans-serif; }

/* Diálogo no tema XP */
body:has(.xp-window) #editor-dialog {
    background: #ece9d8;
    border: 1px solid #7f9db9;
    box-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    font-family: 'Tahoma', sans-serif;
}
body:has(.xp-window) #editor-dialog-title {
    background: linear-gradient(to right, #316ac5, #5a8dee);
    border-radius: 0;
}
body:has(.xp-window) #editor-dialog-input {
    border: 2px inset #7f9db9;
    font-family: 'Tahoma', sans-serif;
}
body:has(.xp-window) .dialog-btn {
    background: linear-gradient(to bottom, #ffffff, #dfefff);
    border: 1px solid #7f9db9;
    border-radius: 2px;
    font-family: 'Tahoma', sans-serif;
}
body:has(.xp-window) .dialog-btn:active {
    background: linear-gradient(to bottom, #dfefff, #c0d8f0);
}

/* Diálogo no tema Vista */
body:has(.vista-window) #editor-dialog {
    background: linear-gradient(to bottom, #f0f8ff, #ddeeff);
    border: 1px solid #88b8e0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,60,140,0.25);
    font-family: 'Segoe UI', sans-serif;
}
body:has(.vista-window) #editor-dialog-title {
    background: linear-gradient(to bottom, rgba(120,180,240,0.95), rgba(60,110,190,0.95));
    border-radius: 5px 5px 0 0;
}
body:has(.vista-window) #editor-dialog-input {
    border: 1px solid #88b8e0;
    border-radius: 3px;
    font-family: 'Segoe UI', sans-serif;
}
body:has(.vista-window) .dialog-btn {
    background: linear-gradient(to bottom, #dbe9f9, #bcd1ee);
    border: 1px solid #7f9db9;
    border-radius: 3px;
    font-family: 'Segoe UI', sans-serif;
}

/* Diálogo no tema Aero */
body:has(.aero-window) #editor-dialog {
    background: rgba(235, 247, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(140,190,235,0.7);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,40,120,0.3);
    font-family: 'Segoe UI', sans-serif;
}
body:has(.aero-window) #editor-dialog-title {
    background: linear-gradient(to bottom, rgba(140,185,235,0.95), rgba(80,140,210,0.95));
    border-radius: 7px 7px 0 0;
}
body:has(.aero-window) .dialog-btn {
    background: linear-gradient(to bottom, rgba(200,228,252,0.8), rgba(160,205,240,0.8));
    border: 1px solid rgba(140,190,235,0.6);
    border-radius: 4px;
    font-family: 'Segoe UI', sans-serif;
}

/* Diálogo no tema Modern */
body:has(.modern-window) #editor-dialog {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    font-family: 'Segoe UI', sans-serif;
}
body:has(.modern-window) #editor-dialog-title {
    background: linear-gradient(to right, #60bdff, #bdd7f9);
    border-radius: 11px 11px 0 0;
    color: #1f1f1f;
}
body:has(.modern-window) #editor-dialog-input {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: 'Segoe UI', sans-serif;
}
body:has(.modern-window) .dialog-btn {
    background: #e0e7ff;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    font-family: 'Segoe UI', sans-serif;
}
body:has(.modern-window) .dialog-btn:hover {
    background: #c7d2fe;
}

/* Diálogo no dark mode */
body:has(.dark-mode) #editor-dialog {
    background: #252526;
    border-color: #454545;
    box-shadow: 0 4px 16px rgba(0,0,0,0.6);
    color: #d4d4d4;
}
body:has(.dark-mode) #editor-dialog-title {
    background: linear-gradient(90deg, #1a1a2e, #16213e);
    border-bottom: 1px solid #0f3460;
    color: #ffffff;
    border-radius: 0;
}
body:has(.dark-mode) #editor-dialog-body { color: #d4d4d4; }
body:has(.dark-mode) #editor-dialog-input {
    background: #1e1e1e;
    color: #d4d4d4;
    border-color: #3c3c3c;
}
body:has(.dark-mode) .dialog-btn {
    background: #2d2d2d;
    border-top-color: #3c3c3c;
    border-left-color: #3c3c3c;
    border-right-color: #111;
    border-bottom-color: #111;
    color: #d4d4d4;
}
body:has(.dark-mode) .dialog-btn:hover { background: #094771; color: #fff; }


/* ======== TAB BAR — BASE (Clássico 98) ======== */
#tab-bar {
    display: flex;
    align-items: flex-end;
    background: #c0c0c0;
    border-bottom: 2px solid #808080;
    padding: 3px 4px 0;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
}

#tab-bar::-webkit-scrollbar { display: none; }

.tab {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px 3px 8px;
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: none;
    font-family: 'Fixedsys', 'Courier New', monospace;
    font-size: 11px;
    color: #000;
    cursor: pointer;
    white-space: nowrap;
    max-width: 160px;
    position: relative;
    bottom: -1px;
}

.tab:hover { background: #d4d0c8; }

.tab.tab-active {
    background: #ffffff;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #ffffff;
    font-weight: bold;
    z-index: 1;
}

.tab-label {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.tab-close {
    font-size: 13px;
    line-height: 1;
    color: #444;
    padding: 0 2px;
    border-radius: 2px;
    flex-shrink: 0;
}

.tab-close:hover {
    background: #ff6b6b;
    color: white;
}

.tab-new {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 16px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 300;
    color: #555;
    cursor: pointer;
    border-radius: 4px;
    background: transparent;
    border: none;
    margin-left: 4px;
    flex-shrink: 0;
    align-self: center;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}

.tab-new:hover {
    background: rgba(0,0,0,0.1);
    color: #000;
}

/* XP */
.xp-window .tab-new {
    font-family: 'Tahoma', sans-serif;
    color: #336699;
    border-radius: 3px;
}
.xp-window .tab-new:hover {
    background: rgba(49, 106, 197, 0.15);
    color: #316ac5;
}

/* Vista */
.vista-window .tab-new {
    color: #1a3a6a;
    border-radius: 4px;
}
.vista-window .tab-new:hover {
    background: rgba(0, 60, 140, 0.12);
    color: #001a50;
}

/* Aero */
.aero-window .tab-new {
    color: rgba(100, 160, 220, 0.9);
    border-radius: 5px;
}
.aero-window .tab-new:hover {
    background: rgba(140, 190, 235, 0.25);
    color: rgba(60, 120, 200, 1);
}

/* Modern */
.modern-window .tab-new {
    color: #6366f1;
    border-radius: 6px;
    font-size: 18px;
}
.modern-window .tab-new:hover {
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
}

/* Dark mode */
.dark-mode .tab-new {
    background: transparent !important;
    color: #888 !important;
    border: none !important;
}
.dark-mode .tab-new:hover {
    background: rgba(255,255,255,0.08) !important;
    color: #fff !important;
}

/* ======== TAB BAR — XP ======== */
.xp-window #tab-bar {
    background: linear-gradient(to bottom, #dbe9f9, #bcd1ee);
    border-bottom: 2px solid #3a6ea5;
    padding: 4px 6px 0;
    gap: 3px;
}
.xp-window .tab {
    background: linear-gradient(to bottom, #e8f3ff, #cce0f5);
    border: 1px solid #7f9db9;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    color: #000;
}
.xp-window .tab:hover { background: linear-gradient(to bottom, #d0e8ff, #b8d4f0); }
.xp-window .tab.tab-active {
    background: #ffffff;
    border: 1px solid #7f9db9;
    border-bottom: 2px solid #ffffff;
    font-weight: bold;
}

/* ======== TAB BAR — VISTA ======== */
.vista-window #tab-bar {
    background: linear-gradient(to bottom, #cce0f5, #b8d0f0);
    border-bottom: 1px solid #88b8e0;
    padding: 4px 6px 0;
    gap: 3px;
}
.vista-window .tab {
    background: linear-gradient(to bottom, #ddeeff, #c8dff7);
    border: 1px solid #88b8e0;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    font-family: 'Segoe UI', sans-serif;
    font-size: 11px;
    color: #1a3a6a;
}
.vista-window .tab:hover { background: linear-gradient(to bottom, #cce8ff, #a8d0f0); }
.vista-window .tab.tab-active {
    background: #e8f3ff;
    border-bottom: 2px solid #e8f3ff;
    font-weight: bold;
    color: #001a50;
}

/* ======== TAB BAR — AERO ======== */
.aero-window #tab-bar {
    background: rgba(180, 215, 248, 0.6);
    border-bottom: 1px solid rgba(140, 190, 235, 0.5);
    padding: 4px 6px 0;
    gap: 3px;
}
.aero-window .tab {
    background: rgba(200, 228, 252, 0.6);
    border: 1px solid rgba(140, 190, 235, 0.6);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    font-family: 'Segoe UI', sans-serif;
    font-size: 11px;
    color: #1a3a6a;
}
.aero-window .tab:hover { background: rgba(160, 210, 245, 0.7); }
.aero-window .tab.tab-active {
    background: rgba(245, 250, 255, 0.9);
    border-bottom: 2px solid rgba(245, 250, 255, 0.9);
    font-weight: bold;
}

/* ======== TAB BAR — MODERN ======== */
.modern-window #tab-bar {
    background: #e0e7ff;
    border-bottom: 1px solid #c7d2fe;
    padding: 6px 8px 0;
    gap: 4px;
}
.modern-window .tab {
    background: #f3f6fd;
    border: 1px solid #c7d2fe;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    font-family: 'Segoe UI', sans-serif;
    font-size: 12px;
    color: #4b5563;
    padding: 5px 12px 5px 10px;
}
.modern-window .tab:hover { background: #dde4f9; }
.modern-window .tab.tab-active {
    background: #ffffff;
    border-bottom: 2px solid #ffffff;
    font-weight: 500;
    color: #1f1f1f;
}

/* ======== TAB BAR — DARK MODE ======== */
.dark-mode #tab-bar {
    background: #2d2d2d !important;
    border-bottom-color: #444 !important;
    backdrop-filter: none !important;
}
.dark-mode .tab {
    background: #2d2d2d !important;
    border-color: #444 !important;
    color: #d4d4d4 !important;
}
.dark-mode .tab:hover { background: #3a3a3a !important; }
.dark-mode .tab.tab-active {
    background: #1e1e1e !important;
    border-bottom-color: #1e1e1e !important;
    color: #ffffff !important;
    font-weight: bold;
}
.dark-mode .tab-close { color: #888 !important; }
.dark-mode .tab-close:hover { background: #c0392b !important; color: #fff !important; }
