/* Feather Web Wallet — UI (styled after the Feather desktop app, Qt light theme) */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #f4f4f4;
  color: #1e1e1e;
  font: 13px/1.45 -apple-system, "Segoe UI", Roboto, "DejaVu Sans", "Liberation Sans", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: #2f7de1; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }

.app-wrap { max-width: 900px; margin: 18px auto; padding: 0 10px; }

/* ---------------- window chrome ---------------- */
.app-window {
  background: #efefef;
  border: 1px solid #c9c9c9;
  border-radius: 6px;
  box-shadow: 0 10px 34px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.12);
  overflow: hidden;
}
.app-titlebar {
  background: linear-gradient(#f7f7f5, #e6e3e0);
  border-bottom: 1px solid #cfccc9;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.app-titlebar .tb-icon { width: 14px; height: 14px; }
.app-titlebar .tb-title {
  flex: 1; text-align: center; font-size: 12.5px; color: #3a3a3a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-titlebar .tb-btns { display: flex; gap: 10px; color: #8b8b8b; font-size: 12px; user-select: none; }
.app-titlebar .tb-btns span { cursor: default; }

.app-menubar {
  background: #efefef; border-bottom: 1px solid #d9d9d9;
  padding: 3px 10px; font-size: 12px; color: #333;
  display: flex; gap: 16px; user-select: none;
}
.app-menubar span { cursor: default; padding: 2px 4px; border-radius: 3px; }
.app-menubar span:hover { background: #e3e3e3; }

/* ---------------- toolbar ---------------- */
.app-toolbar {
  display: flex; align-items: stretch;
  background: linear-gradient(#f2f2f2, #e9e9e9);
  border-bottom: 1px solid #d0d0d0;
  overflow-x: auto;
}
.tb-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 13px 7px 10px;
  background: transparent; border: 1px solid transparent; border-right: 1px solid #dcdcdc;
  font-size: 12.5px; color: #222; cursor: pointer; white-space: nowrap;
}
.tb-btn svg { flex: 0 0 auto; }
.tb-btn:hover { background: #f7f7f7; }
.tb-btn.active { background: #fbfbfb; border: 1px solid #c3c3c3; border-radius: 3px; margin: 3px 2px; padding: 4px 11px 4px 8px; }
.tb-btn.dim { opacity: .6; }

/* ---------------- stats row ---------------- */
.app-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 8px; padding: 8px 10px 6px; background: #efefef;
}
.stat-card {
  background: #fdfdfd; border: 1px solid #d7d7d7; border-radius: 3px;
  padding: 6px 10px; display: flex; flex-direction: column; justify-content: center;
  min-width: 0;
}
.stat-label { font-size: 11px; color: #777; margin-bottom: 2px; white-space: nowrap; }
.stat-value { font-size: 13px; color: #1e1e1e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-delta.up { color: #26a269; }
.stat-delta.down { color: #c01c28; }
.stat-card.balance { text-align: right; }
.stat-card.balance .stat-value { font-weight: 600; }

/* ---------------- tabs ---------------- */
.app-tabs { display: flex; gap: 4px; padding: 6px 10px 0; background: #efefef; }
.app-tab {
  border: 1px solid #cfcfcf; border-bottom: none; border-radius: 4px 4px 0 0;
  background: #e6e6e6; color: #333; font-size: 12px; padding: 5px 14px; cursor: pointer;
}
.app-tab.active { background: #ffffff; color: #111; }

/* ---------------- content ---------------- */
.app-content {
  background: #ffffff; margin: 0 10px; border: 1px solid #d5d5d5; border-top: none;
  min-height: 380px; padding: 20px 22px; position: relative;
}
.news-list { margin: 0; padding: 0 0 0 18px; }
.news-list li { margin: 0 0 12px; color: #333; }
.news-list a { color: #175fbc; }

/* ---------------- statusbar ---------------- */
.app-statusbar {
  margin-top: 10px; background: linear-gradient(#f2f2f2, #e9e9e9);
  border: 1px solid #d0d0d0; border-radius: 0 0 6px 6px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 12px; font-size: 12px; color: #333;
}
.app-statusbar .sb-left { display: flex; align-items: center; gap: 7px; }
.app-statusbar .sb-dot { width: 8px; height: 8px; border-radius: 50%; background: #26a269; }
.app-statusbar .sb-dot.syncing { background: #e5a50a; }
.app-statusbar .sb-right { display: flex; align-items: center; gap: 10px; color: #444; }
.app-statusbar .sb-icons { display: flex; gap: 6px; align-items: center; opacity: .75; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12.5px; padding: 7px 16px; border-radius: 3px; cursor: pointer;
  background: linear-gradient(#fdfdfd, #e9edf1);
  border: 1px solid #4a90d2; color: #1e1e1e; /* Qt "default button" look */
}
.btn:hover { background: linear-gradient(#ffffff, #eef3f8); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.plain { border: 1px solid #b9b9b9; background: linear-gradient(#fdfdfd, #ececec); }
.btn.plain:hover { background: linear-gradient(#ffffff, #f2f2f2); }
.btn-primary {
  background: linear-gradient(#3f8ae5, #2f7de1); border: 1px solid #266bc4; color: #fff; font-weight: 600;
}
.btn-primary:hover { background: linear-gradient(#4b95ec, #2f83ea); }
.btn-primary:disabled { opacity: .5; }
.btn-lg { font-size: 13.5px; padding: 10px 22px; }

/* ---------------- entry / forms ---------------- */
.center-col { max-width: 460px; margin: 12px auto 4px; text-align: center; }
.center-col h2 { font-size: 19px; margin: 6px 0 6px; }
.center-col p.sub { color: #6a6a6a; font-size: 12.5px; margin: 0 0 22px; }
.center-col .btn, .center-col .btn-primary { width: 100%; margin-bottom: 10px; }
.footnote { color: #8a8a8a; font-size: 11px; text-align: center; margin-top: 18px; }

.field-label { display: block; text-align: left; font-size: 12px; color: #555; margin: 14px 0 5px; }
.text-input, .seed-area {
  width: 100%; border: 1px solid #bfbfbf; border-radius: 3px; background: #fff;
  padding: 8px 10px; font-size: 13px; color: #1e1e1e; outline: none;
}
.text-input:focus, .seed-area:focus { border-color: #4a90d2; box-shadow: 0 0 0 2px rgba(74,144,210,.18); }
.seed-area { min-height: 96px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; line-height: 1.6; }
.row { display: flex; gap: 10px; align-items: center; }
.row .spread { flex: 1; }
.muted { color: #6a6a6a; }
.small { font-size: 11.5px; }

.msg { border-radius: 3px; padding: 9px 12px; font-size: 12.5px; margin-top: 12px; display: none; }
.msg.show { display: block; }
.msg.err { background: rgba(192,28,40,.08); border: 1px solid rgba(192,28,40,.35); color: #a2171f; }
.msg.ok { background: rgba(38,162,105,.08); border: 1px solid rgba(38,162,105,.35); color: #1b7a4e; }
.msg.info { background: rgba(47,125,225,.07); border: 1px solid rgba(47,125,225,.3); color: #23549b; }

/* seed display */
.seed-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.seed-cell {
  border: 1px solid #d0d0d0; border-radius: 3px; background: #fbfbfb;
  padding: 6px 8px; font-size: 12.5px; color: #222; display: flex; gap: 7px; align-items: baseline;
}
.seed-cell .num { color: #9a9a9a; font-size: 10.5px; min-width: 14px; text-align: right; }
.seed-box {
  border: 1px solid #bfbfbf; border-radius: 3px; background: #fff; padding: 12px 14px;
  font-size: 13.5px; line-height: 1.8; letter-spacing: .2px; margin: 14px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.warn-box { border: 1px solid #e7c7c7; background: #fdf6f6; border-radius: 3px; padding: 10px 14px; margin: 14px 0; }
.warn-box b { color: #a2171f; }
.warn-box ul { margin: 6px 0 2px; padding-left: 20px; color: #444; }
.warn-box li { margin: 3px 0; }
.check-row { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0; text-align: left; font-size: 12.5px; color: #333; }
.check-row input { margin-top: 2px; }
.toggle-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; font-size: 12.5px; color: #333; }

/* ---------------- syncing ---------------- */
.sync-wrap { max-width: 460px; margin: 40px auto 20px; text-align: center; }
.sync-wrap h3 { font-size: 15px; margin: 16px 0 6px; }
.spinner {
  width: 34px; height: 34px; margin: 0 auto; border-radius: 50%;
  border: 3px solid #dcdcdc; border-top-color: #2f7de1; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.progress { height: 8px; border: 1px solid #cfcfcf; border-radius: 4px; background: #f3f3f3; overflow: hidden; margin: 16px 0 8px; }
.progress > div { height: 100%; width: 0%; background: linear-gradient(90deg,#3f8ae5,#2f7de1); transition: width .4s ease; }

/* ---------------- dashboard ---------------- */
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.balance-num { font-size: 26px; font-weight: 600; letter-spacing: .2px; }
.balance-sub { color: #6a6a6a; font-size: 12px; margin-top: 3px; }
.addr-line {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px; color: #444; background: #f8f8f8; border: 1px solid #e0e0e0;
  border-radius: 3px; padding: 6px 9px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 420px; cursor: pointer;
}
.panel { border: 1px solid #d8d8d8; border-radius: 3px; background: #fdfdfd; padding: 13px 15px; margin-top: 16px; }
.panel h4 { margin: 0 0 10px; font-size: 13px; }
.tx-empty { color: #8a8a8a; font-size: 12.5px; padding: 14px 0; text-align: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #cfe0d6; background: #f0f9f4; color: #1b7a4e;
  border-radius: 10px; font-size: 11px; padding: 2px 9px; }
.pill.gray { border-color: #dcdcdc; background: #f5f5f5; color: #666; }

/* ---------------- modal ---------------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20,20,24,.38); display: flex; align-items: center; justify-content: center;
  padding: 18px; z-index: 50;
}
.modal {
  background: #fff; border: 1px solid #b9b9b9; border-radius: 5px; box-shadow: 0 18px 50px rgba(0,0,0,.3);
  width: 100%; max-width: 480px; max-height: 88vh; overflow: auto;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-bottom: 1px solid #e2e2e2; }
.modal-head h3 { margin: 0; font-size: 13.5px; }
.modal-x { border: none; background: none; font-size: 16px; color: #888; cursor: pointer; padding: 0 4px; }
.modal-x:hover { color: #333; }
.modal-body { padding: 16px; }
.qr-box { text-align: center; padding: 8px 0; }
.qr-box svg { width: 210px; height: 210px; }
.addr-full { word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: #333;
  background: #f8f8f8; border: 1px solid #e0e0e0; padding: 9px 11px; border-radius: 3px; }

/* calculator */
.calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.calc-grid button { padding: 10px 0; font-size: 13px; }
.calc-screen { border: 1px solid #cfcfcf; background: #fbfbfb; border-radius: 3px; padding: 8px 10px; text-align: right;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; margin-bottom: 8px; min-height: 36px; }

/* coins table */
.coins-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.coins-table th, .coins-table td { text-align: left; padding: 7px 6px; border-bottom: 1px solid #ececec; }
.coins-table th { color: #777; font-weight: normal; font-size: 11.5px; }

/* wallet list (multi-wallet, max 10) */
.wallet-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 6px; border-bottom: 1px solid #efefef; cursor: pointer; border-radius: 3px;
}
.wallet-row:last-of-type { border-bottom: none; }
.wallet-row:hover { background: #f7f7f7; }
.wallet-row.active { background: #f2f7fd; }
.wallet-dot { width: 8px; height: 8px; border-radius: 50%; background: #c9c9c9; flex: 0 0 auto; }
.wallet-row.active .wallet-dot { background: #2f7de1; }
.wallet-name { font-weight: 600; font-size: 12.5px; }
.wallet-mode { color: #9a9a9a; font-size: 11px; }
.wallet-addr { color: #8a8a8a; font-size: 11px; font-family: ui-monospace, Menlo, Consolas, monospace; margin-left: auto; }

@media (max-width: 760px) {
  .app-stats { grid-template-columns: 1fr 1fr; }
  .seed-grid { grid-template-columns: repeat(2, 1fr); }
  .app-content { padding: 14px 12px; }
  .app-menubar { overflow-x: auto; }
  .addr-line { max-width: 100%; }
  .app-wrap { margin: 8px auto; }
}
