/*
 * Doc Lunas Yui-inspired visual system
 * Version 0.6.0-dev
 * Design-only layer: no business logic, database, permission or financial behavior.
 */
:root{
  --yui-primary:#4f6ef7;
  --yui-primary-strong:#3958e6;
  --yui-primary-soft:#eef1ff;
  --yui-secondary:#8b5cf6;
  --yui-success:#22a06b;
  --yui-warning:#d7911e;
  --yui-danger:#d14343;
  --yui-info:#3388e8;
  --yui-bg:#f4f6fb;
  --yui-surface:#ffffff;
  --yui-surface-2:#f8f9fd;
  --yui-surface-3:#eef2f8;
  --yui-text:#20263a;
  --yui-text-soft:#69738b;
  --yui-border:rgba(30,43,74,.10);
  --yui-shadow:0 10px 30px rgba(35,48,85,.08);
  --yui-shadow-lg:0 24px 70px rgba(35,48,85,.14);
  --yui-radius-sm:12px;
  --yui-radius:18px;
  --yui-radius-lg:26px;
  --yui-font:"Rubik","Avenir Next","Segoe UI",ui-sans-serif,system-ui,-apple-system,sans-serif;
  --yui-sidebar-width:286px;
  --yui-topbar-height:78px;
  color-scheme:light;
}

html{scroll-behavior:smooth;background:var(--yui-bg)}
body{
  font-family:var(--yui-font);
  color:var(--yui-text);
  background:
    radial-gradient(circle at 85% 0,rgba(79,110,247,.08),transparent 25rem),
    var(--yui-bg);
  letter-spacing:-.008em;
  min-height:100vh;
}
body::selection{background:rgba(79,110,247,.22)}
body,button,input,select,textarea{font-family:var(--yui-font)}
button,a,input,select,textarea{transition:border-color .18s ease,background-color .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease,opacity .18s ease}
button:active,.button:active,.icon-action:active{transform:scale(.98)}

