/* Custom Variable Definitions (Keep your original :root) */
:root {
  --bg: #0e3040;
  --panel: #124054;
  --text: #e7f3f9;
  --muted: #8fb0c2;
  --accent: #7be3ff;
  --accent-2: #ffa117;
  --border: rgba(255, 255, 255, 0.12);
  --shadow-dark: 0 16px 32px rgba(0, 0, 0, 0.6);
  --radius-soft: 8px;
  --radius-pill: 999px;
  --radius-card: 12px;
  --font-size-small: 13px;
  --font-size-body: 14px;
}

body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Poppins', sans-serif; }

/* --- Omnibox & Toolbar --- */
.toolbar { background: #124054; padding: 10px 20px; display: flex; gap: 15px; align-items: center; border-bottom: 1px solid var(--border); }

.search-container { position: relative; flex-grow: 1; display: flex; align-items: center; }

.search-container input {
  width: 100%; padding: 10px 15px; background: #0a2533; border: 1px solid var(--accent);
  color: var(--text); border-radius: var(--radius-soft); font-size: 14px; outline: none;
}

.search-pill {
  position: absolute; right: 10px; background: var(--accent-2); color: #0e3040;
  padding: 2px 10px; border-radius: var(--radius-pill); font-size: 10px; font-weight: 700; pointer-events: none;
}

.search-dropdown {
  display: none; position: absolute; top: 100%; left: 0; width: 100%; background: #124054;
  border: 1px solid var(--accent); border-top: none; z-index: 2000; max-height: 300px; overflow-y: auto;
}

.search-category { background: rgba(0,0,0,0.2); padding: 5px 12px; font-size: 10px; color: var(--accent); text-transform: uppercase; }

.search-item { padding: 10px 15px; cursor: pointer; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; font-size: 13px; }

.search-item:hover { background: rgba(123, 227, 255, 0.1); }

/* --- Calculator Widget --- */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.calc-grid input { background: #0a2533; border: 1px solid var(--border); color: white; padding: 5px; width: 80%; border-radius: 4px; }
.calc-result { margin-top: 15px; padding: 10px; background: rgba(123, 227, 255, 0.1); border-radius: 4px; text-align: center; }
.calc-result span { font-weight: bold; color: var(--accent); font-size: 1.2em; }

/* (Include your existing grid-stack and table styles here) */
/* ... Keep existing root and toolbar styles ... */

/* --- FX Calculator Widget --- */
.fx-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fx-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.fx-input-group input {
  flex: 1;
  background: #0a2533;
  border: 1px solid var(--border);
  color: #fff;
  padding: 8px;
  border-radius: 4px;
  font-family: 'Roboto Mono', monospace;
}

.fx-input-group select {
  background: var(--bg);
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 7px;
  border-radius: 4px;
  font-weight: 600;
}

.fx-rate-display {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.fx-rate-display strong {
  color: var(--accent);
}

/* --- Search Dropdown (Refined) --- */
.search-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.search-item .cat-label {
  font-size: 9px;
  background: rgba(255,255,255,0.1);
  padding: 2px 5px;
  border-radius: 3px;
  color: var(--muted);
}

/* Omnibox & Dropdown */
.toolbar { background: var(--panel); padding: 12px 20px; border-bottom: 1px solid var(--border); }
.search-container { position: relative; width: 100%; max-width: 600px; margin: 0 auto; }
.search-container input {
  width: 100%; padding: 10px 15px; background: rgba(0,0,0,0.2); border: 1px solid var(--accent);
  color: #fff; border-radius: 6px; font-size: 14px; outline: none;
}
.search-pill {
  position: absolute; right: 10px; top: 10px; background: var(--accent-2); color: var(--bg);
  padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; pointer-events: none;
}
.search-dropdown {
  display: none; position: absolute; top: 110%; left: 0; width: 100%; background: var(--panel);
  border: 1px solid var(--accent); border-radius: 6px; z-index: 9999; box-shadow: var(--shadow-dark);
}
.search-category { background: rgba(0,0,0,0.3); padding: 6px 15px; font-size: 10px; color: var(--accent); text-transform: uppercase; }
.search-item { padding: 10px 15px; cursor: pointer; border-bottom: 1px solid var(--border); font-size: 13px; }
.search-item:hover { background: rgba(123, 227, 255, 0.1); }

/* Calculator UI Helpers */
.calc-row { display: flex; justify-content: space-between; margin-bottom: 8px; align-items: center; }
.calc-row input, .calc-row select { background: #0a2533; border: 1px solid var(--border); color: #fff; padding: 5px; border-radius: 4px; width: 90px; }
.calc-btn { width: 100%; padding: 8px; background: var(--accent); color: #000; border: none; font-weight: bold; cursor: pointer; margin-top: 5px; }
.calc-res { margin-top: 10px; padding: 10px; background: rgba(255,161,23,0.1); text-align: center; border-radius: 4px; color: var(--accent-2); font-family: 'Roboto Mono'; font-weight: bold; }

/* ----------------------------
   Data Desk v1 - Grid + Cards
---------------------------- */
.grid-stack {
  padding: 12px;
}

.dd-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-dark);
  overflow: hidden;
}

.dd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.12);
}

.dd-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dd-titletext {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.dd-actions {
  display: flex;
  gap: 8px;
}

.dd-iconbtn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  cursor: pointer;
  line-height: 1;
  font-size: 16px;
}

.dd-iconbtn:hover {
  background: rgba(123, 227, 255, 0.12);
  border-color: rgba(123, 227, 255, 0.45);
}

.widget-body {
  padding: 12px;
  font-size: 13px;
  color: var(--text);
}

/* Simple list + table primitives */
.dd-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dd-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  background: rgba(0,0,0,0.18);
}

