:root {
  --font: 'Inter', system-ui, sans-serif;
  --font-ar: 'Noto Naskh Arabic', serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-serif: 'Instrument Serif', 'Georgia', serif;
  
  --accent: #4f46e5; 
  --accent-rgb: 79, 70, 229;
  
  --accent-soft: rgba(var(--accent-rgb), 0.12);
  --accent-border: rgba(var(--accent-rgb), 0.4);
  --accent-glow: rgba(var(--accent-rgb), 0.15);

  --bg-edge: #030305;
  --bg-mid: #0a0a0f;
  
  --panel: rgba(18, 18, 24, 0.45);
  --panel-hover: rgba(30, 30, 38, 0.55);
  --line: rgba(255,255,255,0.06);
  --line-strong: rgba(255,255,255,0.12);
  
  --text: #ffffff;
  --muted: #94a3b8;
  --faint: #475569;
  
  --shadow: 0 10px 40px rgba(0,0,0,0.4);
  --glass-blur: 24px;
  --radius: 20px; 
}

html[data-appearance="light"] {
  --bg-edge: #f1f5f9; 
  --bg-mid: #f8fafc;
  --accent-glow: transparent; 
  --panel: #ffffff; 
  --panel-hover: #ffffff;
  --line: rgba(0,0,0,0.08); 
  --line-strong: rgba(0,0,0,0.15);
  --text: #0f172a; 
  --muted: #64748b; 
  --faint: #cbd5e1;
  --shadow: 0 4px 20px rgba(0,0,0,0.04);
}

* { box-sizing: border-box; font-family: var(--font); }
html, body { width: 100vw; height: 100vh; margin: 0; overflow: hidden; } 

