/* =============================================================
   MintFileRecovery — App-specific styles
   Built on top of design-system.css
   ============================================================= */

/* ----- Window shell ----- */
.app-window {
  width: 100vw;
  height: 100vh;
  background: var(--bg-canvas);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.app-window::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--grad-mesh);
  pointer-events: none;
  z-index: 0;
}
.app-window > * { position: relative; z-index: 1; }

.content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  position: relative;
}

/* ----- Page layout ----- */
.page {
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%;
}
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.page-title { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.page-sub { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

.empty { padding: 32px; text-align: center; color: var(--text-muted); font-size: 13px; }
.empty.full { grid-column: 1 / -1; }
.empty:not(:last-child) { border-bottom: 1px solid var(--border-subtle); }

/* ----- Dashboard ----- */
.hero-action {
  position: relative;
  padding: 24px 28px;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, rgba(0,212,160,0.10) 0%, rgba(59,130,246,0.08) 100%);
  border: 1px solid rgba(0,212,160,0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}
.hero-action::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 20%, rgba(0,212,160,0.18), transparent 50%);
  pointer-events: none;
}
.hero-action .left { position: relative; }
.hero-action h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.hero-action p { color: var(--text-secondary); font-size: 13px; max-width: 520px; line-height: 1.5; }
.hero-action .actions { position: relative; display: flex; gap: 10px; }

.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.dash-stats .stat { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); padding: 18px; }
.dash-stats .stat .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.dash-stats .stat .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.dash-stats .stat .icon { width: 30px; height: 30px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; }
.dash-stats .stat .icon svg { width: 16px; height: 16px; }
.dash-stats .stat .icon.mint { background: rgba(0,212,160,0.12); color: var(--mint-400); }
.dash-stats .stat .icon.info { background: var(--info-bg); color: var(--info); }
.dash-stats .stat .icon.warn { background: var(--warning-bg); color: var(--warning); }
.dash-stats .stat .icon.purple { background: var(--purple-bg); color: var(--purple); }
.dash-stats .stat .value { font-size: 26px; font-weight: 700; font-feature-settings: 'tnum'; }
.dash-stats .stat .delta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.activity { display: flex; flex-direction: column; gap: 2px; }
.activity .act-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); }
.activity .act-item:hover { background: var(--bg-hover); }
.activity .act-icon { width: 32px; height: 32px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; }
.activity .act-icon svg { width: 14px; height: 14px; }
.activity .act-icon.recover { background: rgba(0,212,160,0.12); color: var(--mint-400); }
.activity .act-icon.scan { background: var(--info-bg); color: var(--info); }
.activity .act-icon.warn { background: var(--warning-bg); color: var(--warning); }
.activity .act-info { flex: 1; min-width: 0; }
.activity .act-info .title { font-size: 13px; font-weight: 500; }
.activity .act-info .meta { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); margin-top: 2px; }
.activity .act-time { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }

.drv-list { display: flex; flex-direction: column; gap: 8px; }
.drv { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--bg-canvas); border-radius: var(--r-md); border: 1px solid var(--border-subtle); }
.drv .ic { width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--bg-elevated); color: var(--mint-400); display: flex; align-items: center; justify-content: center; }
.drv .ic svg { width: 16px; height: 16px; }
.drv .info { flex: 1; min-width: 0; }
.drv .name { font-size: 12px; font-weight: 600; }
.drv .sub { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); margin-top: 2px; }
.drv .bar { height: 3px; background: var(--bg-elevated); border-radius: var(--r-full); margin-top: 4px; overflow: hidden; }
.drv .bar .fill { height: 100%; background: var(--grad-mint); border-radius: var(--r-full); }

/* ----- Select Drive ----- */
.toolbar {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 14px; background: var(--bg-surface);
  border: 1px solid var(--border-subtle); border-radius: var(--r-lg);
}
.toolbar .filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--r-full); background: var(--bg-elevated); border: 1px solid var(--border-default); font-size: 12px; color: var(--text-secondary); cursor: pointer; }
.toolbar .filter-chip.active { background: rgba(0,212,160,0.12); color: var(--mint-400); border-color: rgba(0,212,160,0.3); }
.toolbar .right { margin-left: auto; }
.toolbar .mono { font-size: 10px; color: var(--text-muted); }