/* Shared shell */
.app-shell{grid-template-columns:var(--yui-sidebar-width) minmax(0,1fr);background:transparent}
.main{background:transparent;min-height:100vh;padding-bottom:0}
.content{max-width:1480px;padding:26px 30px 48px}
.sidebar{
  width:var(--yui-sidebar-width);
  padding:18px 14px 26px;
  background:var(--yui-surface);
  color:var(--yui-text);
  border-right:1px solid var(--yui-border);
  box-shadow:8px 0 28px rgba(38,48,79,.035);
  scrollbar-width:thin;
}
.sidebar::-webkit-scrollbar{width:5px}.sidebar::-webkit-scrollbar-thumb{background:#dce2ef;border-radius:99px}
.sidebar-profile{
  position:relative;
  overflow:hidden;
  padding:18px;
  margin:0 2px 14px;
  border-radius:22px;
  background:linear-gradient(145deg,#253765 0%,#4f6ef7 65%,#8b5cf6 130%);
  color:#fff;
  box-shadow:0 16px 30px rgba(65,88,196,.22);
}
.sidebar-profile::after{
  content:"";position:absolute;width:130px;height:130px;border-radius:50%;right:-52px;top:-62px;
  background:rgba(255,255,255,.13);box-shadow:-36px 98px 0 rgba(255,255,255,.06)
}
.sidebar-profile-top{display:flex;align-items:center;gap:12px;position:relative;z-index:1}
.sidebar-profile .avatar{width:52px;height:52px;border:3px solid rgba(255,255,255,.45);background:#fff;color:var(--yui-primary);box-shadow:0 8px 22px rgba(21,29,59,.18)}
.sidebar-profile-copy{display:grid;min-width:0;line-height:1.25}
.sidebar-profile-copy strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar-profile-copy small{color:rgba(255,255,255,.78);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar-profile-links{display:flex;gap:8px;margin-top:14px;position:relative;z-index:1}
.sidebar-profile-links a{display:inline-flex!important;align-items:center!important;gap:6px!important;padding:7px 10px!important;border-radius:999px!important;background:rgba(255,255,255,.14)!important;color:#fff!important;font-size:.76rem!important;font-weight:700!important}
.sidebar-profile-links a:hover{background:rgba(255,255,255,.24)!important}
.sidebar .brand{margin:2px 8px 16px;padding:2px 0;gap:10px}
.sidebar .brand-mark,.brand-mark{border-radius:14px;background:linear-gradient(145deg,var(--yui-primary),var(--yui-secondary));box-shadow:0 10px 24px rgba(79,110,247,.27)}
.sidebar .brand small{color:var(--yui-text-soft)}
.sidebar nav{gap:3px}
.sidebar nav a{
  min-height:44px;padding:10px 12px;border-radius:13px;color:#566079;font-size:.9rem;font-weight:600;
}
.sidebar nav a .icon{color:#7b86a1}
.sidebar nav a:hover{background:#f1f4fb;color:var(--yui-text)}
.sidebar nav a:hover .icon{color:var(--yui-primary)}
.sidebar nav a.active{
  background:linear-gradient(100deg,var(--yui-primary-soft),#f6f2ff);
  color:var(--yui-primary-strong);
  box-shadow:none;
}
.sidebar nav a.active::before{content:"";width:4px;height:22px;margin-left:-12px;margin-right:8px;border-radius:0 8px 8px 0;background:var(--yui-primary)}
.sidebar nav a.active .icon{color:var(--yui-primary)}
.sidebar nav a.active small{color:var(--yui-primary)}
.nav-label{padding:17px 12px 7px;color:#9aa3b7;font-size:.66rem;letter-spacing:.11em;font-weight:800}
.nav-count{background:var(--yui-primary);color:#fff;box-shadow:0 5px 13px rgba(79,110,247,.24)}
.disabled-link{background:#fafbfe;color:#a1a8b9!important}

.topbar{
  height:var(--yui-topbar-height);
  padding:12px 30px;
  background:rgba(255,255,255,.90);
  border-bottom:1px solid var(--yui-border);
  backdrop-filter:blur(18px) saturate(1.3);
  -webkit-backdrop-filter:blur(18px) saturate(1.3);
  z-index:35;
}
.topbar h1{font-size:1.34rem;font-weight:750;letter-spacing:-.025em}
.topbar p{font-size:.82rem;color:var(--yui-text-soft);max-width:780px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar-actions{margin-left:auto;display:flex;align-items:center;gap:8px}
.topbar-icon{
  position:relative;width:42px;height:42px;border:1px solid var(--yui-border);border-radius:50%;background:var(--yui-surface);
  color:#59647b;display:inline-grid;place-items:center;cursor:pointer;box-shadow:0 5px 14px rgba(34,46,78,.045)
}
.topbar-icon:hover{background:var(--yui-primary-soft);color:var(--yui-primary);border-color:rgba(79,110,247,.2)}
.topbar-icon .nav-count{position:absolute;top:-3px;right:-3px;min-width:18px;height:18px;font-size:.62rem;padding:0 4px;border:2px solid #fff}
.topbar-profile{display:flex;align-items:center;gap:10px;margin-left:4px;padding:4px 8px 4px 4px;border-radius:999px}
.topbar-profile:hover{background:var(--yui-primary-soft)}
.topbar-profile .avatar{width:40px;height:40px;background:linear-gradient(145deg,#e9edff,#f4edff);color:var(--yui-primary);border:2px solid #fff;box-shadow:0 4px 12px rgba(44,59,98,.10)}
.user-identity strong{font-size:.84rem}.user-identity small{color:var(--yui-text-soft);font-size:.7rem}
.icon-button{width:42px;height:42px;border:1px solid var(--yui-border);border-radius:50%;background:var(--yui-surface);color:var(--yui-text);place-items:center;cursor:pointer}
.system-banner{margin:12px 30px 0;border:1px solid rgba(215,145,30,.22);border-radius:16px;background:#fff9e9;padding:12px 16px;color:#6f4b00;box-shadow:0 8px 24px rgba(102,73,12,.05)}

/* Mobile tab bar inspired by Yui */
.mobile-tabbar{display:none}
.mobile-tabbar button,.mobile-tabbar a{font-family:inherit}

/* Typography */
h1,h2,h3,h4{color:var(--yui-text);font-weight:750;letter-spacing:-.025em}
h1{line-height:1.1}h2,h3{line-height:1.24}
.eyebrow{color:var(--yui-primary);font-size:.68rem;letter-spacing:.12em;font-weight:800}
.page-heading{margin-bottom:20px;align-items:center}
.page-heading h2{font-size:clamp(1.55rem,2vw,2rem);margin:.32rem 0 .38rem}
.page-heading p{color:var(--yui-text-soft);font-size:.92rem}
.section-title{font-size:1.18rem;font-weight:750;margin:30px 0 14px;color:var(--yui-text)}
.section-heading h2{font-size:1.6rem}.section-heading p{color:var(--yui-text-soft)}
small,.muted,.field-help{color:var(--yui-text-soft)}

/* Surfaces, cards and lists */
.card{
  background:var(--yui-surface);border:1px solid var(--yui-border);border-radius:var(--yui-radius);
  box-shadow:var(--yui-shadow);overflow:visible
}
.card:hover{border-color:rgba(79,110,247,.14)}
.welcome{
  position:relative;overflow:hidden;padding:28px 30px;
  background:linear-gradient(120deg,#ffffff 0%,#f2f4ff 58%,#f6efff 100%);
  border:0;box-shadow:0 16px 42px rgba(58,75,130,.10)
}
.welcome::after{content:"";position:absolute;width:240px;height:240px;right:-85px;top:-110px;border-radius:50%;background:linear-gradient(145deg,rgba(79,110,247,.16),rgba(139,92,246,.09));box-shadow:-100px 180px 0 rgba(79,110,247,.04)}
.welcome>*,.storefront-hero>*{position:relative;z-index:1}
.welcome p{color:var(--yui-text-soft);max-width:880px}
.welcome .button{position:relative;z-index:2;white-space:nowrap}
.stats{gap:14px;margin:18px 0}
.stat{position:relative;overflow:hidden;padding:18px 19px;min-height:132px}
.stat::after{content:"";position:absolute;width:80px;height:80px;border-radius:50%;right:-30px;bottom:-36px;background:rgba(79,110,247,.07)}
.stat span{font-size:.78rem;font-weight:650;color:var(--yui-text-soft)}
.stat strong{font-size:1.78rem;margin:7px 0 2px;letter-spacing:-.035em}
.stat small{font-size:.72rem}
.stat:nth-child(4n+2)::after{background:rgba(34,160,107,.08)}
.stat:nth-child(4n+3)::after{background:rgba(215,145,30,.10)}
.stat:nth-child(4n+4)::after{background:rgba(139,92,246,.09)}
.module-grid{gap:14px}
.module{padding:20px;display:flex;flex-direction:column;min-height:245px}
.module-icon{width:48px;height:48px;border-radius:15px;background:var(--yui-primary-soft);color:var(--yui-primary);box-shadow:inset 0 0 0 1px rgba(79,110,247,.08)}
.module:nth-child(4n+2) .module-icon{background:#eaf8f2;color:var(--yui-success)}
.module:nth-child(4n+3) .module-icon{background:#fff5e5;color:var(--yui-warning)}
.module:nth-child(4n+4) .module-icon{background:#f3edff;color:var(--yui-secondary)}
.module h3{font-size:1rem;margin:14px 0 5px}
.module p{font-size:.86rem;line-height:1.55;color:var(--yui-text-soft);min-height:0;flex:1}
.module .button{align-self:flex-start;margin-top:9px}
.guide,.page-guide{padding:22px 24px;border-left:4px solid var(--yui-primary);background:linear-gradient(110deg,#fff,#f8f9ff)}
.inline-guide{align-items:center}.guide-icon{background:var(--yui-primary-soft);color:var(--yui-primary)}
.attention-card{padding:20px 22px;border:1px solid rgba(215,145,30,.20);background:linear-gradient(110deg,#fff,#fffaf0)}
.attention-head{display:flex;gap:12px;align-items:center}.attention-head>span{width:42px;height:42px;border-radius:14px;background:#fff1cf;color:#a66d00;display:grid;place-items:center}
.attention-head h2{margin:0;font-size:1rem}.attention-head p{margin:2px 0 0;color:var(--yui-text-soft);font-size:.82rem}
.attention-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.attention-list a{display:inline-flex;align-items:center;gap:7px;padding:9px 12px;border-radius:12px;background:#fff;border:1px solid rgba(215,145,30,.18);font-size:.82rem;font-weight:700;color:#785200}.attention-list a:hover{background:#fff4d9}
.table-card{border-radius:var(--yui-radius);overflow:hidden}
.table-header{padding:17px 19px;background:linear-gradient(180deg,#fff,#fbfcff);border-bottom:1px solid var(--yui-border)}
.table-header h2,.table-header h3{font-size:1rem;margin:0}.table-header p{color:var(--yui-text-soft)}
.table-wrap{scrollbar-width:thin}.table-wrap::-webkit-scrollbar{height:7px}.table-wrap::-webkit-scrollbar-thumb{background:#dce2ef;border-radius:99px}
table{background:var(--yui-surface)}
th{background:#f7f8fc;color:#7a8499;font-size:.69rem;letter-spacing:.065em;border-bottom:1px solid var(--yui-border)}
th,td{padding:13px 15px}
tbody tr{transition:background-color .16s ease}tbody tr:hover{background:#fafbff}
.record-avatar,.record-icon,.notification-symbol{border-radius:14px;background:var(--yui-primary-soft);color:var(--yui-primary)}
.type-badge,.code-pill{background:#f6f7fb;border-color:var(--yui-border);color:#667087}
.empty-table,.empty-state{padding:48px 24px}.empty-state.card{overflow:hidden}.empty-table span,.empty-icon,.empty-state>.icon{background:var(--yui-primary-soft);color:var(--yui-primary)}

/* Forms */
label{font-size:.78rem;font-weight:700;color:#4b556c;gap:7px}
input,select,textarea{
  width:100%;min-height:46px;border:1px solid #dce1ec;border-radius:13px;padding:11px 13px;
  color:var(--yui-text);background:var(--yui-surface);outline:0;font-size:.9rem
}
textarea{min-height:92px;resize:vertical}
select{appearance:none;background-image:linear-gradient(45deg,transparent 50%,#8b94a8 50%),linear-gradient(135deg,#8b94a8 50%,transparent 50%);background-position:calc(100% - 17px) 20px,calc(100% - 12px) 20px;background-size:5px 5px,5px 5px;background-repeat:no-repeat;padding-right:36px}
input::placeholder,textarea::placeholder{color:#a3aaba}
input:hover,select:hover,textarea:hover{border-color:#c8cfdd}
input:focus,select:focus,textarea:focus{border-color:var(--yui-primary);box-shadow:0 0 0 4px rgba(79,110,247,.11)}
input:disabled,select:disabled,textarea:disabled{background:#f1f3f7;color:#929bad}
input[type="checkbox"],input[type="radio"]{width:20px;height:20px;min-height:0;accent-color:var(--yui-primary)}
.form-section{padding:20px;border:1px solid var(--yui-border);border-radius:17px;background:#fbfcff}
.form-section-title{align-items:center}.form-section-title>span{background:var(--yui-primary-soft);color:var(--yui-primary);border-radius:13px}
.selection-card{border-radius:14px;background:#fff;border-color:var(--yui-border)}.selection-card:has(input:checked){background:var(--yui-primary-soft);border-color:rgba(79,110,247,.35);box-shadow:0 6px 16px rgba(79,110,247,.09)}
.filter-bar{border-radius:16px;background:var(--yui-surface);box-shadow:var(--yui-shadow)}
.search-field input{background:#f8f9fc}
.setting{border-radius:17px}.settings-list{gap:12px}
.setting-action{align-items:flex-end}

/* Buttons */
.button{min-height:42px;border-radius:12px;padding:9px 14px;font-size:.82rem;font-weight:750;letter-spacing:-.005em}
.button-primary{background:linear-gradient(135deg,var(--yui-primary),#607ffb);color:#fff;box-shadow:0 8px 18px rgba(79,110,247,.22)}
.button-primary:hover{background:linear-gradient(135deg,var(--yui-primary-strong),#4f6ef7);box-shadow:0 10px 22px rgba(79,110,247,.28);transform:translateY(-1px)}
.button-secondary{background:var(--yui-primary-soft);color:var(--yui-primary-strong)}
.button-secondary:hover{background:#e3e8ff;color:#304fda}
.button-ghost{background:var(--yui-surface);border:1px solid var(--yui-border);color:#586279}
.button-ghost:hover{background:#f6f7fb;color:var(--yui-text);border-color:#ccd3df}
.button-danger{background:linear-gradient(135deg,#d74d4d,#bd3434);box-shadow:0 8px 18px rgba(209,67,67,.18)}
.icon-action{border-radius:12px;border-color:var(--yui-border);color:#647087}.icon-action:hover{background:var(--yui-primary-soft);color:var(--yui-primary);border-color:rgba(79,110,247,.25)}
.heading-actions{gap:8px}

/* Status and alerts */
.status{border-radius:999px;padding:5px 9px;font-size:.69rem;text-transform:capitalize;letter-spacing:.01em}
.alert{display:flex;align-items:flex-start;gap:9px;border-radius:14px;border-width:1px;padding:12px 14px;font-size:.86rem}
.alert-error{background:#fff2f2;color:#a82e2e;border-color:#f6c8c8}.alert-success{background:#ecfbf4;color:#14734e;border-color:#bde7d2}
.inline-warning{border-radius:13px;background:#fff8e9;border:1px solid #f3d99a;color:#7a5606;padding:11px 12px;font-size:.82rem}
.system-banner .button{white-space:nowrap}

/* Dialogs and sheets */
dialog{color:var(--yui-text)}
.app-dialog,.confirm-dialog{background:transparent;border:0;padding:0;max-width:none;max-height:none}
.app-dialog::backdrop,.confirm-dialog::backdrop{background:rgba(17,24,43,.46);backdrop-filter:blur(5px)}
.dialog-shell,.confirm-shell{border-radius:24px;background:var(--yui-surface);box-shadow:var(--yui-shadow-lg);border:1px solid rgba(255,255,255,.45)}
.dialog-header{padding:18px 22px;border-bottom:1px solid var(--yui-border);background:linear-gradient(180deg,#fff,#fbfcff)}
.dialog-header h2{font-size:1.1rem}.dialog-body{padding:20px 22px}.dialog-footer{padding:15px 22px;border-top:1px solid var(--yui-border);background:#fafbfe}
.confirm-shell{padding:22px}.confirm-icon{background:var(--yui-primary-soft);color:var(--yui-primary);border-radius:15px}

/* Toasts */
.toast-region{right:20px;bottom:20px;display:grid;gap:10px;z-index:150}
.toast{border-radius:16px!important;background:rgba(32,38,58,.96)!important;color:#fff!important;box-shadow:0 18px 48px rgba(25,31,51,.24)!important;border:1px solid rgba(255,255,255,.09)!important;backdrop-filter:blur(16px)}
.toast p{color:rgba(255,255,255,.78)!important}.toast button{color:#fff!important}
.toast-success .toast-icon{background:rgba(34,160,107,.24)!important;color:#8ae0b8!important}.toast-error .toast-icon{background:rgba(209,67,67,.24)!important;color:#ffb0b0!important}

/* Transaction, notification and network views */
.transaction-list{border-radius:var(--yui-radius);top:96px}
.transaction-item{border-radius:14px;margin:2px 0;padding:12px 11px}
.transaction-item:hover{background:#f7f8fc}.transaction-item.active{background:var(--yui-primary-soft);border-color:rgba(79,110,247,.22)}
.transaction-summary{padding:22px}.network-kpis>div,.detail-grid>div,.wallet-balances>div{background:#f8f9fc;border-color:var(--yui-border);border-radius:14px}
.status-workflow{border-radius:16px;background:#f8f9fd;border-color:var(--yui-border)}
.timeline>div>span{background:var(--yui-primary-soft);color:var(--yui-primary)}
.notification-item{border-bottom-color:var(--yui-border)}.notification-item.unread{background:linear-gradient(105deg,var(--yui-primary-soft),#faf8ff);border-radius:16px}
.notification-symbol{width:46px;height:46px}
.notification-heading strong{font-size:.88rem}.notification-item p{font-size:.84rem;color:#59647a}
.member-network-card,.plan-card,.referral-card,.wallet-card,.catalog-card,.media-card{border-radius:18px;box-shadow:var(--yui-shadow)}

/* Catalog and storefront */
.catalog-grid{gap:16px}
.catalog-card{overflow:hidden;border-color:var(--yui-border)}
.catalog-card:hover{transform:translateY(-3px);box-shadow:0 18px 38px rgba(39,52,89,.12);border-color:rgba(79,110,247,.22)}
.catalog-image,.catalog-media{background:linear-gradient(145deg,#eef2ff,#f4edff)}
.catalog-image img,.catalog-media img{transition:transform .35s ease}.catalog-card:hover img{transform:scale(1.035)}
.catalog-price{color:var(--yui-primary-strong)}
.storefront-page{background:var(--yui-bg)}
.storefront-header{background:rgba(255,255,255,.92);border-color:var(--yui-border);backdrop-filter:blur(18px);box-shadow:0 8px 28px rgba(37,50,85,.05)}
.storefront-header nav a:not(.button){color:#657087;font-size:.84rem}.storefront-header nav a:hover{color:var(--yui-primary)}
.storefront-main{max-width:1480px}
.storefront-hero{
  border-radius:30px;background:
  linear-gradient(120deg,rgba(37,55,101,.96),rgba(79,110,247,.93) 63%,rgba(139,92,246,.90)),
  url('../img/yui/pattern-general.png') center/cover;
  box-shadow:0 24px 70px rgba(47,65,132,.25)
}
.storefront-hero h1{max-width:850px}.hero-visual{border-radius:24px;background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.24)}
.checkout-card{top:96px;border-radius:20px}.cart-row{border-color:var(--yui-border)}

/* Yui-inspired authentication */
.auth-page{
  padding:24px;background:
  radial-gradient(circle at 12% 8%,rgba(79,110,247,.16),transparent 28rem),
  radial-gradient(circle at 90% 94%,rgba(139,92,246,.12),transparent 28rem),
  #f6f7fb;
}
.auth-card{max-width:980px;min-height:620px;border-radius:30px;border:1px solid rgba(255,255,255,.65);box-shadow:0 30px 80px rgba(37,48,83,.15);grid-template-columns:1fr 1fr}
.auth-visual{
  position:relative;display:flex;align-items:center;justify-content:center;padding:44px;
  color:var(--yui-text);background:linear-gradient(150deg,#f0f3ff,#f7f1ff);overflow:hidden
}
.auth-visual::before{content:"";position:absolute;width:330px;height:330px;border-radius:50%;background:rgba(79,110,247,.12);left:-130px;top:-120px;box-shadow:400px 470px 0 rgba(139,92,246,.08)}
.auth-illustration{position:relative;z-index:1;display:grid;justify-items:center;text-align:center;max-width:390px}
.auth-illustration img{width:min(300px,85%);height:auto;filter:drop-shadow(0 20px 32px rgba(56,72,129,.13))}
.auth-illustration h1{font-size:1.7rem;margin:22px 0 8px;color:var(--yui-text)}
.auth-illustration p{color:var(--yui-text-soft);font-size:.88rem;line-height:1.6;margin:0}
.auth-form{padding:48px 50px;background:var(--yui-surface)}
.auth-form .brand{margin:0 0 28px}.auth-form h2{font-size:1.8rem;margin:0 0 6px}.auth-form>p{color:var(--yui-text-soft);margin:0}
.auth-form form{gap:15px;margin-top:24px}.auth-form label{font-size:.78rem}
.auth-input{position:relative}.auth-input>.icon{position:absolute;left:14px;top:38px;color:#8d96aa;z-index:1}.auth-input input{padding-left:43px}
.auth-form .check{font-size:.76rem;color:var(--yui-text-soft);display:flex;align-items:center}
.auth-help{display:flex;align-items:flex-start;gap:8px;margin-top:14px;padding:10px 12px;border-radius:12px;background:#f7f8fc;color:var(--yui-text-soft);font-size:.72rem}
.auth-help .icon{color:var(--yui-info);margin-top:1px}

/* Dark appearance */
body.theme-dark{
  --yui-bg:#111522;
  --yui-surface:#1b2030;
  --yui-surface-2:#202637;
  --yui-surface-3:#2a3041;
  --yui-text:#f3f5fb;
  --yui-text-soft:#aab2c5;
  --yui-border:rgba(255,255,255,.09);
  --yui-shadow:0 12px 32px rgba(0,0,0,.18);
  --yui-shadow-lg:0 28px 80px rgba(0,0,0,.36);
  color-scheme:dark;
  background:radial-gradient(circle at 85% 0,rgba(79,110,247,.13),transparent 25rem),var(--yui-bg)
}
body.theme-dark .sidebar,body.theme-dark .topbar,body.theme-dark .storefront-header{background:rgba(27,32,48,.94)}
body.theme-dark .sidebar nav a{color:#b4bdd1}body.theme-dark .sidebar nav a:hover{background:#252b3d;color:#fff}body.theme-dark .sidebar nav a.active{background:linear-gradient(100deg,rgba(79,110,247,.20),rgba(139,92,246,.12));color:#bac7ff}
body.theme-dark .sidebar .brand small{color:#9fa8bc}
body.theme-dark .card,body.theme-dark .dialog-shell,body.theme-dark .confirm-shell,body.theme-dark input,body.theme-dark select,body.theme-dark textarea,body.theme-dark .button-ghost,body.theme-dark .topbar-icon{background:var(--yui-surface);color:var(--yui-text)}
body.theme-dark .welcome{background:linear-gradient(120deg,#1c2233,#222944 58%,#2b2440)}
body.theme-dark .table-header,body.theme-dark .dialog-header{background:linear-gradient(180deg,#1d2333,#1a1f2e)}
body.theme-dark th{background:#202637;color:#aab2c5}body.theme-dark tbody tr:hover{background:#202637}
body.theme-dark .form-section,body.theme-dark .status-workflow,body.theme-dark .filter-bar,body.theme-dark .search-field input,body.theme-dark .network-kpis>div,body.theme-dark .detail-grid>div,body.theme-dark .wallet-balances>div{background:#202637}
body.theme-dark .module p,body.theme-dark .page-heading p,body.theme-dark .table-header p,body.theme-dark .notification-item p{color:var(--yui-text-soft)}
body.theme-dark .system-banner{background:#2b281d;color:#f1d18a;border-color:rgba(241,209,138,.16)}
body.theme-dark .notification-item.unread{background:linear-gradient(105deg,rgba(79,110,247,.16),rgba(139,92,246,.09))}
body.theme-dark .storefront-page{background:var(--yui-bg)}
body.theme-dark .auth-page{background:radial-gradient(circle at 12% 8%,rgba(79,110,247,.16),transparent 28rem),#111522}
body.theme-dark .auth-visual{background:linear-gradient(150deg,#202740,#29233d)}
body.theme-dark .auth-form{background:var(--yui-surface)}
body.theme-dark input::placeholder,body.theme-dark textarea::placeholder{color:#788197}
body.theme-dark .button-ghost:hover{background:#252b3d}
body.theme-dark .sidebar-backdrop{background:rgba(0,0,0,.62)}

/* Responsive: retain desktop precision and adopt Yui mobile app shell */
@media(max-width:1100px){
  .app-shell{grid-template-columns:1fr}
  .sidebar{position:fixed;left:calc(var(--yui-sidebar-width) * -1 - 18px);top:0;z-index:90;transition:left .24s ease;width:var(--yui-sidebar-width);box-shadow:18px 0 50px rgba(15,22,42,.20)}
  .sidebar.open{left:0}
  .icon-button{display:grid}
  .content{padding-bottom:100px}
  .mobile-tabbar{
    display:grid;grid-template-columns:repeat(5,1fr);position:fixed;left:12px;right:12px;bottom:calc(10px + env(safe-area-inset-bottom));height:66px;
    background:rgba(255,255,255,.94);border:1px solid var(--yui-border);border-radius:22px;box-shadow:0 16px 40px rgba(27,38,70,.18);z-index:70;
    backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);overflow:hidden;padding:5px
  }
  body.theme-dark .mobile-tabbar{background:rgba(27,32,48,.94)}
  .mobile-tabbar a,.mobile-tabbar button{border:0;background:transparent;color:#8a93a7;border-radius:16px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:.62rem;font-weight:700;cursor:pointer;min-width:0}
  .mobile-tabbar a .icon,.mobile-tabbar button .icon{width:20px;height:20px}
  .mobile-tabbar a.active{background:var(--yui-primary-soft);color:var(--yui-primary)}
  body.theme-dark .mobile-tabbar a.active{background:rgba(79,110,247,.18);color:#aebcff}
  .topbar{padding:10px 18px}.system-banner{margin:10px 18px 0}.content{padding-left:18px;padding-right:18px}
  .topbar-profile .user-identity{display:none}.topbar-profile{padding-right:4px}
}
@media(max-width:760px){
  :root{--yui-topbar-height:68px}
  .topbar{height:68px;padding:8px 14px}.topbar h1{font-size:1.15rem}.topbar p{display:none}.topbar-actions{gap:5px}.topbar-icon,.icon-button{width:39px;height:39px}.topbar-profile .avatar{width:38px;height:38px}.topbar-profile{margin-left:0}
  .content{padding:16px 14px 96px}.system-banner{margin:8px 14px 0;align-items:flex-start}.system-banner p{font-size:.75rem}.system-banner .button{padding:7px 9px;font-size:.68rem}
  .page-heading{align-items:stretch}.page-heading .heading-actions,.page-heading>.button{width:100%}.page-heading .heading-actions .button{flex:1}
  .welcome{padding:22px;display:grid}.welcome .button{width:100%;margin-top:4px}.welcome::after{width:170px;height:170px}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.stat{padding:15px;min-height:116px}.stat strong{font-size:1.48rem}.stat small{font-size:.65rem}
  .module-grid{grid-template-columns:1fr}.module{min-height:0}.module p{margin-bottom:12px}
  .filter-bar{padding:12px;gap:8px}.filter-bar label,.filter-bar .search-field{min-width:100%}
  .table-card{border-radius:16px}.table-header{padding:15px}.table-wrap{border-top:1px solid var(--yui-border)}
  .dialog-shell{width:100vw!important;max-width:none!important;max-height:88vh!important;border-radius:24px 24px 0 0!important;position:fixed;bottom:0;left:0;margin:0!important}
  .app-dialog[open]{display:flex;align-items:flex-end;justify-content:center}
  .dialog-header::before{content:"";display:block;width:42px;height:4px;border-radius:99px;background:#cdd3df;margin:-9px auto 13px}
  .dialog-footer{padding-bottom:calc(15px + env(safe-area-inset-bottom))}
  .confirm-dialog[open]{display:flex;align-items:flex-end;justify-content:center}.confirm-shell{width:calc(100vw - 20px);border-radius:22px;margin:0 10px calc(10px + env(safe-area-inset-bottom))}
  .toast-region{left:12px;right:12px;bottom:calc(86px + env(safe-area-inset-bottom))}
  .toast{width:100%!important;max-width:none!important}
  .transaction-layout{grid-template-columns:1fr}.transaction-list{position:static}.transaction-items{max-height:440px}
  .notification-layout,.commerce-layout{grid-template-columns:1fr}.trusted-devices,.checkout-card{position:static}
  .auth-page{padding:0;display:block}.auth-card{min-height:100vh;border-radius:0;grid-template-columns:1fr;box-shadow:none;border:0}.auth-visual{min-height:270px;padding:28px 20px 16px;align-items:end}.auth-illustration img{width:180px}.auth-illustration h1{display:none}.auth-illustration p{display:none}.auth-form{padding:28px 22px 42px;border-radius:26px 26px 0 0;margin-top:-20px;position:relative;z-index:2}.auth-form .brand{margin-bottom:20px}.auth-form h2{font-size:1.6rem}
  .storefront-header{padding:10px 14px;min-height:68px;flex-direction:row;align-items:center}.storefront-header .brand small{display:none}.storefront-header nav{width:auto;margin-left:auto;padding:0}.storefront-header nav a:not(.button){display:none}.storefront-main{padding:14px}.storefront-hero{padding:30px 21px;border-radius:22px}.storefront-hero h1{font-size:2.05rem}.hero-visual{min-height:170px}.storefront-section{padding-top:42px}
}
@media(max-width:430px){
  .stats{grid-template-columns:1fr 1fr}.stat{min-width:0}.stat strong{font-size:1.35rem;overflow-wrap:anywhere}
  .topbar-title{max-width:calc(100vw - 190px)}.topbar h1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .user-menu{gap:2px}.topbar-profile{display:none}
  .mobile-tabbar{left:8px;right:8px;border-radius:20px}
  .page-heading h2{font-size:1.55rem}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}
html.theme-dark-pending{background:#111522}.auth-theme-toggle{position:fixed;right:20px;top:20px;z-index:10}
.dashboard-welcome{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(260px,.55fr);align-items:center;gap:22px}.dashboard-welcome-copy{position:relative;z-index:2}.dashboard-welcome h2{font-size:clamp(1.7rem,3vw,2.45rem);margin:8px 0}.dashboard-quick-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:18px}.dashboard-welcome-visual{min-height:190px;border-radius:22px;background:linear-gradient(145deg,rgba(79,110,247,.12),rgba(139,92,246,.12));display:grid;place-items:center;align-content:center;text-align:center;gap:7px;position:relative;overflow:hidden}.dashboard-main-icon{width:74px;height:74px;border-radius:24px;background:linear-gradient(145deg,var(--yui-primary),var(--yui-secondary));color:#fff;display:grid;place-items:center;box-shadow:0 18px 32px rgba(79,110,247,.25);position:relative;z-index:2}.dashboard-welcome-visual strong{font-size:1rem;position:relative;z-index:2}.dashboard-welcome-visual small{max-width:220px;position:relative;z-index:2}.dashboard-orbit{position:absolute;border:1px solid rgba(79,110,247,.18);border-radius:50%}.orbit-one{width:190px;height:190px}.orbit-two{width:260px;height:260px}.dashboard-stats .stat,.transaction-stats .stat{padding-top:17px}.stat-icon{width:38px;height:38px;border-radius:13px;background:var(--yui-primary-soft);color:var(--yui-primary);display:grid!important;place-items:center;margin-bottom:12px}.stat:nth-child(4n+2) .stat-icon{background:#eaf8f2;color:var(--yui-success)}.stat:nth-child(4n+3) .stat-icon{background:#fff5e5;color:var(--yui-warning)}.stat:nth-child(4n+4) .stat-icon{background:#f3edff;color:var(--yui-secondary)}.dashboard-section-title{display:flex;align-items:end;justify-content:space-between;gap:14px}.dashboard-section-title small{font-size:.73rem;font-weight:500}.dashboard-guide{display:grid;grid-template-columns:auto 1fr;gap:16px}.dashboard-guide h2{font-size:1rem;margin:0 0 7px}.dashboard-guide ol{margin:0;padding-left:20px;color:var(--yui-text-soft);font-size:.84rem}.dashboard-guide li{margin:6px 0}@media(max-width:900px){.dashboard-welcome{grid-template-columns:1fr}.dashboard-welcome-visual{min-height:150px}}@media(max-width:600px){.dashboard-welcome-visual{display:none}.dashboard-section-title{align-items:flex-start;flex-direction:column;gap:2px}.dashboard-guide{grid-template-columns:1fr}.dashboard-guide .guide-icon{margin:0}}
.storefront-metrics{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}.storefront-metrics span{display:flex;align-items:center;gap:5px;padding:8px 11px;border:1px solid rgba(255,255,255,.22);border-radius:999px;background:rgba(255,255,255,.09);font-size:.72rem;color:#e9edff}.storefront-metrics strong{color:#fff}.hero-app-icon{width:84px;height:84px;border-radius:27px;background:rgba(255,255,255,.18);display:grid;place-items:center;box-shadow:0 16px 34px rgba(23,33,80,.18)}.hero-mini-flow{display:flex;align-items:center;gap:7px;margin-top:10px;color:rgba(255,255,255,.82);font-size:.72rem}.hero-mini-flow b{padding:6px 9px;border-radius:999px;background:rgba(255,255,255,.11)}.storefront-feature-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:18px}.storefront-feature-strip>div{display:flex;align-items:center;gap:11px;padding:15px 16px;border:1px solid var(--yui-border);border-radius:17px;background:var(--yui-surface);box-shadow:var(--yui-shadow);color:var(--yui-primary)}.storefront-feature-strip span{display:grid}.storefront-feature-strip strong{font-size:.82rem;color:var(--yui-text)}.storefront-feature-strip small{font-size:.68rem}.section-view-link{display:inline-flex;align-items:center;gap:6px;color:var(--yui-primary);font-size:.8rem;font-weight:750}.catalog-floating-badge{position:absolute;top:12px;right:12px;padding:6px 9px;border-radius:999px;background:rgba(31,38,58,.78);color:#fff;font-size:.66rem;font-weight:750;backdrop-filter:blur(8px)}.catalog-media{position:relative}.storefront-footer{max-width:1480px;margin:40px auto 0;padding:24px clamp(18px,4vw,56px) calc(24px + env(safe-area-inset-bottom));display:flex;align-items:center;gap:14px;border-top:1px solid var(--yui-border);color:var(--yui-text-soft)}.storefront-footer>span{display:flex;align-items:center;gap:9px;color:var(--yui-text)}.storefront-footer .brand-mark{width:34px;height:34px;font-size:.72rem}.storefront-footer small{flex:1}.storefront-footer a{display:inline-flex;align-items:center;gap:5px;color:var(--yui-primary);font-size:.78rem;font-weight:750}@media(max-width:900px){.storefront-feature-strip{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.storefront-feature-strip{grid-template-columns:1fr 1fr;gap:8px}.storefront-feature-strip>div{padding:12px;align-items:flex-start}.storefront-feature-strip small{display:none}.storefront-footer{align-items:flex-start;flex-direction:column}.storefront-footer small{font-size:.72rem}.storefront-metrics{display:grid;grid-template-columns:1fr 1fr}.storefront-metrics span:last-child{grid-column:1/-1}.section-view-link{display:none}}
.yui-install-page{background:radial-gradient(circle at 85% 0,rgba(79,110,247,.10),transparent 30rem),var(--yui-bg)}.installer{max-width:980px}.installer-head{padding:20px 22px;border-radius:22px;background:linear-gradient(120deg,#fff,#f1f4ff);border:1px solid var(--yui-border);box-shadow:var(--yui-shadow)}.installer-head h1{font-size:1.75rem}.installer .card{border-radius:20px}.check-row{background:var(--yui-surface-2);border:1px solid var(--yui-border)}.offline-card,.referral-error-card{padding:42px;max-width:560px;text-align:center;margin:auto}.offline-icon{width:72px;height:72px;border-radius:24px;margin:0 auto 18px;background:linear-gradient(145deg,var(--yui-primary),var(--yui-secondary));color:#fff;display:grid;place-items:center;font-weight:800;box-shadow:0 16px 32px rgba(79,110,247,.25)}.offline-card p,.referral-error-card p{color:var(--yui-text-soft);margin:8px 0 22px}.referral-error-card .brand-mark{margin:0 auto 16px}
.settings-profile-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;padding:18px 20px;margin-bottom:18px;background:linear-gradient(110deg,#fff,#f5f7ff)}.settings-profile-icon{width:54px;height:54px;border-radius:18px;background:linear-gradient(145deg,var(--yui-primary),var(--yui-secondary));color:#fff;display:grid;place-items:center;box-shadow:0 12px 24px rgba(79,110,247,.22)}.settings-profile-card h3{margin:0 0 3px}.settings-profile-card p{margin:0;color:var(--yui-text-soft);font-size:.82rem}.yui-settings-list .setting{align-items:center;grid-template-columns:minmax(0,1fr) minmax(300px,430px);padding:17px 19px}.setting-summary{display:grid;grid-template-columns:auto minmax(0,1fr);gap:13px;align-items:start}.setting-summary h3{margin:2px 0}.setting-summary p{margin:0 0 5px;font-size:.82rem}.setting-colored-icon{width:43px;height:43px;border-radius:14px;background:var(--yui-primary-soft);color:var(--yui-primary);display:grid;place-items:center}.module-security{background:#eaf8f2;color:var(--yui-success)}.module-commerce,.module-settlement{background:#fff5e5;color:var(--yui-warning)}.module-branding,.module-media{background:#f3edff;color:var(--yui-secondary)}.module-notifications{background:#fff0f2;color:#d14365}.setting-action .button{min-width:92px}@media(max-width:760px){.settings-profile-card{grid-template-columns:auto 1fr}.settings-profile-card>.status{grid-column:2;width:max-content}.yui-settings-list .setting{grid-template-columns:1fr}.setting-action{grid-template-columns:1fr auto;display:grid}.setting-action .button{min-height:46px}}