body {
  background: radial-gradient(ellipse 120% 120% at 50% -10%, var(--accent-glow) 0%, var(--bg-mid) 45%, var(--bg-edge) 100%);
  background-color: var(--bg-edge);
  color: var(--text); font-size: 13px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
html[data-appearance="light"] body { background: var(--bg-edge); }

button, input, select, textarea { font: inherit; outline: none; border: none; background: none; color: inherit; }
button { cursor: pointer; transition: all 0.2s ease; }
a { color: inherit; text-decoration: none; }
i[data-lucide] { width: 16px; height: 16px; stroke-width: 2; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(150,150,150,0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
html[data-appearance="light"] ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); }

.glass-panel {
  background: linear-gradient(180deg, var(--panel) 0%, rgba(var(--accent-rgb), 0.05) 100%);
  border: 1px solid var(--line);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  border-radius: var(--radius); box-shadow: var(--shadow); transition: all 0.3s ease;
}

html[data-appearance="light"] .glass-panel { background: #ffffff; }
html[data-appearance="light"] .glow-hover:hover { border-color: var(--accent); background: #ffffff; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }

.glow-hover:hover { border-color: var(--accent-border); box-shadow: 0 4px 20px var(--accent-soft), var(--shadow); }

.fade-in { animation: fadeIn 0.3s ease-in-out forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: translateY(0); } }

.app-layout { display: flex; height: 100vh; width: 100vw; overflow: hidden; }

.sidebar {
  flex-shrink: 0; display: flex; z-index: 50;
  background: var(--panel); backdrop-filter: blur(var(--glass-blur)) saturate(150%); border-right: 1px solid var(--line);
}

.side-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-icon { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; }

html[data-appearance="dark"] .light-icon { display: none !important; }
html[data-appearance="light"] .dark-icon { display: none !important; }

.brand-text { display: flex; flex-direction: column; justify-content: center; }
.b-main { font-family: var(--font); font-weight: 700; font-size: 16px; color: var(--text); letter-spacing: -0.2px; }
.b-sub { display: none; } 

.sidebar-controls { display: flex; gap: 12px; }
.side-boundary { display: flex; gap: 6px; background: rgba(150,150,150,0.03); padding: 6px; border-radius: 14px; border: 1px solid var(--line); }

.s-mode-btn { border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 4px; color: var(--muted); transition: all 0.2s; position: relative; border: 1px solid transparent; }
.s-mode-btn span { font-size: 11px; font-weight: 600; display: none; } 
.s-mode-btn:hover { color: var(--text); background: rgba(150,150,150,0.08); }
.s-mode-btn.active { background: var(--panel-hover); color: var(--accent); box-shadow: 0 4px 10px rgba(0,0,0,0.1); border-color: var(--line-strong); }

.s-act-btn { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); transition: all 0.2s; }
.s-act-btn:hover { color: var(--text); background: rgba(150,150,150,0.08); }

.app-layout[data-dock="left"] { flex-direction: row; }
.app-layout[data-dock="right"] { flex-direction: row-reverse; }
.app-layout[data-dock="left"] .sidebar, .app-layout[data-dock="right"] .sidebar { 
  width: 150px; height: 100vh; flex-direction: column; align-items: stretch; justify-content: space-between; padding: 20px 16px; 
}
.app-layout[data-dock="left"] .sidebar { border-right: 1px solid var(--line); border-left: none; }
.app-layout[data-dock="right"] .sidebar { border-left: 1px solid var(--line); border-right: none; }

.app-layout[data-dock="left"] .sidebar-controls, .app-layout[data-dock="right"] .sidebar-controls,
.app-layout[data-dock="left"] .side-boundary, .app-layout[data-dock="right"] .side-boundary { flex-direction: column; align-items: stretch; }
.app-layout[data-dock="left"] .s-mode-btn, .app-layout[data-dock="right"] .s-mode-btn { flex-direction: row; justify-content: flex-start; padding: 0 12px; height: 38px; width: 100%; }
.app-layout[data-dock="left"] .s-mode-btn span, .app-layout[data-dock="right"] .s-mode-btn span { display: block; margin-left: 8px; }

.app-layout[data-dock="top"] { flex-direction: column; }
.app-layout[data-dock="bottom"] { flex-direction: column-reverse; }
.app-layout[data-dock="top"] .sidebar, .app-layout[data-dock="bottom"] .sidebar { 
  width: 100%; height: 68px; flex-direction: row; align-items: center; justify-content: space-between; padding: 0 24px; 
}
.app-layout[data-dock="top"] .sidebar { border-bottom: 1px solid var(--line); border-top: none; border-right: none; }
.app-layout[data-dock="bottom"] .sidebar { border-top: 1px solid var(--line); border-bottom: none; border-right: none; }
.app-layout[data-dock="top"] .sidebar-controls, .app-layout[data-dock="bottom"] .sidebar-controls,
.app-layout[data-dock="top"] .side-boundary, .app-layout[data-dock="bottom"] .side-boundary { flex-direction: row; align-items: center; }
.app-layout[data-dock="top"] .s-mode-btn, .app-layout[data-dock="bottom"] .s-mode-btn { flex-direction: row; padding: 0 14px; height: 38px; width: auto; }
.app-layout[data-dock="top"] .s-mode-btn span, .app-layout[data-dock="bottom"] .s-mode-btn span { display: block; }

.s-mode-btn::after { content: attr(data-tooltip); position: absolute; background: var(--panel-hover); color: var(--text); padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity 0.2s; white-space: nowrap; border: 1px solid var(--line); z-index: 100; box-shadow: var(--shadow); }
.app-layout[data-dock="left"] .s-mode-btn::after { left: 55px; }
.app-layout[data-dock="right"] .s-mode-btn::after { right: 55px; }
.app-layout[data-dock="top"] .s-mode-btn::after { display:none; }
.app-layout[data-dock="bottom"] .s-mode-btn::after { display:none; }
.s-mode-btn:hover::after { opacity: 1; }

.main-wrapper { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 24px 32px; gap: 20px; min-height: 0; }

.top-bar { display: flex; align-items: center; justify-content: space-between; height: 52px; flex-shrink: 0; position: relative; margin-bottom: 8px; width: 100%; max-width: 1450px; margin-left: auto; margin-right: auto; }

.greeting { flex: 1; display: flex; align-items: flex-end; padding-bottom: 6px; }
.g-base { font-family: var(--font); font-weight: 700; font-size: 26px; color: var(--text); }
.g-name { font-family: var(--font); font-weight: 700; font-size: 26px; color: var(--accent); margin-left: 6px; }

.center-search { position: absolute; left: 50%; transform: translateX(-50%); display: flex; width: 100%; max-width: 620px; height: 52px; align-items: center; z-index: 10; }

.search-box { 
  display: flex; align-items: center; width: 100%; height: 100%;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; 
  padding: 6px 6px 6px 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); 
  transition: all 0.2s; position: relative; flex: 1; backdrop-filter: blur(20px);
}
.search-box:hover { border-color: var(--accent-border); box-shadow: 0 0 0 2px var(--accent-soft), 0 10px 30px rgba(0,0,0,0.15); }
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 10px 40px rgba(0,0,0,0.2); }
.search-box i.omni-icon { color: var(--muted); margin-right: 12px; width: 18px; height: 18px; flex-shrink: 0; }
.active-tag-pill { display: flex; align-items: center; gap: 4px; background: var(--accent-soft); color: var(--accent); padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--accent-border); margin-right: 8px; flex-shrink: 0; }
.search-box input { flex: 1; height: 100%; font-size: 15px; color: var(--text); min-width: 0; padding-left: 8px; }
.search-box input::placeholder { color: var(--faint); }