.device-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.device { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); padding: 16px; cursor: pointer; transition: all 0.15s ease; position: relative; }
.device:hover { border-color: var(--border-default); transform: translateY(-1px); }
.device.selected { border-color: var(--mint-500); box-shadow: 0 0 0 1px var(--mint-500), 0 0 24px rgba(0,212,160,0.15); }
.device .check { position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-default); display: flex; align-items: center; justify-content: center; }
.device.selected .check { background: var(--mint-500); border-color: var(--mint-500); }
.device .check::after { content: '✓'; color: #0A0F14; font-size: 12px; font-weight: 700; opacity: 0; }
.device.selected .check::after { opacity: 1; }
.device .head { display: flex; gap: 12px; }
.device .ic { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--bg-canvas); display: flex; align-items: center; justify-content: center; color: var(--mint-400); }
.device.selected .ic { background: var(--grad-mint); color: #0A0F14; }
.device .ic svg { width: 18px; height: 18px; }
.device .info { flex: 1; min-width: 0; }
.device .name { font-size: 14px; font-weight: 600; }
.device .path { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); margin-top: 2px; }
.device .cap { margin-top: 12px; }
.device .cap-bar { height: 6px; background: var(--bg-canvas); border-radius: var(--r-full); overflow: hidden; }
.device .cap-fill { height: 100%; background: var(--grad-mint); }
.device .cap-fill.warn { background: var(--grad-warn); }
.device .cap-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }
.device .meta { display: flex; gap: 14px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-subtle); }
.device .meta-cell { flex: 1; }
.device .meta-cell .lbl { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.device .meta-cell .val { font-size: 12px; color: var(--text-primary); font-family: var(--font-mono); margin-top: 2px; }
.device .continue-bar { position: sticky; bottom: 0; margin: 16px -32px -24px; padding: 14px 32px; background: rgba(15, 22, 32, 0.85); backdrop-filter: blur(20px); border-top: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; }

/* ----- Scan config ----- */
.stepper { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); }
.stepper .step { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.stepper .step .num { width: 22px; height: 22px; border-radius: 50%; background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; font-family: var(--font-mono); }
.stepper .step.done .num { background: var(--mint-500); color: #0A0F14; }
.stepper .step.current .num { background: var(--grad-mint); color: #0A0F14; box-shadow: 0 0 12px rgba(0,212,160,0.4); }
.stepper .step.done, .stepper .step.current { color: var(--text-primary); }
.stepper .step-sep { flex: 1; height: 1px; background: var(--border-subtle); }

.config-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.mode { padding: 14px; background: var(--bg-canvas); border: 1px solid var(--border-subtle); border-radius: var(--r-md); cursor: pointer; position: relative; transition: all 0.15s ease; }
.mode:hover { border-color: var(--border-default); }
.mode.active { border-color: var(--mint-500); background: rgba(0,212,160,0.05); }
.mode .ico { width: 30px; height: 30px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; background: rgba(0,212,160,0.1); color: var(--mint-400); font-size: 16px; margin-bottom: 8px; }
.mode .tag { position: absolute; top: 10px; right: 10px; }
.mode .ti { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.mode .de { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

.ft-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ft { padding: 10px; background: var(--bg-canvas); border: 1px solid var(--border-subtle); border-radius: var(--r-md); cursor: pointer; display: flex; align-items: center; gap: 8px; }
.ft.checked { border-color: var(--mint-500); background: rgba(0,212,160,0.05); }
.ft .ck { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--border-default); display: flex; align-items: center; justify-content: center; }
.ft.checked .ck { background: var(--mint-500); border-color: var(--mint-500); }
.ft .ck::after { content: '✓'; color: #0A0F14; font-size: 10px; font-weight: 700; opacity: 0; }
.ft.checked .ck::after { opacity: 1; }
.ft .lbl { font-size: 12px; font-weight: 500; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.toggle-row + .toggle-row { border-top: 1px solid var(--border-subtle); }
.toggle-row .lbl { font-size: 13px; }
.toggle-row .desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.estimate { padding: 16px 20px; background: linear-gradient(135deg, rgba(0,212,160,0.08) 0%, rgba(59,130,246,0.06) 100%); border: 1px solid rgba(0,212,160,0.2); border-radius: var(--r-lg); }
.est-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 12px; }
.est-row .lbl { color: var(--text-muted); }
.est-row .val { font-family: var(--font-mono); font-weight: 600; }

/* ----- Scanning ----- */
.scanning .big-progress { padding: 28px 32px; background: linear-gradient(135deg, rgba(0,212,160,0.08) 0%, rgba(59,130,246,0.05) 100%); border: 1px solid rgba(0,212,160,0.2); border-radius: var(--r-xl); }
.scanning .bp-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 18px; }
.scanning .lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.scanning .num { font-size: 56px; font-weight: 800; font-family: var(--font-mono); line-height: 1; background: var(--grad-mint); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.scanning .ct { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.scanning .bp-bar { height: 10px; background: var(--bg-canvas); border-radius: var(--r-full); overflow: hidden; }
.scanning .bp-fill { height: 100%; background: var(--grad-mint); border-radius: var(--r-full); box-shadow: 0 0 16px rgba(0,212,160,0.4); transition: width 0.3s ease; position: relative; }
.scanning .bp-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); animation: shimmer 2s infinite; }
.scanning .scan-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; }
.scanning .scan-grid .card { padding: 18px 20px; }
.scanning .radial { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.scanning .st-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: var(--bg-canvas); border-radius: var(--r-sm); font-size: 12px; }
.scanning .st-row .ic { width: 22px; height: 22px; border-radius: var(--r-xs); background: rgba(0,212,160,0.12); color: var(--mint-400); display: flex; align-items: center; justify-content: center; }
.scanning .st-row .lbl { color: var(--text-muted); flex: 1; font-size: 11px; }
.scanning .st-row .val { font-weight: 600; font-family: var(--font-mono); font-size: 12px; }
.scanning .tree { font-family: var(--font-mono); font-size: 12px; max-height: 280px; overflow-y: auto; margin-top: 8px; }
.scanning .tree .row { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: var(--r-xs); }
.scanning .tree .row:hover { background: var(--bg-hover); }
.scanning .tree .row .ind { color: var(--text-muted); }
.scanning .tree .row .nm { color: var(--text-primary); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scanning .tree .row .sz { color: var(--text-muted); font-size: 10px; }
.scanning .tree .row.fresh { animation: highlight 1.5s ease; }
.scanning .log { font-family: var(--font-mono); font-size: 11px; line-height: 1.7; max-height: 220px; overflow-y: auto; margin-top: 8px; }
.scanning .log .line { display: flex; gap: 10px; padding: 1px 4px; }
.scanning .log .line .t { color: var(--text-muted); flex-shrink: 0; }
.scanning .log .line .lvl { font-weight: 600; flex-shrink: 0; width: 56px; }
.scanning .log .line.info .lvl { color: var(--info); }
.scanning .log .line.found .lvl { color: var(--success); }
.scanning .log .line.warn .lvl { color: var(--warning); }
.scanning .log .line.err .lvl { color: var(--danger); }
.scanning .log .line .m { color: var(--text-secondary); }
.scanning .full-row { grid-column: 1 / -1; }

/* ----- Results ----- */
.results .filter-bar { display: flex; gap: 8px; align-items: center; padding: 10px 14px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); flex-wrap: wrap; }
.results .ftab { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--r-md); font-size: 12px; color: var(--text-secondary); cursor: pointer; }
.results .ftab:hover { background: var(--bg-hover); color: var(--text-primary); }
.results .ftab.active { background: rgba(0,212,160,0.12); color: var(--mint-400); }
.results .ftab .ct { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); padding: 1px 6px; background: var(--bg-canvas); border-radius: var(--r-full); }
.results .ftab.active .ct { background: rgba(0,212,160,0.2); color: var(--mint-300); }
.results .filter-sep { width: 1px; height: 20px; background: var(--border-default); }
.results .filter-search { margin-left: auto; display: flex; align-items: center; gap: 6px; background: var(--bg-canvas); border: 1px solid var(--border-default); border-radius: var(--r-md); padding: 5px 10px; }
.results .filter-search input { background: none; border: none; outline: none; flex: 1; font-size: 12px; color: var(--text-primary); min-width: 180px; }
.results .filter-search svg { width: 12px; height: 12px; color: var(--text-muted); }

.results .table-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); overflow: hidden; }
.results .table-head { display: grid; grid-template-columns: 30px 1fr 100px 200px 100px 110px; gap: 12px; padding: 10px 16px; background: var(--bg-canvas); border-bottom: 1px solid var(--border-subtle); font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.results .rows { max-height: 540px; overflow-y: auto; }
.results .row { display: grid; grid-template-columns: 30px 1fr 100px 200px 100px 110px; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border-subtle); align-items: center; font-size: 12px; cursor: pointer; }
.results .row:hover { background: var(--bg-hover); }
.results .row.selected { background: rgba(0,212,160,0.06); }
.results .row .ck { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--border-default); display: flex; align-items: center; justify-content: center; }
.results .row.selected .ck { background: var(--mint-500); border-color: var(--mint-500); }
.results .row .ck::after { content: '✓'; color: #0A0F14; font-size: 10px; font-weight: 700; opacity: 0; }
.results .row.selected .ck::after { opacity: 1; }
.results .row .file { display: flex; align-items: center; gap: 10px; min-width: 0; }
.results .row .file .ic { font-size: 16px; }
.results .row .file .nm { color: var(--text-primary); font-weight: 500; }
.results .row .file .path { color: var(--text-muted); font-size: 10px; font-family: var(--font-mono); }
.results .row .sz { font-family: var(--font-mono); color: var(--text-secondary); }
.results .row .type { font-family: var(--font-mono); color: var(--text-muted); font-size: 11px; }
.results .row .cond { font-size: 10px; }
.results .footer-bar { background: var(--bg-surface); border-top: 1px solid var(--border-subtle); padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; border-radius: 0 0 var(--r-lg) var(--r-lg); margin-top: -1px; }

.condition { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--r-full); font-size: 10px; font-weight: 600; }
.condition.excellent { background: var(--success-bg); color: var(--success); }
.condition.good { background: rgba(0,212,160,0.12); color: var(--mint-400); }
.condition.fair { background: var(--warning-bg); color: var(--warning); }
.condition.damaged { background: var(--danger-bg); color: var(--danger); }
.condition::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ----- Recovery config ----- */
.summary-card { background: linear-gradient(135deg, rgba(0,212,160,0.08) 0%, rgba(59,130,246,0.05) 100%); border: 1px solid rgba(0,212,160,0.2); border-radius: var(--r-lg); padding: 22px; display: flex; align-items: center; gap: 22px; }
.summary-ic { width: 64px; height: 64px; border-radius: var(--r-md); background: var(--grad-mint); display: flex; align-items: center; justify-content: center; color: #0A0F14; flex-shrink: 0; box-shadow: 0 0 24px rgba(0,212,160,0.4); }
.summary-info { flex: 1; }
.summary-info .lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.summary-info .val { font-size: 28px; font-weight: 700; margin-top: 4px; font-family: var(--font-mono); }
.summary-info .sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.summary-stats { display: flex; gap: 22px; }
.summary-stats .ss { text-align: right; }
.summary-stats .ss .lbl { font-size: 10px; color: var(--text-muted); text-transform: uppercase; }
.summary-stats .ss .val { font-size: 16px; font-weight: 600; font-family: var(--font-mono); margin-top: 4px; }

.option-row { display: flex; align-items: flex-start; justify-content: space-between; padding: 12px 0; gap: 16px; border-top: 1px solid var(--border-subtle); }
.option-row:first-of-type { border-top: none; padding-top: 0; }
.option-info { flex: 1; }
.option-info .lbl { font-size: 13px; font-weight: 500; }
.option-info .desc { font-size: 11px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }

.select-group { display: flex; flex-direction: column; gap: 6px; }
.select-group .opt { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg-canvas); border: 1px solid var(--border-default); border-radius: var(--r-sm); cursor: pointer; font-size: 12px; }
.select-group .opt.selected { border-color: var(--mint-500); background: rgba(0,212,160,0.05); }
.select-group .opt .rd { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--border-default); display: flex; align-items: center; justify-content: center; }
.select-group .opt.selected .rd { border-color: var(--mint-500); }
.select-group .opt.selected .rd::after { content: ''; width: 6px; height: 6px; background: var(--mint-500); border-radius: 50%; }
.select-group .opt .de { font-size: 11px; color: var(--text-muted); margin-left: auto; }

