/*
Theme Name: Invest Lite
Author: WPIU
Description: Business UI for WP Invest Unified. Left sidebar tabs; plugin logic остаётся в плагине.
Version: 1.0.4
Text Domain: invest-lite
*/
:root{--ink:#0f172a;--muted:#5b6472;--primary:#1f4d8f;--primary-2:#153a6b;--bg-ivory:#f3f2ee;--line:rgba(15,23,42,.22);--card:rgba(255,255,255,.96);--shadow:0 10px 36px rgba(15,23,42,.14);--radius:16px}
*{box-sizing:border-box} html,body{min-height:100%}
body{margin:0;font:15px/1.6 Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,system-ui,sans-serif;color:var(--ink);background:var(--bg-ivory) url('assets/background-light.png') center/cover fixed no-repeat}
.container{max-width:1180px;margin:0 auto;padding:28px}
.site-header,.site-footer{background:transparent;border:0;box-shadow:none}
.brand{font-weight:800;font-size:18px;letter-spacing:.2px}
h1,h2,h3{color:var(--ink);margin:0 0 12px;line-height:1.25} h1{font-size:34px;font-weight:800} h2{font-size:20px;font-weight:700} h3{font-size:16px;font-weight:700}
p,small{color:var(--muted)} a{color:var(--primary);text-decoration:none} a:hover{text-decoration:underline}
.wpiu-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:18px;box-shadow:var(--shadow)}
.wpiu-card+.wpiu-card{margin-top:16px}
input[type=text],input[type=number],textarea,select{width:100%;padding:10px 12px;border-radius:10px;border:1px solid var(--line);background:#fff;color:var(--ink)}
input:focus,textarea:focus,select:focus{outline:0;border-color:var(--primary);box-shadow:0 0 0 2px rgba(31,77,143,.22)}
.button{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border-radius:12px;border:1px solid var(--line);background:#fff;color:var(--ink);transition:.15s ease}
.button:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(15,23,42,.18)}
/* Tabs with left sidebar */
.wpiu-tabs{display:grid;grid-template-columns:240px 1fr;gap:18px;align-items:start;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px}
.wpiu-tabs input[type=radio]{position:absolute;left:-9999px}
.wpiu-sidebar{position:sticky;top:18px;display:flex;flex-direction:column;gap:10px}
.wpiu-sidebar .group{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:12px;box-shadow:var(--shadow)}
.wpiu-sidebar .group h3{margin:0 0 8px;font-size:12px;font-weight:800;color:var(--muted);text-transform:uppercase}
.wpiu-sidebar label{display:block;padding:10px 12px;border-radius:10px;cursor:pointer}
.wpiu-sidebar label:hover{background:rgba(15,23,42,.08)}
#wpiu-tab-balance:checked~.wpiu-sidebar label[for=wpiu-tab-balance],
#wpiu-tab-withdraw:checked~.wpiu-sidebar label[for=wpiu-tab-withdraw],
#wpiu-tab-plans:checked~.wpiu-sidebar label[for=wpiu-tab-plans],
#wpiu-tab-history:checked~.wpiu-sidebar label[for=wpiu-tab-history],
#wpiu-tab-referrals:checked~.wpiu-sidebar label[for=wpiu-tab-referrals]{background:rgba(31,77,143,.12);color:#0d2547}
.wpiu-main{min-width:0}
.wpiu-panel{display:none}
#wpiu-tab-balance:checked~.wpiu-main .wpiu-panel[data-key=balance],
#wpiu-tab-withdraw:checked~.wpiu-main .wpiu-panel[data-key=withdraw],
#wpiu-tab-plans:checked~.wpiu-main .wpiu-panel[data-key=plans],
#wpiu-tab-referrals:checked~.wpiu-main .wpiu-panel[data-key=referrals],
#wpiu-tab-history:checked~.wpiu-main .wpiu-panel[data-key=history]{display:block}
/* Stats */
.wpiu-stats{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.wpiu-stat{flex:1 1 220px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px}
.wpiu-stat .k{color:var(--muted);font-size:12px}.wpiu-stat .v{font-weight:800;font-size:18px}
@media (max-width:960px){.wpiu-tabs{grid-template-columns:1fr}.wpiu-sidebar{position:static}}


/* --- Micro-interactions --- */
.wpiu-anim{transition:transform .12s ease, box-shadow .12s ease, background-color .12s ease, color .12s ease}
.wpiu-anim:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(15,23,42,.15)}
.wpiu-anim:active{transform:translateY(0);box-shadow:none;opacity:.9}


/* Micro-interactions on key controls */
#wpiu-copy,#wpiu-show-qr,#wpiu-i-sent,#wpiu-check-tx{transition:transform .12s ease, box-shadow .12s ease, background-color .12s ease, color .12s ease; cursor:pointer}
#wpiu-copy:hover,#wpiu-show-qr:hover,#wpiu-i-sent:hover,#wpiu-check-tx:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(15,23,42,.15)}
#wpiu-copy:active,#wpiu-show-qr:active,#wpiu-i-sent:active,#wpiu-check-tx:active{transform:translateY(0);box-shadow:none;opacity:.9}


/* === WPIU Frontend (moved from inline) === */
#wpiu-deposit-box .wpiu-form{display:flex;flex-direction:column;align-items:stretch;gap:14px;max-width:1120px;margin:0 auto;padding-inline:8px}
.wpiu-field{margin-bottom:12px}
.wpiu-label{display:block;margin:0 0 6px 2px}
.wpiu-form select,.wpiu-form input[type="text"]{width:100%;min-width:0}
.wpiu-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.wpiu-row.wpiu-row--addr{display:block}
.wpiu-row.wpiu-row--addr .addr{display:block;width:100%}
.wpiu-row.wpiu-row--actions{display:flex;gap:10px;justify-content:flex-start}
code.addr{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#fff;border:1px solid var(--line);border-radius:10px;padding:10px 12px;display:block}
#wpiu-stage-addr,#wpiu-stage-tx{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:12px}
.wpiu-btn{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border-radius:12px;border:1px solid var(--line);background:#fff;color:var(--ink);cursor:pointer}
.wpiu-btn.primary{background:var(--primary);border-color:var(--primary-2);color:#fff}
.wpiu-status{margin-top:12px;min-height:20px;color:var(--muted)}
.wpiu-success{color:#0a7f2e}
.wpiu-error{color:#b42318}
.wpiu-stage[hidden]{display:none!important}

/* Modal */
.wpiu-modal{position:fixed;inset:0;display:block}
.wpiu-modal[hidden]{display:none}
.wpiu-modal__backdrop{position:absolute;inset:0;background:rgba(15,23,42,.55)}
.wpiu-modal__dialog{position:relative;z-index:1;margin:10vh auto 0 auto;max-width:420px;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:16px;text-align:center;box-shadow:var(--shadow)}
.wpiu-modal__close{position:absolute;top:6px;right:8px;background:transparent;border:0;color:var(--ink);font-size:22px;line-height:1;cursor:pointer}
#wpiu-qr-canvas{width:256px;height:256px;margin:10px auto;background:#fff;border:1px solid var(--line);border-radius:8px;display:flex;align-items:center;justify-content:center}

/* Generic cards/tables moved from plugin inline */
.wpiu-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:18px;box-shadow:var(--shadow)}
.wpiu-modern{width:100%;border-collapse:separate;border-spacing:0;margin-top:8px}
.wpiu-modern thead th{position:sticky;top:0;background:#f7f8f9;border-bottom:1px solid #e2e4e7;padding:10px 12px;font-weight:600;text-align:left}
.wpiu-modern td{border-bottom:1px solid #eef0f2;padding:10px 12px}
.wpiu-modern tr:hover{background:rgba(15,23,42,.03)}


/* Micro-interactions (IDs) */
#wpiu-copy-addr,#wpiu-did-send,#wpiu-check-tx{transition:transform .12s ease, box-shadow .12s ease, background-color .12s ease, color .12s ease; cursor:pointer}
#wpiu-copy-addr:hover,#wpiu-did-send:hover,#wpiu-check-tx:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(15,23,42,.15)}
#wpiu-copy-addr:active,#wpiu-did-send:active,#wpiu-check-tx:active{transform:translateY(0);box-shadow:none;opacity:.9}


/* WPIU: button micro-interactions (IDs fallback) */
#wpiu-copy-addr,#wpiu-copy,#wpiu-did-send,#wpiu-i-sent,#wpiu-check-tx,#wpiu-check{
  transition:transform .12s ease, box-shadow .12s ease, background-color .12s ease, color .12s ease; cursor:pointer;
}
#wpiu-copy-addr:hover,#wpiu-copy:hover,#wpiu-did-send:hover,#wpiu-i-sent:hover,#wpiu-check-tx:hover,#wpiu-check:hover{
  transform:translateY(-1px); box-shadow:0 6px 16px rgba(15,23,42,.15);
}
#wpiu-copy-addr:active,#wpiu-copy:active,#wpiu-did-send:active,#wpiu-i-sent:active,#wpiu-check-tx:active,#wpiu-check:active{
  transform:translateY(0); box-shadow:none; opacity:.9;
}


/* WPIU: unified hover/click for bound buttons */
.wpiu-ctl{transition:transform .12s ease, box-shadow .12s ease, background-color .12s ease, color .12s ease; cursor:pointer}
.wpiu-ctl:hover{transform:translateY(-1px); box-shadow:0 6px 16px rgba(15,23,42,.15)}
.wpiu-ctl:active{transform:translateY(0); box-shadow:none; opacity:.9}