.exec-btn { background: var(--accent); color: #fff; border-radius: 999px; height: 36px; padding: 0 16px; font-weight: 600; font-size: 12px; display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-left: 8px; }
.exec-btn:hover { filter: brightness(1.1); transform: scale(1.02); }

.ai-quick-links { flex: 1; display: flex; justify-content: flex-end; gap: 8px; }
.ai-btn { width: 44px; height: 44px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center; transition: all 0.2s; box-shadow: var(--shadow); position: relative; }
.ai-btn:hover { background: var(--accent-soft); border-color: var(--accent-border); }
.ai-btn img { width: 18px; height: 18px; object-fit: contain; }

.tag-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow); display: none; flex-direction: column; padding: 8px; z-index: 100; backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
}
.tag-option { padding: 12px 16px; border-radius: 12px; cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; display:flex; justify-content:space-between; align-items: center; }
.tag-option.selected, .tag-option:hover { background: var(--accent-soft); color: var(--accent); }

.master-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 1450px; margin: 0 auto; width: 100%; flex: 1; min-height: 0; }
.left-pane { display: flex; flex-direction: column; gap: 16px; min-height: 0; flex: 1; }
.lp-top-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; flex: 1; min-height: 0; } 
.right-pane { display: flex; flex-direction: column; gap: 16px; min-height: 0; flex: 1; }
.grid-widget { display: flex; flex-direction: column; overflow: hidden; flex: 1; min-height: 0; }

.widget-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 13px; color: var(--text); flex-shrink: 0; }
.w-title { display: flex; align-items: center; gap: 8px; }
.w-title i { color: var(--text); width: 16px; height: 16px; }
.w-icon-img { width: 18px; height: 18px; object-fit: contain; }

.w-btn { width: 26px; height: 26px; border-radius: 6px; background: rgba(150,150,150,0.05); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); transition: all 0.2s; }
.w-btn:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-border); }
.w-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.w-action { font-size: 11px; color: var(--muted); font-weight: 600; padding: 6px 12px; background: rgba(150,150,150,0.08); border-radius: 8px; border: 1px solid var(--line); }
.w-action:hover { color: var(--text); background: rgba(150,150,150,0.15); border-color: var(--line-strong); }

.launch-grid { display: grid; gap: 10px; padding: 16px; overflow-y: auto; align-content: flex-start; flex: 1; min-height: 0; }
.launch-grid.layout-list { grid-template-columns: 1fr; }
.launch-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.launch-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.launch-grid.cols-2 .launch-name, .launch-grid.cols-3 .launch-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.launch-grid.layout-list .launch-name { white-space: normal; } 

.launch-item { display: flex; align-items: center; gap: 12px; padding: 14px; background: rgba(150,150,150,0.04); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: all 0.2s; text-align: left; overflow: hidden; }
.launch-item:hover { background: var(--accent-soft); border-color: var(--accent-border); }
.fav-icon { width: 24px; height: 24px; border-radius: 4px; object-fit: contain; background: transparent; flex-shrink: 0; }
.launch-name { font-weight: 600; font-size: 13px; display: block; color: var(--text); line-height: 1.2; }

.vault-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; flex: 1; min-height: 0; }
.snippet-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: rgba(150,150,150,0.03); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: all 0.2s; flex-shrink: 0; }
.snippet-item:hover { background: var(--accent-soft); border-color: var(--accent-border); }
.snip-title { font-weight: 500; font-size: 13px; color: var(--text); }
.snip-lang { font-size: 9px; font-weight: 700; font-family: var(--font-mono); color: var(--muted); padding: 4px 8px; background: rgba(150,150,150,0.1); border-radius: 8px; }