.warn-banner { margin-top: 12px; padding: 10px 14px; background: var(--warning-bg); border: 1px solid rgba(245,181,68,0.3); border-radius: var(--r-md); font-size: 12px; color: var(--warning); }

/* ----- Recovery in progress ----- */
.eta-block { padding: 12px 14px; background: var(--bg-canvas); border-radius: var(--r-md); border: 1px solid var(--border-subtle); margin-top: 12px; }
.eta-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 12px; }
.eta-row .lbl { color: var(--text-muted); }
.eta-row .val { font-family: var(--font-mono); font-weight: 600; }

.file-queue { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.file-queue .qrow { display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 12px; border-radius: var(--r-sm); }
.file-queue .qrow.done { color: var(--text-secondary); }
.file-queue .qrow.current { background: rgba(0,212,160,0.08); color: var(--mint-400); }
.file-queue .qrow .ic { width: 14px; }
.file-queue .qrow .nm { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-queue .qrow .sz { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); }
.file-queue .qrow.current .ic::after { content: '●'; color: var(--mint-400); animation: pulse 1.5s infinite; }
.file-queue .qrow.done .ic::after { content: '✓'; color: var(--success); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.speed-chart { height: 110px; margin-top: 8px; }
.speed-chart svg { width: 100%; height: 100%; }

/* ----- Recovery complete ----- */
.hero-success { text-align: center; padding: 40px 32px; background: linear-gradient(135deg, rgba(0,212,160,0.10) 0%, rgba(59,130,246,0.05) 100%); border: 1px solid rgba(0,212,160,0.2); border-radius: var(--r-xl); position: relative; overflow: hidden; }
.hero-success::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, rgba(0,212,160,0.15), transparent 60%); pointer-events: none; }
.check-circle { width: 88px; height: 88px; margin: 0 auto 20px; background: var(--grad-mint); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 40px rgba(0,212,160,0.5); animation: float 3s ease-in-out infinite; }
.check-circle svg { width: 44px; height: 44px; color: #0A0F14; }
.hero-success h1 { font-size: 28px; font-weight: 800; margin-bottom: 6px; position: relative; }
.hero-success p { color: var(--text-secondary); position: relative; }
.mono-path { display: inline-block; margin-top: 12px; padding: 6px 14px; background: var(--bg-canvas); border: 1px solid var(--border-default); border-radius: var(--r-md); font-family: var(--font-mono); font-size: 12px; color: var(--mint-400); position: relative; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 16px; }
.stat-block { padding: 16px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); }
.stat-block .lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.stat-block .val { font-size: 24px; font-weight: 700; font-family: var(--font-mono); margin-top: 6px; }

