/* IMGPV dashboard — logged-in area (sidebar, header bar, account/reports/payout/files pages) */

/* ---------- shell ---------- */
body.ui-dash .holderPanel { display:flex; align-items:stretch; background:#f4f6fb!important; }
body.ui-dash .contentPanel { flex:1 1 auto; min-width:0; float:none; background:#f4f6fb!important; height:auto!important; min-height:100vh; }
body.ui-dash .SidemenuPanel { float:none; flex:none; background:#0b1220!important; height:auto!important; padding:0 0 24px; }

.SidemenuPanel #logo { width:100%!important; float:none!important; background-color:transparent!important; filter:brightness(0) invert(1); height:64px!important; background-size:96px auto!important;
  background-position:24px center!important; cursor:pointer; margin:0 0 8px!important; }
.SidemenuPanel ul.otherMenus { float:none!important; background:none!important; margin:0; padding:0 12px; width:100%; box-sizing:border-box; }
.SidemenuPanel ul.otherMenus li { float:none!important; width:100%!important; height:auto!important; line-height:normal!important; margin:2px 0;
  border:0!important; border-radius:10px; background:transparent!important; }
.SidemenuPanel ul.otherMenus li a { display:flex; align-items:center; gap:12px; padding:11px 14px; color:#94a3b8!important; font-size:14px; font-weight:600;
  text-decoration:none; border-radius:10px; }
.SidemenuPanel ul.otherMenus li a i { width:18px; text-align:center; color:#64748b!important; font-size:14px; margin:0!important; }
.SidemenuPanel ul.otherMenus li:hover a { background:rgba(148,163,184,.1); color:#fff!important; }
.SidemenuPanel ul.otherMenus li:hover a i { color:#cbd5e1!important; }
.SidemenuPanel ul.otherMenus li.is-current a { background:linear-gradient(135deg,rgba(59,130,246,.25),rgba(16,185,129,.18)); color:#fff!important;
  box-shadow:inset 3px 0 0 #34d399; }
.SidemenuPanel ul.otherMenus li.is-current a i { color:#34d399!important; }

body.ui-dash #header { background:#fff!important; border-bottom:1px solid #e2e8f0!important; }
body.ui-dash .UserHead.ui-userhead { display:flex!important; align-items:center; gap:8px; flex-wrap:wrap; height:auto; margin:12px 0; font-family:inherit; font-size:13px; color:#475569; }
.ui-userhead > span:first-child { display:none; }
.ui-userhead .chip { display:inline-flex; align-items:center; gap:7px; padding:6px 12px; border-radius:999px; background:#f1f5f9; border:1px solid #e2e8f0; white-space:nowrap; }
.ui-userhead .chip i { color:#94a3b8; }
.ui-userhead .chip strong { color:#0f172a; }
.ui-userhead .chip.money { background:#ecfdf5; border-color:#a7f3d0; }
.ui-userhead .chip.money i, .ui-userhead .chip.money strong { color:#047857; }

/* ---------- page primitives ---------- */
.d-page { --ink:#0f172a; --muted:#64748b; --line:#e2e8f0; --soft:#f8fafc; color:var(--ink); text-align:left; line-height:1.5; margin:0 auto 40px; max-width:1200px; }
.d-page * { box-sizing:border-box; }
.d-page h1, .d-page h2, .d-page h3 { margin:0; color:inherit; font-weight:800; letter-spacing:-.02em; }
.d-page p { margin:0; }
.d-title { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; flex-wrap:wrap; margin:6px 0 22px; }
.d-title > * { margin:0; }
.d-title h1 { font-size:28px; }
.d-title p { color:var(--muted); margin-top:4px; font-size:15px; }
.d-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }

.d-grid { display:grid; gap:16px; margin-bottom:16px; }
.d-grid-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.d-grid-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.d-grid-4 { grid-template-columns:repeat(4,minmax(0,1fr)); }

.d-card { background:#fff; border:1px solid var(--line); border-radius:16px; box-shadow:0 4px 18px rgba(15,23,42,.05); margin-bottom:16px; min-width:0; }
.d-grid > .d-card { margin-bottom:0; }
.d-card-h { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:16px 20px; border-bottom:1px solid var(--line); }
.d-card-h h3 { font-size:16px; }
.d-card-h small { color:var(--muted); font-size:13px; }
.d-card-b { padding:18px 20px; }

.d-stat { position:relative; padding:18px 20px; border-radius:16px; background:#fff; border:1px solid var(--line); box-shadow:0 4px 18px rgba(15,23,42,.05); min-width:0; }
.d-stat .ic { width:40px; height:40px; border-radius:12px; display:grid; place-items:center; font-size:16px; margin-bottom:14px; }
.d-stat .lb { color:var(--muted); font-size:13px; font-weight:600; }
.d-stat .vl { font-size:26px; font-weight:800; letter-spacing:-.02em; margin-top:2px; overflow-wrap:anywhere; }
.d-stat .vl small { font-size:13px; font-weight:600; color:var(--muted); }
.d-stat .ft { margin-top:12px; }
.d-stat.hero { color:#fff; border:0; background:radial-gradient(ellipse at 0% 0%,rgba(59,130,246,.5),transparent 60%),radial-gradient(ellipse at 100% 100%,rgba(16,185,129,.45),transparent 60%),linear-gradient(135deg,#0b1220,#111c3a 60%,#0f2a4a); }
.d-stat.hero .lb { color:#cbd5e1; }
.d-stat.hero .vl small { color:#cbd5e1; }
.d-stat.hero .ic { background:rgba(255,255,255,.12); color:#34d399; }
.ic-blue { background:#dbeafe; color:#2563eb; } .ic-green { background:#d1fae5; color:#059669; }
.ic-amber { background:#fef3c7; color:#d97706; } .ic-violet { background:#ede9fe; color:#7c3aed; } .ic-pink { background:#fce7f3; color:#db2777; }

/* buttons (also restyles legacy submit buttons inside .d-page) */
.d-btn, .d-page input[type=submit], .d-page input[type=button] { display:inline-flex; align-items:center; justify-content:center; gap:8px; height:42px; padding:0 18px;
  border:0; border-radius:11px; font:700 14px/1 inherit; font-family:inherit; cursor:pointer; text-decoration:none!important; white-space:nowrap; width:auto;
  background:#2563eb; color:#fff!important; box-shadow:0 6px 16px rgba(37,99,235,.22); transition:transform .15s, filter .15s; }
.d-btn:hover, .d-page input[type=submit]:hover, .d-page input[type=button]:hover { transform:translateY(-1px); filter:brightness(1.05); }
.d-page input[disabled], .d-btn[disabled] { opacity:.45; cursor:not-allowed; transform:none; box-shadow:none; }
.d-btn-green, .d-page .d-btn-green, .d-page input.d-btn-green { background:linear-gradient(135deg,#10b981,#059669)!important; box-shadow:0 6px 16px rgba(16,185,129,.28)!important; }
.d-btn-light, .d-page .d-btn-light, .d-page input.d-btn-light { background:#fff!important; color:#0f172a!important; border:1px solid var(--line)!important; box-shadow:none!important; }
.d-btn-white, .d-page .d-btn-white, .d-page input.d-btn-white { background:#fff!important; color:#0f172a!important; box-shadow:none!important; }
.d-btn-ghost, .d-page .d-btn-ghost, .d-page input.d-btn-ghost { background:rgba(255,255,255,.12)!important; border:1px solid rgba(255,255,255,.25)!important; color:#fff!important; box-shadow:none!important; }
.d-btn-red, .d-page .d-btn-red, .d-page input.d-btn-red { background:#ef4444!important; box-shadow:none!important; }
.d-btn-lg, .d-page input.d-btn-lg { height:50px; padding:0 26px; font-size:16px; }
.d-btn-sm, .d-page input.d-btn-sm { height:34px; padding:0 12px; font-size:13px; border-radius:9px; }

/* form controls */
.d-page input[type=text], .d-page input[type=password], .d-page input[type=email], .d-page select, .d-page textarea {
  width:100%; max-width:100%; height:42px; padding:0 12px; border:1px solid var(--line); border-radius:11px; background:#fff; font-size:14px; color:var(--ink);
  box-shadow:none; outline:none; margin:0; transition:border-color .15s, box-shadow .15s; }
.d-page textarea { height:auto; padding:10px 12px; }
.d-page select { text-align:left; text-align-last:left; }
.d-page a.enbl, .d-page a.disbl { background:none!important; border:0!important; padding:0!important; color:#2563eb!important; font-weight:700; }
.d-page input:focus, .d-page select:focus, .d-page textarea:focus { border-color:#3b82f6; box-shadow:0 0 0 4px rgba(59,130,246,.14); }
.d-page input[disabled], .d-page select[disabled] { background:var(--soft); color:#94a3b8; }
.d-form { display:grid; gap:14px; }
.d-row { display:grid; grid-template-columns:180px minmax(0,1fr); gap:12px; align-items:center; }
.d-row > label, .d-row > .k { font-size:13px; font-weight:700; color:#334155; }
.d-row .v { min-width:0; overflow-wrap:anywhere; font-size:14px; }
.d-inline { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.d-hint { color:var(--muted); font-size:12px; margin-top:4px; }

/* badges, alerts, links */
.d-badge { display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:999px; font-size:12px; font-weight:800; letter-spacing:.02em; }
.d-badge::before { content:""; width:7px; height:7px; border-radius:50%; background:currentColor; }
.d-on { color:#047857; background:#d1fae5; } .d-off { color:#b91c1c; background:#fee2e2; }
.d-amber { color:#b45309; background:#fef3c7; } .d-grey { color:#475569; background:#f1f5f9; }
.d-link { color:#2563eb!important; font-weight:700; text-decoration:none!important; }
.d-alert { display:flex; gap:10px; align-items:center; padding:12px 16px; margin-bottom:16px; border-radius:12px; font-size:14px; font-weight:600;
  background:#eff6ff; border:1px solid #bfdbfe; color:#1e3a8a; }
.d-alert.ok { background:#ecfdf5; border-color:#a7f3d0; color:#047857; }
.d-copy { display:flex; gap:8px; align-items:center; }
.d-copy input[type=text] { font-family:ui-monospace,Menlo,Consolas,monospace; font-size:13px; background:var(--soft); }
.d-progress { height:8px; border-radius:8px; background:rgba(255,255,255,.15); overflow:hidden; margin-top:12px; }
.d-progress i { display:block; height:100%; width:0; border-radius:8px; background:linear-gradient(90deg,#34d399,#60a5fa); transition:width .8s ease; }
.d-empty { padding:40px 20px; text-align:center; color:var(--muted); }
.d-empty i { font-size:28px; color:#cbd5e1; display:block; margin-bottom:10px; }

/* tables */
.d-table-wrap { overflow-x:auto; }
.d-table { width:100%; border-collapse:separate; border-spacing:0; font-size:14px; }
.d-table th { padding:11px 16px; background:var(--soft); color:var(--muted); font-size:12px; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  text-align:left; border-bottom:1px solid var(--line); white-space:nowrap; }
.d-table td { padding:13px 16px; border-bottom:1px solid var(--line); vertical-align:middle; white-space:nowrap; text-align:left; }
.d-table tr:last-child td { border-bottom:0; }
.d-table tbody tr:hover td { background:#fbfdff; }
.d-table tfoot td { background:var(--soft); font-weight:800; border-top:1px solid var(--line); border-bottom:0; }
.d-table a { color:#2563eb; text-decoration:none; font-weight:600; }
.d-table .num { text-align:right; font-variant-numeric:tabular-nums; }
.d-table .muted { color:#94a3b8; }

/* choice tiles (profit mode) */
.d-tiles { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.d-tile { position:relative; display:block; padding:16px; border:1px solid var(--line); border-radius:14px; cursor:pointer; background:#fff; transition:border-color .15s, box-shadow .15s; }
.d-tile input { position:absolute; top:16px; right:16px; accent-color:#2563eb; }
.d-tile strong { display:block; font-size:16px; }
.d-tile span { display:block; color:var(--muted); font-size:13px; margin-top:4px; }
.d-tile:has(input:checked) { border-color:#3b82f6; box-shadow:0 0 0 4px rgba(59,130,246,.12); }
.d-savebar { position:sticky; bottom:0; z-index:5; display:flex; justify-content:flex-end; gap:10px; padding:14px 0; margin-top:6px;
  background:linear-gradient(180deg,rgba(244,246,251,0),#f4f6fb 40%); }

/* ---------- my files ---------- */
.d-files .createFolder, .d-files .search, .d-files .freespace, .d-files .folders, .d-files .filesInner {
  background:#fff!important; border:1px solid #e2e8f0!important; border-radius:16px!important; box-shadow:0 4px 18px rgba(15,23,42,.05); }
.d-files .createFolder, .d-files .search { display:flex; gap:8px; align-items:center; padding:12px!important; margin-bottom:14px; width:100%!important; }
.d-files .createFolder input[type=text], .d-files .search input[type=text] { flex:1; width:auto!important; }
.d-files .freespace { padding:14px 16px!important; margin:0 0 14px!important; width:100%!important; color:#475569; font-size:13px; }
.d-files .freespace .indicator { height:8px!important; border-radius:8px; background:#e2e8f0!important; overflow:hidden; margin-top:8px; border:0!important; }
.d-files .freespace .indicator .occupied { display:block; height:100%; border-radius:8px; background:linear-gradient(90deg,#3b82f6,#10b981)!important; }
.d-files .folders { padding:8px!important; }
.d-files .folders table { width:100%; border-collapse:collapse; }
.d-files .folders td { padding:10px 8px!important; border-bottom:1px solid #f1f5f9!important; background:none!important; }
.d-files .folders tr.curfolder td { font-weight:700; color:#0f172a; }
.d-files .folders tr.folderrow:hover td { background:#f8fafc!important; }
.d-files .folders a { color:#0f172a; font-weight:600; text-decoration:none; }
.d-files .filesInner { padding:6px!important; overflow-x:auto; }
.d-files #files_list { border-collapse:collapse; }
.d-files #files_list th { padding:11px 10px!important; background:#f8fafc!important; color:#64748b!important; font-size:12px!important; font-weight:700; border:0!important; border-bottom:1px solid #e2e8f0!important; }
.d-files #files_list th:first-child { border-top-left-radius:10px; }
.d-files #files_list th:last-child { border-top-right-radius:10px; }
.d-files #files_list td { padding:11px 10px!important; border:0!important; border-bottom:1px solid #f1f5f9!important; background:none!important; font-size:14px; }
.d-files #files_list tr.filerow:hover td { background:#f8fafc!important; }
.d-files #files_list td.filename a { color:#0f172a; font-weight:600; text-decoration:none; }
.d-files #files_list td.filename a:hover { color:#2563eb; }
.d-files #files_list tr.actionpanel td, .d-files #files_list tr.actionpanel th { border:0!important; padding:12px 10px!important; }
.d-files #files_list .copymove { display:inline-flex; gap:6px; flex-wrap:wrap; vertical-align:middle; }
.d-files #files_list select.AcctSelect { width:auto; min-width:180px; height:38px; display:inline-block; vertical-align:middle; }
.d-files #files_list input[type=submit], .d-files #files_list input[type=button] { height:36px; padding:0 14px; font-size:13px; border-radius:9px;
  background:#fff!important; color:#0f172a!important; border:1px solid #e2e8f0!important; box-shadow:none; margin:2px; }
.d-files #files_list input[name=del_selected] { background:#fef2f2!important; color:#b91c1c!important; border-color:#fecaca!important; }
.d-files #files_list input[name^=set_] { background:#ecfdf5!important; color:#047857!important; border-color:#a7f3d0!important; }
.d-files .paging { margin-top:10px; }
.d-files input[type=checkbox] { accent-color:#2563eb; width:16px; height:16px; }

/* ---------- responsive ---------- */
@media (max-width:1100px) { .d-grid-4 { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:860px) {
  .d-grid-2, .d-grid-3 { grid-template-columns:1fr; }
  .d-grid > * { grid-column:auto!important; }
  .d-tiles { grid-template-columns:1fr; }
  .d-row { grid-template-columns:1fr; gap:6px; }
  .d-files .col-4, .d-files .col-8 { width:100%!important; float:none!important; }
}
@media (max-width:480px) {
  .d-grid-4 { grid-template-columns:1fr 1fr; gap:10px; }
  .d-stat { padding:14px; } .d-stat .vl { font-size:20px; } .d-stat .ic { margin-bottom:10px; }
  .d-title h1 { font-size:24px; }
  .d-card-b { padding:14px; }
}
.UserHead.ui-userhead .chip { font-size:13px; color:#475569; position:static; top:auto; }
