/* ── Design tokens (reusable everywhere) ─────────────────────────────── */
:root {
  --app-bg:       #0f1115;
  --app-surface:  #161a22;
  --app-border:   #495163;
  --app-muted:    #8b93a3;
  --app-primary:  #6c8cff;
  --app-text:     #e6e8ec;
  --app-ok:       #34d399;
  --app-error:    #f87171;
  --app-warn:     #fbbf24;
  --app-info:     #60a5fa;

  /* derived */
  --app-badge-ok:     color-mix(in srgb, var(--app-ok)    12%, transparent);
  --app-badge-error:  color-mix(in srgb, var(--app-error) 12%, transparent);
  --app-badge-warn:   color-mix(in srgb, var(--app-warn)  12%, transparent);
  --app-badge-info:   color-mix(in srgb, var(--app-info)  15%, transparent);
  --app-shadow:   color-mix(in srgb, var(--app-bg) 20%, transparent);
  --app-backdrop: rgba(0,0,0,.6);
}

/* ── Pico dark overrides ─ */
[data-theme="dark"] {
  --pico-font-size: 100%;
  --pico-background-color: var(--app-bg);
  --pico-card-background-color: var(--app-surface);
  --pico-card-border-color: var(--app-border);
  --pico-muted-color: var(--app-muted);
  --pico-primary: var(--app-primary);
  --pico-primary-hover: color-mix(in srgb, var(--app-primary) 85%, black);
  --pico-border-radius: 3px;
  --pico-border-radius-sm: 6px;
}

/* ── Smaller buttons ───────────────────────────────────────────────────── */
button, .btn {
  padding: 2px 6px;
  font-size: 0.8125rem;
}

/* ── Badge (status pill) ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.badge.ok      { background: var(--app-badge-ok);   color: var(--app-ok);   }
.badge.error   { background: var(--app-badge-error); color: var(--app-error); }
.badge.pending { background: var(--app-badge-warn);  color: var(--app-warn);  }
.badge.changed { background: var(--app-badge-info);  color: var(--app-info);  }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── Spinner ──────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--app-border);
  border-top-color: var(--app-primary);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
.spinner.lg { width: 24px; height: 24px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.center-loader { display: flex; justify-content: center; padding: 60px 0; }

/* ── Vue transitions ─────────────────────────────────────────────────── */
.fade-enter-active, .fade-leave-active { transition: opacity 180ms; }
.fade-enter-from, .fade-leave-to        { opacity: 0; }



/* ── Form row: label left + Enable right, input below ─────────────── */
.form-row { display: flex; flex-direction: column; gap: 4px; }
.form-row-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.form-row-header label { margin: 0; padding: 0; border: none; background: none; box-shadow: none; white-space: nowrap; }

.form-row-group { display: flex; gap: 6px; flex-wrap: wrap; }
.form-row-group input { flex: 1; min-width: 100px; }

/* ── tables ───────────────────────────────────────────────────── */

.table-wrapper{overflow-x: auto;}
tr.disabled td { opacity: 0.4; }
tr.disabled td:last-child {
  opacity: 1;
  pointer-events: auto;
}
table tbody tr:hover td { background: color-mix(in srgb, var(--app-surface) 85%, var(--app-primary)); }
table.compact.sticky tbody tr:hover > td:nth-child(1),
table.compact.sticky tbody tr:hover > td:nth-child(2) { background: color-mix(in srgb, var(--app-surface) 85%, var(--app-primary)); }