/* ----- History ----- */
.sum-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.sum-card { display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); }
.sum-card .ic { width: 36px; height: 36px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; background: rgba(0,212,160,0.12); color: var(--mint-400); font-size: 18px; }
.sum-card .info .val { font-size: 20px; font-weight: 700; font-family: var(--font-mono); }
.sum-card .info .lbl { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ----- Settings ----- */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 920px; }
.settings-grid .form-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.settings-grid .form-row + .form-row { border-top: 1px solid var(--border-subtle); }
.settings-grid .form-row .lbl { font-size: 13px; }
.settings-grid .form-row .input { width: 200px; }
.settings-grid .danger-zone { border-color: rgba(244,80,110,0.3); background: linear-gradient(135deg, rgba(244,80,110,0.04) 0%, transparent 100%); }
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme-card { padding: 10px; background: var(--bg-canvas); border: 1.5px solid var(--border-default); border-radius: var(--r-md); cursor: pointer; }
.theme-card.active { border-color: var(--mint-500); background: rgba(0,212,160,0.05); }
.theme-card .preview { height: 60px; border-radius: var(--r-sm); margin-bottom: 8px; display: flex; align-items: center; justify-content: center; }
.theme-card .nm { font-size: 12px; font-weight: 500; }
.theme-card .de { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

/* ----- About ----- */
.about-page .hero { text-align: center; padding: 40px 32px 20px; }
.about-page .logo { width: 80px; height: 80px; margin: 0 auto 16px; background: var(--grad-mint); border-radius: 20px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 40px rgba(0,212,160,0.4); animation: float 4s ease-in-out infinite; }
.about-page h1 { font-size: 32px; font-weight: 800; margin-bottom: 6px; background: var(--grad-aurora); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.about-page .tagline { color: var(--text-secondary); max-width: 580px; margin: 0 auto; }
.about-page .version { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 6px 14px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-full); font-size: 12px; font-family: var(--font-mono); color: var(--text-muted); }
.about-page .version .dot { width: 6px; height: 6px; background: var(--success); border-radius: 50%; }

.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.af { display: flex; gap: 10px; padding: 10px; background: var(--bg-canvas); border-radius: var(--r-md); }
.af .ic { width: 28px; height: 28px; border-radius: var(--r-sm); background: rgba(0,212,160,0.12); color: var(--mint-400); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.af .ti { font-size: 12px; font-weight: 600; }
.af .de { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.steps { display: flex; flex-direction: column; gap: 10px; }
.steps .step { display: flex; gap: 12px; }
.steps .step .num { width: 26px; height: 26px; border-radius: 50%; background: var(--grad-mint); color: #0A0F14; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.steps .step .info .ti { font-size: 13px; font-weight: 600; }
.steps .step .info .de { font-size: 11px; color: var(--text-secondary); margin-top: 2px; line-height: 1.5; }
.steps .step .info code { font-family: var(--font-mono); padding: 1px 5px; background: var(--bg-canvas); border-radius: 3px; font-size: 10px; color: var(--mint-400); }

/* ----- Placeholder ----- */
.placeholder { align-items: center; justify-content: center; text-align: center; padding-top: 80px; }
.placeholder .big-icon { font-size: 64px; margin-bottom: 12px; }
.placeholder h2 { margin-bottom: 6px; }
.placeholder p { color: var(--text-secondary); margin-bottom: 18px; }

/* ----- File preview screen ----- */
.preview .page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 16px; flex-wrap: wrap; }
.preview .page-title { font-size: 18px; font-weight: 700; }
.preview .page-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.preview .head-actions { display: flex; gap: 8px; }
.preview .preview-grid { display: grid; grid-template-columns: 1fr 320px; gap: 16px; }
@media (max-width: 900px) { .preview .preview-grid { grid-template-columns: 1fr; } }
.preview .preview-main { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; min-height: 460px; }
.preview .card-head { padding: 14px 18px; border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; }
.preview .card-title { font-size: 13px; font-weight: 600; word-break: break-all; max-width: 60%; }
.preview .card-tabs { display: flex; gap: 0; }
.preview .tab { padding: 8px 12px; font-size: 12px; color: var(--text-secondary); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.preview .tab:hover { color: var(--text-primary); }
.preview .tab.active { color: var(--mint-400); border-bottom-color: var(--mint-500); }
.preview .preview-body { flex: 1; min-height: 380px; display: flex; }
.preview .img-frame-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; background:
  linear-gradient(45deg, var(--bg-canvas) 25%, transparent 25%),
  linear-gradient(-45deg, var(--bg-canvas) 25%, transparent 25%),
  linear-gradient(45deg, transparent 75%, var(--bg-canvas) 75%),
  linear-gradient(-45deg, transparent 75%, var(--bg-canvas) 75%);
background-size: 20px 20px;
background-position: 0 0, 0 10px, 10px -10px, -10px 0;
background-color: var(--bg-base); }
.preview .img-placeholder { color: var(--text-muted); text-align: center; max-width: 360px; }
.preview .img-placeholder svg { color: var(--mint-400); margin-bottom: 12px; }
.preview .img-placeholder .hint { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.preview .img-preview { max-width: 100%; max-height: 360px; border-radius: var(--r-md); box-shadow: 0 8px 32px rgba(0,0,0,0.6); }
.preview .hex-view, .preview .text-view {
  flex: 1;
  margin: 0;
  padding: 18px;
  background: var(--bg-canvas);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  color: var(--text-primary);
  overflow: auto;
  white-space: pre;
}
.preview .preview-side { display: flex; flex-direction: column; gap: 12px; }
.preview .meta-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); padding: 18px; }
.preview .meta-icon { width: 56px; height: 56px; background: var(--bg-canvas); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; color: var(--mint-400); margin-bottom: 12px; }
.preview .meta-name { font-size: 14px; font-weight: 600; word-break: break-all; }
.preview .meta-path { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); margin-top: 4px; word-break: break-all; }
.preview .meta-list { margin-top: 16px; }
.preview .meta-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border-subtle); font-size: 12px; gap: 12px; }
.preview .meta-item:last-child { border-bottom: none; }
.preview .meta-item dt { color: var(--text-muted); }
.preview .meta-item dd { color: var(--text-primary); font-family: var(--font-mono); font-weight: 500; text-align: right; }
.preview .meta-item .hash { word-break: break-all; max-width: 200px; font-size: 10px; }
.preview .mono { font-family: var(--font-mono); }