.engine-list { display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); gap: 12px; padding: 16px; overflow-y: auto; flex: 1; min-height: 0; }
.engine-card { display: flex; flex-direction: row; align-items: center; padding: 12px 16px; background: rgba(150,150,150,0.03); border: 1px solid var(--line); border-radius: 16px; transition: all 0.2s; cursor: pointer; gap: 12px; flex-shrink: 0; height: 100%; }
.engine-card:hover { background: var(--accent-soft); border-color: var(--accent-border); }
.e-icon { width: 40px; height: 40px; border-radius: 10px; background: transparent; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.e-icon img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.e-text-wrapper { display: flex; flex-direction: column; text-align: left; gap: 2px; overflow: hidden; }
.e-name { font-weight: 600; font-size: 14px; display: block; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.e-sub { font-size: 11px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.task-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; overflow-y: auto; min-height: 0; }
.task-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: rgba(150,150,150,0.03); border: 1px solid var(--line); border-radius: 12px; flex-shrink: 0; transition: all 0.2s; }
.task-row.done { opacity: 0.5; }
.task-row.done .task-title { text-decoration: line-through; }
.check-btn { width: 20px; height: 20px; border: 2px solid var(--line-strong); border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; transition: all 0.2s;}
.task-row.done .check-btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.check-btn i { width: 12px; height: 12px; }
.task-title { flex: 1; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }

.bottom-widgets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 1450px; margin: 0 auto; width: 100%; flex-shrink: 0; }
.bottom-widget { padding: 20px 24px; display: flex; flex-direction: column; justify-content: space-between; height: 140px; }

.clock-widget { align-items: center; justify-content: center; text-align: center; }
.time-display { font-size: 44px; font-weight: 700; letter-spacing: -2px; color: var(--text); line-height: 1; }
.date-display { font-size: 12px; color: var(--accent); font-weight: 600; margin-top: 8px; }

.prayer-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.p-time { font-size: 28px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.p-sub { font-size: 10px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.p-ar { font-family: var(--font-ar); font-size: 32px; color: var(--text); line-height: 1; }
.p-timeline { display: flex; justify-content: space-between; margin-bottom: 8px; }
.p-node { display: flex; flex-direction: column; align-items: center; gap: 2px; opacity: 0.4; }
.p-node.next-prayer { opacity: 1; color: var(--accent) !important; font-weight: 700; }
html[data-appearance="dark"] .p-node.next-prayer { text-shadow: 0 0 10px var(--accent-glow); }
.p-node span:first-child { font-size: 10px; font-weight: 600; }
.p-node span:last-child { font-size: 10px; font-weight: 700; }
.p-bar-bg { width: 100%; height: 3px; background: rgba(150,150,150,0.2); border-radius: 2px; overflow: hidden; }
.p-bar-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 1s linear; }

.world-clocks { display: flex; flex-direction: column; justify-content: center; gap: 10px; height: 100%; }
.world-row { display: flex; justify-content: space-between; align-items: center; }
.world-city { font-size: 13px; font-weight: 700; color: var(--text); display: flex; align-items: center; }
.world-country { font-size: 11px; color: var(--accent); margin-left: 6px; font-weight: 700; }
.world-time { display: flex; align-items: center; gap: 8px; }
.world-time-icon { width: 14px; height: 14px; color: var(--muted); display: flex; justify-content: center; align-items: center; }
.world-time-text { width: 68px; text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 700; color: var(--text); }

.weather-main { display: flex; align-items: center; justify-content: space-between; margin-bottom: auto; }
.weather-left { display: flex; flex-direction: column; }
.weather-loc { font-size: 12px; color: var(--text); font-weight: 700; margin-bottom: 2px; }
.weather-cond-text { font-size: 10px; color: var(--muted); font-weight: 600; }
.weather-temp-row { display: flex; align-items: center; gap: 10px; }
.w-temp { font-size: 36px; font-weight: 700; letter-spacing: -1px; line-height: 1; color: var(--accent); }
.w-hl { display: flex; flex-direction: column; font-size: 10px; color: var(--muted); font-weight: 600; line-height: 1.4; }
.weather-icon-main { width: 28px; height: 28px; color: var(--accent); margin-left: 4px; }
.weather-forecast { display: flex; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line); }
.forecast-node { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.forecast-node span:first-child { font-size: 9px; font-weight: 600; color: var(--muted); }
.f-temp-row { display: flex; align-items: center; gap: 4px; }
.f-temp-row i { width: 12px; height: 12px; color: var(--text); }
.f-temp-row span { font-size: 11px; font-weight: 700; color: var(--text); }

.footer { text-align: center; font-size: 11px; color: var(--muted); font-weight: 500; flex-shrink: 0; padding-bottom: 8px; }
.footer span { color: var(--accent); }

dialog:not([open]) { display: none !important; }
dialog[open] { display: flex; flex-direction: column; }
dialog {
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--text);
  border-radius: 24px; width: min(900px, 95vw); padding: 0; box-shadow: 0 30px 100px rgba(0,0,0,0.7);
  backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
}
dialog::backdrop { background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 600; background: rgba(150,150,150,0.02); }
.modal-body { padding: 24px; max-height: 70vh; overflow-y: auto; display: flex; flex-direction: column; gap: 24px; }
.modal-footer { padding: 20px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; background: rgba(150,150,150,0.02); }