table.compact { width: 100%; table-layout: auto; font-size: 0.85rem; margin-bottom:0px; }
table.compact th, table.compact td { padding: 4px 5px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
table.compact th[data-tooltip] { overflow: visible; }
table.compact td:has([data-tooltip]) { overflow: visible; }

table.compact.sticky thead th { position: sticky; top: 0; background: var(--app-surface); overflow: visible; }
table.compact.sticky thead { position: sticky; top: 0; z-index: 3; background: var(--app-surface); }
table.compact.sticky tbody tr > td:nth-child(1) { position: sticky; left: 0; z-index: 2; background: var(--app-surface); }
table.compact.sticky thead tr > th:nth-child(1) { position: sticky; left: 0; z-index: 2; background: var(--app-surface); }
table.compact.sticky tbody tr > td:nth-child(2) { position: sticky; left: 2.5em; z-index: 2; background: var(--app-surface); }
table.compact.sticky thead tr > th:nth-child(2) { position: sticky; left: 2.5em; z-index: 2; background: var(--app-surface); }

table.compact .text-center{text-align: center;}
table.compact .text-right{text-align: right;}

table.compact .project_cell{ min-width: 70px; max-width: 350px; }
table.compact .project_cell.alert  { width: 250px; }
table.compact .resource_cell { min-width: 70px;  width: 80px;  }
table.compact .type_cell     { min-width: 70px;  width: 100px;  }
table.compact .time_cell     { min-width: 120px; width: 150px; }
table.compact .status_cell   { min-width: 70px;  width: 90px;  }
table.compact .action_cell   { min-width: 40px;  width: 40px;  }
table.compact .details_cell   { min-width: 70px; }

/* ── Projects table: right border after each resource pair ── */
table.compact tbody > tr > td:nth-child(5),   /* website enabled */
table.compact tbody > tr > td:nth-child(7),   /* github enabled */
table.compact tbody > tr > td:nth-child(10),   /* twitter enabled */
table.compact tbody > tr > td:nth-child(12) ,  /* token enabled */
table.compact tbody > tr > td:nth-child(13)   /* activity display enabled */
  { border-right: 2px solid var(--app-border); }
table.compact .col-actions { width: 210px; display: flex; gap: 4px; overflow: visible; justify-content: flex-end; }

table.compact th.sortable { cursor: pointer; user-select: none; }
table.compact th.sortable:hover { color: var(--app-primary); }

/* ── Toast notification ─────────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.toast-msg {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--pico-border-radius-sm);
  padding: 10px 16px;
  font-size: 0.8125rem;
  color: var(--app-text);
  box-shadow: 0 4px 12px var(--app-shadow);
  animation: toastIn 200ms ease, toastOut 200ms ease 2s forwards;
}
.toast-msg.ok    { border-left: 3px solid var(--app-ok);   }
.toast-msg.error { border-left: 3px solid var(--app-error); }
@keyframes toastIn  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* ── Layout ───────────────────────────────────────────────────────────── */
/* Override Pico's default max-width 1200px — let everything fill the viewport */
html, body, main { max-width: 100%; margin: 0; padding: 0; }

.ml5 {margin-left: 5px;}
.mr5 {margin-right: 5px;}
.ml10 {margin-left: 10px;}
.mr10 {margin-right: 10px;}
.ml15 {margin-left: 15px;}
.mr15 {margin-right: 15px;}


.page { max-width: 1200px; padding: 28px 0px; overflow-x: visible; margin:0 auto; }

.logs-section { margin-top: 1rem; overflow-x: visible; }

.page-nav-arrows {
  position: fixed;
  right: max(16px, calc((100vw - 1316px) / 2 + 16px));
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 100;
}
.page-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.page-nav-btn:hover { background: var(--primary-bg); }

.toolbar {
  display: flex;
  gap: 10px 0;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
  padding: 0 0 0 10px;
}
.toolbar h2 { margin: 0; flex: 1; }
.toolbar button {border-radius: 0;}

/* ── Settings grid helpers ──────────────────────────────────────────── */
/* Force a settings article to span 2 columns in Pico's auto-fit grid */



.grid { display: grid; grid-template-columns: repeat(3, 1fr);  gap: 10px; }
.grid.col2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));gap: 18px; }
.force-wide {
  grid-column: span 2;
  min-width: 0;
}