/* ----- License page + banner ----- */
.license-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  margin: 0 24px 8px;
  background: rgba(245, 181, 68, 0.08);
  border: 1px solid rgba(245, 181, 68, 0.3);
  border-radius: var(--r-md);
  font-size: 12px;
  color: #FBBF24;
  gap: 12px;
  flex-wrap: wrap;
}
.license-banner.tier-personal,
.license-banner.tier-pro,
.license-banner.tier-enterprise {
  background: rgba(16, 216, 126, 0.08);
  border-color: rgba(16, 216, 126, 0.3);
  color: #6EE7B7;
}
.license-banner.tier-trial {
  background: rgba(0, 212, 160, 0.08);
  border-color: var(--border-mint);
  color: var(--mint-300);
}
.license-banner .lb-text { flex: 1; min-width: 0; }
.license-banner .lb-text strong { color: inherit; }
.license-banner .lb-action {
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid currentColor;
  border-radius: var(--r-full);
  color: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.license-banner .lb-action:hover { background: rgba(0, 0, 0, 0.4); }
.license-banner button.lb-action { font-family: inherit; }

.license-page {
  padding: 32px 24px;
  overflow-y: auto;
}
.license-hero {
  text-align: center;
  margin-bottom: 24px;
}
.license-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: rgba(0, 212, 160, 0.08);
  border: 1px solid var(--border-mint);
  border-radius: var(--r-xl);
  color: var(--mint-400);
  margin-bottom: 12px;
}
.license-title { font-size: 24px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.02em; }
.license-sub { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }

.license-card {
  max-width: 560px;
  margin: 0 auto 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.license-card-head { padding: 16px 20px; border-bottom: 1px solid var(--border-subtle); }
.lc-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.lc-tier { font-size: 12px; color: var(--mint-400); margin-top: 2px; }
.license-card-body { padding: 20px; }
.field { display: block; margin-bottom: 14px; }
.field .lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; font-weight: 600; }
.license-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.license-input:focus { border-color: var(--mint-500); box-shadow: 0 0 0 3px rgba(0,212,160,0.15); }
.license-input.error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(244,80,110,0.15); }
.license-input.success { border-color: var(--success); box-shadow: 0 0 0 3px rgba(16,216,126,0.15); }
.field .hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; font-family: var(--font-mono); }
.license-card .error {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(244, 80, 110, 0.08);
  border: 1px solid rgba(244, 80, 110, 0.3);
  border-radius: var(--r-sm);
  color: #FCA5B5;
  font-size: 12px;
  font-family: var(--font-mono);
}
.license-card .error[hidden] { display: none; }
.license-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.license-actions .btn-ghost.danger { color: var(--danger); }
.license-actions .btn-ghost.danger:hover { background: rgba(244,80,110,0.1); }
.license-status {
  padding: 14px 20px;
  background: var(--bg-canvas);
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
}
.license-status[hidden] { display: none; }
.ls-row { display: flex; justify-content: space-between; padding: 4px 0; }
.ls-row .lbl { color: var(--text-muted); }
.ls-row .val { color: var(--text-primary); font-family: var(--font-mono); }
.license-status .mono { word-break: break-all; text-align: right; max-width: 60%; }