.dd-row:hover {
  border-color: rgba(123, 227, 255, 0.45);
  background: rgba(123, 227, 255, 0.08);
}

.dd-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.9;
}

.dd-time {
  color: var(--muted);
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
}

.dd-foot {
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
}

.dd-muted {
  color: var(--muted);
}

.dd-center {
  text-align: center;
}

/* Calendar */
.cal-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cal-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 10px;
  padding: 10px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0,0,0,0.18);
}

.cal-row:hover {
  border-color: rgba(255,161,23,0.55);
  background: rgba(255,161,23,0.08);
}

.cal-left {
  font-family: 'Roboto Mono', monospace;
  color: var(--text);
}

.cal-time {
  font-size: 14px;
  font-weight: 700;
}

.cal-date {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.cal-title {
  font-weight: 700;
  font-size: 13px;
}

.cal-sub {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.cal-right {
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  color: var(--accent-2);
  align-self: center;
}

/* Simple table */
.dd-table {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.dd-tr {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.dd-th, .dd-td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.12);
  font-family: 'Roboto Mono', monospace;
  font-size: 12px;
}

.dd-th {
  color: var(--accent);
  font-weight: 800;
}

.dd-td {
  background: rgba(0,0,0,0.18);
  color: var(--text);
}

.dd-tr:last-child .dd-td { border-bottom: none; }

/* Search empty state */
.search-empty {
  padding: 12px 15px;
  color: var(--muted);
  font-size: 12px;
}


/* ----------------------------
   Desk Presets (non-enforcing)
---------------------------- */
.dd-toolbar-actions {
  margin-left: 12px;
  display: flex;
  align-items: center;
  position: relative;
}

.dd-btn {
  background: rgba(0,0,0,0.25);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
}

.dd-btn:hover {
  border-color: rgba(123, 227, 255, 0.45);
  background: rgba(123, 227, 255, 0.10);
}

.dd-presets-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 260px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-dark);
  overflow: hidden;
  display: none;
  z-index: 3000;
}

.dd-presets-dropdown.open { display: block; }

.dd-presets-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  cursor: pointer;
  color: var(--text);
}

.dd-presets-item:hover {
  background: rgba(123, 227, 255, 0.08);
}