/* ── Navbar (Pico's .navbar with app overrides) ───────────────────────── */
nav.navbar {
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-border);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0;
  max-width: 1200px;
  margin: 0 auto;
  overflow-x: hidden;
}
nav.navbar .brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 1.2rem;
  color: var(--app-text);
  text-decoration: none;
  box-shadow: none;
  background: none;
}
nav.navbar a {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--app-muted);
  text-decoration: none;
  background: none;
  box-shadow: none;
  border-radius: 6px;
  padding: 8px 12px;
  transition: color 180ms, background 180ms;
}
nav.navbar a.index{font-size:0.8rem}
nav.navbar a:hover {
  color: var(--app-text);
  background: color-mix(in srgb, var(--app-bg) 80%, transparent);
}
nav.navbar a[aria-current="page"] {
  color: var(--app-text);
  background: color-mix(in srgb, var(--app-primary) 12%, transparent);
}
.logo-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(135deg, var(--app-primary), var(--app-ok));
  box-shadow: 0 0 8px color-mix(in srgb, var(--app-primary) 60%, transparent);
}


/* ── Modal ───────────────────────────────────────── */
.modal {
  display: none;
  flex-direction: column;
  max-width: 700px;
  width: 100%;
  max-height: 95vh;
  overflow: hidden;
  color: var(--app-text);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  background: var(--app-bg);
  border: 1px solid var(--app-border);
}
.modal.active { display: flex; z-index: 1001; }

.modal-header {
  flex-shrink: 0;
  padding: 6px 12px;
  border-bottom: 1px solid var(--app-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 22px;
}

.modal.modal-iframe {
  max-width: 720px;
  max-height: 95vh;
  height: 95vh;
  padding: 5px 10px;
}

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--app-backdrop);
  z-index: 1000;
}
.modal-backdrop.active { display: block; }

.iframe-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.iframe-wrap iframe {
  flex: 1;
  border: none;
  min-height: 500px;
  width: 100%;
}


.modal-close-btn {
  width: 1.6rem;
  height: 1.8rem;
  padding: 0;
  border-radius: var(--pico-border-radius);
  font-size: 1.3rem;
  line-height: 1.1;
  color: var(--app-text);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.error-msg {
  font-size: 0.75rem;
  color: var(--app-error);
  margin-left: 8px;
}

/* ── Text helpers ─────────────────────────────────────────────────────── */
.detail {
  color: var(--app-muted);
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sha {
  background: var(--app-surface);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.6875rem;
  color: var(--app-primary);
}
.msg {
  color: var(--app-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}



/* ── Project card ────────────────────────────────────────────────────── */

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr);  gap: 10px; padding-top:10px;}

.project-card { display: flex; flex-direction: column; gap: 6px; overflow: visible; margin-bottom: 0px; padding:5px; border: 1px solid var(--app-border)}

.project-card .token-details {display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:0 2px;}
.project-card .text-small {font-size: 0.85rem}

.project-card .head, .repos-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 0px; background-color: var(--app-border); padding: 2px 5px;}

.project-card .name { font-size: 1rem; font-weight: 600; margin: 0; cursor: pointer; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color:var(--app-text);}

.repos-section { border-top: 1px solid var(--app-border); padding-top: 12px; }
.repos-scroll  { max-height: 200px; overflow-y: auto; }

/* ── Repo list ───────────────────────────────────────────────────────── */
.repo-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.repo {
  padding: 8px 10px;
  background: var(--app-bg);
  border: 1px solid var(--app-border);
  border-radius: var(--pico-border-radius-sm);
}
.repo-name { font-weight: 500; font-size: 0.8125rem; }
.repo-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }

/* ── Settings ─────────────────────────────────────────────────────────── */
.trigger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 2px solid var(--app-border);
  font-size: 1rem;
}
.trigger-row:last-of-type { border-bottom: none; }