.license-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
}
.license-plans .plan {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  padding: 18px;
  text-align: center;
}
.license-plans .plan.highlight {
  background: linear-gradient(180deg, rgba(0,212,160,0.06), var(--bg-surface));
  border-color: var(--mint-500);
  box-shadow: var(--shadow-mint);
}
.license-plans .plan-name { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); font-weight: 700; }
.license-plans .plan-tier { font-size: 24px; font-weight: 800; color: var(--text-primary); margin: 4px 0 12px; }
.license-plans .plan.highlight .plan-tier { color: var(--mint-400); }
.license-plans .plan-features { list-style: none; padding: 0; margin: 0; text-align: left; font-size: 12px; color: var(--text-secondary); }
.license-plans .plan-features li { padding: 4px 0; }

/* Disabled Recovery CTA when no license */
.btn-primary[disabled],
.btn-recover[disabled] {
  background: var(--bg-elevated) !important;
  color: var(--text-muted) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  pointer-events: none;
}
.btn-recover-disabled-info {
  font-size: 12px;
  color: var(--warning);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ----- Toasts ----- */
.toast-container { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { padding: 12px 16px; background: var(--bg-elevated); border: 1px solid var(--border-default); border-radius: var(--r-md); box-shadow: var(--shadow-md); font-size: 12px; min-width: 280px; max-width: 360px; animation: slideIn 0.2s ease; }
.toast.success { border-color: rgba(16,216,126,0.4); }
.toast.success::before { content: '✓ '; color: var(--success); font-weight: 700; }
.toast.error { border-color: rgba(244,80,110,0.4); }
.toast.error::before { content: '✕ '; color: var(--danger); font-weight: 700; }
.toast.warn { border-color: rgba(245,181,68,0.4); }
.toast.warn::before { content: '⚠ '; color: var(--warning); font-weight: 700; }
.toast.info::before { content: 'ⓘ '; color: var(--info); font-weight: 700; }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ----- Modal ----- */
.modal-overlay { position: fixed; inset: 0; background: rgba(5,8,16,0.6); backdrop-filter: blur(8px); z-index: 50; display: flex; align-items: center; justify-content: center; }
.modal { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--r-lg); padding: 24px; max-width: 480px; width: 90%; box-shadow: var(--shadow-lg); }

/* ----- Loading ----- */
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 60px; color: var(--text-muted); }
.spinner { width: 16px; height: 16px; border: 2px solid var(--bg-elevated); border-top-color: var(--mint-500); border-radius: 50%; animation: spin 0.8s linear infinite; }

/* Pulse dot for active operations */
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint-500); box-shadow: 0 0 0 0 rgba(0,212,160,0.4); animation: ping 1.5s infinite; position: relative; display: inline-block; }
.pulse-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--mint-500); }
@keyframes ping { 75%, 100% { box-shadow: 0 0 0 12px rgba(0,212,160,0); } }

/* Notification dot */
.titlebar-action { position: relative; }
.titlebar-action .dot { position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; background: var(--danger); border-radius: 50%; box-shadow: 0 0 6px var(--danger); }

/* User chip */
.user-chip { width: 30px; height: 30px; border-radius: 50%; background: var(--grad-aurora); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: #0A0F14; margin-left: 4px; }

.titlebar-sub { color: var(--text-muted); font-size: 11px; padding-left: 8px; border-left: 1px solid var(--border-subtle); margin-left: 4px; }