.dd-presets-name {
  font-weight: 700;
  font-size: 12px;
}

.dd-presets-desc {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.dd-toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  background: rgba(0,0,0,0.65);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
  z-index: 5000;
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.dd-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Newswire (terminal wire look) ---------- */
.wire-topbar{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--border);border-radius:12px;background:rgba(0,0,0,0.18);}
.wire-datebtn{display:flex;align-items:center;gap:8px;border:1px solid var(--border);background:rgba(0,0,0,0.22);color:var(--text);padding:8px 10px;border-radius:10px;cursor:pointer;font-size:12px;white-space:nowrap;}
.wire-datebtn:hover{border-color:rgba(123,227,255,0.45);background:rgba(123,227,255,0.08);}
.wire-searchwrap{flex:1;display:flex;align-items:center;gap:8px;border:1px solid var(--border);background:rgba(0,0,0,0.22);padding:8px 10px;border-radius:10px;min-width:200px;}
.wire-search{width:100%;background:transparent;border:none;outline:none;color:var(--text);font-size:12px;}
.wire-search::placeholder{color:var(--muted);}
.wire-actions{display:flex;align-items:center;gap:8px;}
.wire-pill{border:1px solid var(--border);background:rgba(0,0,0,0.22);color:var(--text);padding:8px 10px;border-radius:999px;cursor:pointer;font-size:12px;}
.wire-pill:hover{border-color:rgba(123,227,255,0.45);background:rgba(123,227,255,0.08);}
.wire-gear{width:34px;height:34px;border-radius:10px;border:1px solid var(--border);background:rgba(0,0,0,0.22);color:var(--text);cursor:pointer;}
.wire-gear:hover{border-color:rgba(123,227,255,0.45);background:rgba(123,227,255,0.08);}
.wire-list{margin-top:12px;display:flex;flex-direction:column;gap:6px;}
.wire-row{display:grid;grid-template-columns:90px 1fr 120px;gap:14px;align-items:center;padding:10px 12px;border-radius:12px;border:1px solid transparent;cursor:pointer;}
.wire-row:hover{border-color:rgba(123,227,255,0.25);background:rgba(0,0,0,0.10);}
.wire-date{color:var(--muted);font-size:12px;font-family:'Roboto Mono', monospace;}
.wire-headline{color:var(--accent-2);font-size:13px;font-weight:700;}
.wire-source{text-align:right;color:var(--muted);font-size:11px;letter-spacing:0.06em;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}



/* ================================
   NEWSWIRE GRID-LOCKED ALIGNMENT
   (override – appended)
================================ */
:root{
  --wire-date-col: 120px;
  --wire-source-col: 120px;
}

.wire-topbar{
  display:grid;
  grid-template-columns: var(--wire-date-col) 1fr var(--wire-source-col);
  align-items:center;
  gap:12px;
  padding:10px;
  border:1px solid var(--border);
  border-radius:12px;
  background:rgba(0,0,0,0.18);
}

.wire-datebtn{
  justify-self:center;
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid var(--border);
  background:rgba(0,0,0,0.22);
  color:var(--text);
  padding:8px 10px;
  border-radius:10px;
  cursor:pointer;
  font-size:12px;
  white-space:nowrap;
}

.wire-searchwrap{
  justify-self:stretch;
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid var(--border);
  background:rgba(0,0,0,0.22);
  padding:8px 10px;
  border-radius:10px;
  min-width:0;
}

.wire-actions{
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
}

.wire-sourcebtn{
  justify-self:end;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
  border:1px solid var(--border);
  background:rgba(0,0,0,0.22);
  color:var(--text);
  padding:8px 10px;
  border-radius:10px;
  cursor:pointer;
  font-size:12px;
  white-space:nowrap;
}