.danger-zone { border-color: var(--app-error); background: color-mix(in srgb, var(--app-error) 5%, var(--app-surface)); }
.danger-zone h3 { color: var(--app-error); }
.danger-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Price table ────────────────────────────────────────────────────────── */
.price-table-wrapper {overflow-x: auto; overflow-y: auto; max-height: 80vh; position: relative;}
.price-table-wrapper.maximized { position: fixed; inset: 0; z-index: 200; background: var(--app-bg); padding: 2px; overflow: auto; max-height: 100vh;}

.price-table { table-layout: auto; font-size: 0.85rem; width: 100%; border-collapse: collapse; font-size: 0.95rem;}
.price-table th { text-align: left; padding: 6px 10px; font-weight: bold; border-bottom: 2px solid var(--app-border); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.price-table td { padding: 6px 10px; border-bottom: 1px solid var(--app-border); }
.price-table td.num, .price-table th.num { text-align: right; }
.price-table td.cen, .price-table th.cen { text-align: center; }
.price-table tr:hover { background: var(--pico-card-background-color-hover, rgba(255,255,255,0.03)); }
/* Row tint — border all around */
.price-table tr.row-up   { outline: 1px solid var(--app-ok); outline-offset: -2px; }
.price-table tr.row-down { outline: 1px solid var(--app-error); outline-offset: -2px; }

/* Cell tint — up (green), graduated */
.price-table .cell-up-light   { background-color: color-mix(in srgb, var(--app-ok) 18%, transparent); font-weight: bold; }
.price-table .cell-up-medium  { background-color: color-mix(in srgb, var(--app-ok) 35%, transparent); font-weight: bold; }
.price-table .cell-up-strong  { background-color: color-mix(in srgb, var(--app-ok) 55%, transparent); font-weight: bold; }

/* Cell tint — down (red), graduated */
.price-table .cell-down-light   { background-color: color-mix(in srgb, var(--app-error) 18%, transparent); font-weight: bold; }
.price-table .cell-down-medium  { background-color: color-mix(in srgb, var(--app-error) 35%, transparent); font-weight: bold; }
.price-table .cell-down-strong  { background-color: color-mix(in srgb, var(--app-error) 55%, transparent); font-weight: bold; }

/* Text color for neg/pos */
.price-table .neg { color: var(--app-error); }
.price-table .pos { color: var(--app-ok);   }
.price-table a { text-decoration: none; }
.price-table a:hover { text-decoration: underline; }
.price-table th { cursor: pointer; user-select: none; }
.price-table th:hover { color: var(--app-primary); }
.price-table th.sort-asc::after { content: ' ↑' !important; }
.price-table th.sort-desc::after { content: ' ↓' !important; }


.tabs { display: flex; gap: 2px; margin: 0px; margin-bottom: 1rem; border-bottom: 1px solid var(--app-border);}
.tabs .search-input { margin-left: auto; margin-bottom: 0; align-self: center; max-width: 250px; }
.tabs .refresh-btn {
  align-self: center;
  margin-left: 5px;
  padding: 4px 10px;
  font-size: 1rem;
  border-radius: 4px;
  background: var(--app-bg-hover);
  color: var(--app-fg);
  border: 1px solid var(--app-border);
  cursor: pointer;
  transition: background 0.15s;
}
.tabs .refresh-btn:hover { background: var(--app-border); }
.tab {
  padding: 8px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--app-muted);
  cursor: pointer;
  font-size: 1rem; font-weight: bold;
  transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: var(--app-text); }
.tab.active { color: var(--app-primary); border-bottom-color: var(--app-primary); }