.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text); display:flex; justify-content:space-between; align-items:center; }
.form-input { padding: 12px 14px; border-radius: 12px; background: var(--bg-mid); border: 1px solid var(--line-strong); color: var(--text); font-size: 13px; width: 100%; font-family: inherit; }
.form-input option { background: var(--bg-mid); color: var(--text); }
.form-input:focus { border-color: var(--accent); }

.theme-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.theme-btn { border: 1px solid var(--line); border-radius: 14px; padding: 16px 0; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--bg-mid); transition: all 0.2s; }
.theme-btn.active { border-color: var(--accent); color: var(--text); background: var(--accent-soft); box-shadow: 0 4px 15px var(--accent-glow); }
.theme-swatch { width: 32px; height: 32px; border-radius: 50%; }

.edit-row { display: flex; gap: 8px; align-items: center; background: rgba(150,150,150,0.03); padding: 8px; border-radius: 14px; border: 1px solid var(--line); }
.edit-row input, .edit-row select { flex: 1; }
.edit-row .short-input { flex: 0.5; }
.glass-btn-small { padding: 8px 14px; border-radius: 10px; font-size: 12px; font-weight: 600; background: var(--bg-mid); border: 1px solid var(--line-strong); cursor: pointer; color: var(--text); transition: all 0.2s; }
.glass-btn-small:hover { border-color: var(--accent); color: var(--accent); }

.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.calc-col { display: flex; flex-direction: column; gap: 16px; }
.entry-list { display: flex; flex-direction: column; gap: 8px; max-height: 200px; overflow-y: auto; padding-right: 4px; }
.entry-row-calc { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.entry-remove { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,0,0,0.1); color: #f43f5e; display: grid; place-items: center; cursor: pointer; }
.time-result { background: var(--accent-soft); border: 1px solid var(--accent-border); border-radius: 14px; padding: 18px; display: flex; justify-content: space-between; align-items: center; }
.time-result .val { font-size: 26px; font-weight: 700; color: var(--accent); }
.calc-result { background: var(--bg-mid); border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-align: center; }
.calc-res-val { font-size: 32px; font-weight: 700; color: var(--text); }
.calc-res-val.egp { color: var(--accent); }

@media(max-width: 1100px) {
  html, body { overflow: auto !important; height: auto !important; }
  .app-layout { flex-direction: column !important; overflow: visible !important; height: auto !important; min-height: 100vh; }
  .main-wrapper { padding: 16px 20px !important; overflow: visible !important; height: auto !important; }
  
  .sidebar { 
    height: auto !important; min-height: 70px; padding: 16px 20px !important; 
    flex-direction: row !important; justify-content: center !important; align-items: center !important;
    position: relative; border: none !important; background: transparent !important; backdrop-filter: none !important; box-shadow: none !important;
  }
  
  .side-brand { flex-direction: column !important; align-items: center !important; gap: 8px !important; width: auto !important; background: transparent !important; border: none !important; padding: 0 !important; }
  .brand-icon { width: 48px; height: 48px; }
  .b-main { display: block !important; font-size: 22px !important; line-height: 1; text-align: center; }
  .b-sub { display: none !important; }

  .side-boundary.mobile-hide-settings { position: absolute; right: 20px; top: 16px; background: transparent; border: none; padding: 0; }
  .hide-on-mobile { display: none !important; }

  #modeSwitcher { display: none !important; } 

  .lp-top-split, .right-pane, #vaultWidget, .bottom-widgets, .footer, .ai-quick-links { display: none !important; }

  .top-bar { flex-direction: column; align-items: flex-start; height: auto; gap: 16px; margin-bottom: 24px; margin-top: 10px; width: 100%; }
  .center-search { position: relative; left: 0; transform: none; width: 100%; max-width: 100%; order: 2; }
  .greeting { order: 1; padding: 0; }

  .master-grid { display: flex; flex-direction: column; gap: 0; }
  .left-pane { width: 100%; gap: 0; }
  #secondarySec { display: block !important; flex: auto; }
  #enginesWidget { display: flex !important; height: auto !important; border: none; background: transparent; box-shadow: none; padding: 0; }
  #enginesWidget .widget-header { padding-left: 0; padding-right: 0; border-bottom: none; }
  .engine-list { grid-template-columns: 1fr; grid-template-rows: auto; gap: 12px; padding: 10px 0; overflow: visible; }
  
  .theme-grid { grid-template-columns: repeat(3, 1fr); }
}
</style>