.wire-list{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.wire-row{
  display:grid;
  grid-template-columns: var(--wire-date-col) 1fr var(--wire-source-col);
  gap:12px;
  align-items:center;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid transparent;
  cursor:pointer;
}

.wire-date{
  text-align:center;
  color:var(--muted);
  font-size:12px;
  font-family:'Roboto Mono', monospace;
}

.wire-headline{
  color:var(--accent-2);
  font-size:13px;
  font-weight:700;
  line-height:1.35;
  min-width:0;
}

.wire-source{
  text-align:right;
  color:rgba(143,176,194,0.75);
  font-size:10px;
  letter-spacing:0.08em;
  text-transform:uppercase;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}


/* ================================
   FX Converter – Mockup Styling
   (override – appended)
================================ */
.fx-container{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.fx-input-group{
  display:grid;
  grid-template-columns: 88px 1fr;
  gap:10px;
  align-items:center;
}

.fx-input-group input{
  height:36px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Roboto Mono', monospace;
  font-size: 14px;
  outline: none;
}

.fx-input-group input:focus{
  border-color: rgba(123,227,255,0.55);
  box-shadow: 0 0 0 2px rgba(123,227,255,0.10);
}

.fx-input-group select{
  height:36px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  outline: none;
  appearance: none;
}

.fx-input-group select:focus{
  border-color: rgba(123,227,255,0.55);
  box-shadow: 0 0 0 2px rgba(123,227,255,0.10);
}

.fx-divider{
  text-align:center;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(143,176,194,0.85);
  padding: 2px 0;
}

.fx-rate-display{
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.fx-rate-display strong{
  color: var(--text);
  font-weight: 800;
}


/* --- Omnibox in-card search additions --- */

.search-category.inline { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.search-hint { font-size: 12px; color: rgba(231,243,249,0.7); }
.search-item .match-sub { display:block; font-size: 12px; color: rgba(231,243,249,0.75); margin-top: 2px; }
.search-item.in-card { border-left: 3px solid rgba(123,227,255,0.8); padding-left: 10px; }
.search-item.in-card .cat-label { opacity: 0.9; }

.dd-flash {
  outline: 2px solid rgba(123,227,255,0.9);
  box-shadow: 0 0 0 4px rgba(123,227,255,0.18);
  border-radius: 10px;
  animation: ddFlash 1.2s ease-out 1;
}
@keyframes ddFlash {
  0% { transform: scale(1); }
  20% { transform: scale(1.01); }
  100% { transform: scale(1); }
}



/* ---------- Newswire: My Wires + Settings styling polish ---------- */
/* Ensure icons inside search input area align and look like the mockup */
.wire-searchwrap{
  position: relative;
}

/* If you keep 🔎 as a text icon, nudge it to center nicely */
.wire-searchico{
  font-size: 14px;
  opacity: 0.85;
}

/* Right-side pill cluster */
.wire-search-actions{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

/* Make room in the search input for the two pills */
.wire-search{
  padding-right: 150px; /* space for My Wires + gear */
}

/* "My Wires" pill */
.wire-myWiresInSearch{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(10, 32, 44, 0.55);
  color: rgba(231,243,249,0.92);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.01em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.wire-myWiresInSearch:hover{
  background: rgba(123,227,255,0.12);
  border-color: rgba(123,227,255,0.30);
}

.wire-myWiresInSearch:active{
  transform: translateY(0.5px);
}

/* Settings "wheel" pill */
.wire-gearInSearch{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(10, 32, 44, 0.55);
  color: rgba(231,243,249,0.92);
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  line-height: 1;
  font-size: 14px; /* if using ⚙ text icon */
}

.wire-gearInSearch:hover{
  background: rgba(123,227,255,0.12);
  border-color: rgba(123,227,255,0.30);
}

.wire-gearInSearch:active{
  transform: translateY(0.5px);
}

/* Optional: if you later swap to SVG icons, keep them centered */
.wire-gearInSearch svg{
  width: 14px;
  height: 14px;
  display: block;
  opacity: 0.95;
}

/* Make sure the pills don't look like default buttons (some browsers) */
.wire-myWiresInSearch, .wire-gearInSearch{
  -webkit-appearance: none;
  appearance: none;
}