/* ── Pagination ────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 0.8125rem;
  color: var(--app-muted);
}

/* ── Price Alerts Table Settings ─────────────────────────────────────────────────── */
.price-alerts-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.price-alerts-header,
.price-alert-row {
  display: grid;
  grid-template-columns: 40px 80px 1fr 1fr 80px 80px 60px;
  align-items: center;
  gap: 8px;
}
.price-alerts-header {
  font-size: 0.75rem;
  color: var(--app-muted);
  letter-spacing: 0.05em;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--app-border);
}
.price-alerts-header .upp {text-transform: uppercase;}
.price-alert-row {
  padding: 6px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--app-border) 40%, transparent);
}
.price-alert-row .switch {
  justify-self: center;
}
.row-disabled input,
.row-disabled label {
  opacity: 0.5;
  pointer-events: none;
}
.row-disabled label:last-child {
  opacity: 1;
  pointer-events: auto;
}
.alert-num {
  color: var(--app-muted);
  font-size: 0.875rem;
  text-align: center;
}
.price-alert-row input[type="number"] {
  width: 100%;
  padding: 4px 8px;
  font-size: 0.875rem;
}

/* Snooze popover */
.popover{position:absolute;right:0;z-index:50;background:var(--app-border);border:1px solid var(--app-info);border-radius:6px;padding:6px;min-width:230px;}
.snooze-opt {
  display: inline;
  padding: 4px 8px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.82rem;
  color: var(--app-text);
}
.snooze-opt.active { font-weight: 600; background: var(--app-primary); }
.snooze-opt:hover { background: var(--app-muted); }
.snooze-opt.unsnooze { display: block; width: 100%; color: var(--app-error); text-align: center; margin-top: 4px; border-top: 1px solid var(--app-border); padding-top: 6px; }



/* Auth pages */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px);
}
.auth-card {
  width: 100%;
  max-width: 380px;
  padding: 2rem;
}
.auth-card h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}
.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.user-email {
  color: var(--app-muted);
  font-size: 0.85rem;
  padding: 0 0.75rem;
}

/* ── Social icon classes (SVG inline data URIs) ──────────────────────── */


.icon-btn {
  background: none;
  border: none;
  padding: 2px 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-btn:hover { opacity: 0.75; }
.icon-btn .icon { width: 16px; height: 16px; }

.icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  background: no-repeat center;
  background-size: contain;
  flex-shrink: 0;
  vertical-align: middle;
}

.icon-github {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23e6e8ec' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E");
}
.icon-twitter {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23e6e8ec' d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.744l7.73-8.835L1.254 2.25H8.08l4.713 5.863zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E");
}
.icon-telegram {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23e6e8ec' d='M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z'/%3E%3C/svg%3E");
}
.icon-website {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' stroke='%23e6e8ec' fill='none' stroke-width='3'%3E%3Cpath d='M39.93 55.72A24.86 24.86 0 1 1 56.86 32.15a37.24 37.24 0 0 1-.73 6'/%3E%3Cpath d='M37.86 51.1A47 47 0 0 1 32 56.7'/%3E%3Cpath d='M32 7A34.14 34.14 0 0 1 43.57 30a34.07 34.07 0 0 1 .09 4.85'/%3E%3Cpath d='M32 7A34.09 34.09 0 0 0 20.31 32.46c0 16.2 7.28 21 11.66 24.24'/%3E%3Cline x1='10.37' y1='19.9' x2='53.75' y2='19.9'/%3E%3Cline x1='32' y1='6.99' x2='32' y2='56.7'/%3E%3Cline x1='11.05' y1='45.48' x2='37.04' y2='45.48'/%3E%3Cline x1='7.14' y1='32.46' x2='56.86' y2='31.85'/%3E%3Cpath d='M53.57 57 58 52.56l-8-8 4.55-2.91a.38.38 0 0 0-.12-.7L39.14 37.37a.39.39 0 0 0-.46.46L42 53.41a.39.39 0 0 0 .71.13L45.57 49Z'/%3E%3C/svg%3E");
}
.icon-expand {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6e8ec' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cpolyline points='9 21 3 21 3 15'/%3E%3Cline x1='21' y1='3' x2='14' y2='10'/%3E%3Cline x1='3' y1='21' x2='10' y2='14'/%3E%3C/svg%3E");
}
.icon-shrink {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6e8ec' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 14 10 14 10 20'/%3E%3Cpolyline points='20 10 14 10 14 4'/%3E%3Cline x1='10' y1='14' x2='3' y2='21'/%3E%3Cline x1='21' y1='3' x2='14' y2='10'/%3E%3C/svg%3E");
}
.icon-folder-plus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6e8ec' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z'/%3E%3Cline x1='12' y1='11' x2='12' y2='17'/%3E%3Cline x1='9' y1='14' x2='15' y2='14'/%3E%3C/svg%3E");
}
.icon-bell {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6e8ec' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E");
}
.icon-bell-off {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6e8ec' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3Cpath d='M18.63 13A17.9 17.9 0 0 1 18 8'/%3E%3Cpath d='M6.26 6.26A5.86 5.86 0 0 0 6 8c0 7-3 9-3 9h14'/%3E%3Cpath d='M18 8a6 6 0 0 0-9.33-5'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
}
.icon-trash-2 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6e8ec' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'/%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3Cline x1='10' y1='11' x2='10' y2='17'/%3E%3Cline x1='14' y1='11' x2='14' y2='17'/%3E%3C/svg%3E");
}
.icon-edit {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6e8ec' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'/%3E%3C/svg%3E");
}
.icon-settings {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6e8ec' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E");
}


@media (max-width: 1100px) {
  .project-grid { grid-template-columns: repeat(2, 1fr);}
}

/* ── Tablets ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {

  .page { padding: 28px 5px; }
  .page-nav-arrows { display: none; }
  .project-grid {  grid-template-columns: 1fr; }  

  .grid { grid-template-columns: repeat(2, 1fr); }
  .grid .force-wide { grid-column: span 2; min-width: 0; }
}

@media (max-width: 1240px) {
  .page-nav-arrows { display: none; }
}

/* ── Mobile: always-on tweaks ─────────────────────────────────────────── */
@media (max-width: 600px) {

  .grid { grid-template-columns: repeat(1, 1fr); }
  .grid .force-wide { grid-column: span 1; min-width: 0; }

  /* Page: add side breathing room */
  .page {
    padding-left: 10px;
    padding-right: 10px;
  }

  /* Navbar: full width, no max-width constraint */
  nav.navbar {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 12px;
    overflow: auto;
  }

  nav.navbar a {
  font-size: 0.9rem;
 }
 nav.navbar a.index{font-size:0.6rem}

  /* Tables inside articles need a horizontal scroll anchor */
  article table.compact {
    overflow-x: auto;
    white-space: nowrap;
  }

  .hide-sm { display: none; }


  /* Tabs: reduce padding, allow wrapping */
  .tabs {
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    padding: 8px 10px;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  /* Toast: center bottom on small screens */
  #toast {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    align-items: center;
  }

  /* Project card: tighter padding */
  .project-card {
    padding: 12px;
  }

  /* Toolbar: tighter on small screens */
  .toolbar {
    padding: 0;
  }

  /* Project table: force project_cell to shrink and truncate on mobile */
  table.compact .project_cell {
    min-width: 0 !important;
    max-width: 120px !important;
    width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Price table: sticky second column (Symbol) on mobile — first col (Project) is hidden */
  .price-table th:nth-child(2),
  .price-table td:nth-child(2) {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--pico-card-background-color, #1a1a2e);
  }
  .price-table th:nth-child(2) { z-index: 3; }

  /* Modal: nearly full screen on mobile */
  .modal {
    max-width: 98vw;
    max-height: 98vh;
  }

  /* Auth card */
  .auth-card {
    padding: 1.25rem;
  }

  /* Price alerts grid: single column */
  .price-alerts-header,
  .price-alert-row {
    grid-template-columns: 22px 1fr 1fr 1fr 40px 40px 40px;
    font-size: 0.8rem;
  }

  /* Project card status table: scrollable */
  .project-card table.compact {
    font-size: 0.78rem;
  }
}