:root{
  --bg:#0a0a0a; --surface:#141414; --surface2:#1b1b1b; --border:rgba(255,255,255,.09);
  --text:#f5f4f0; --muted:#9c9893; --accent:#c9a24b; --accent2:#dcb45f; --danger:#e05959;
  --radius:14px;
}
*{box-sizing:border-box; margin:0; padding:0;}
html{-webkit-text-size-adjust:100%;}
body{background:var(--bg); color:var(--text); font-family:Arial, Helvetica, sans-serif; min-height:100dvh; overflow-x:hidden;}
img{max-width:100%; display:block;}
button, input, select, textarea{font-family:inherit;}
a{color:inherit;}

.app-shell{display:flex; min-height:100dvh;}
.sidebar{width:260px; flex-shrink:0; background:var(--surface); border-right:1px solid var(--border); display:flex; flex-direction:column; padding:20px 16px; position:sticky; top:0; height:100dvh; overflow-y:auto;}
.brand{font-weight:800; letter-spacing:.14em; font-size:14px; color:var(--accent); padding:8px 8px 20px;}
.nav-btn{display:flex; align-items:center; gap:10px; width:100%; background:none; border:none; color:var(--muted); text-align:left; padding:11px 12px; border-radius:10px; font-size:14px; font-weight:600; cursor:pointer; min-height:44px;}
.nav-btn:hover{background:var(--surface2); color:var(--text);}
.nav-btn.active{background:var(--surface2); color:var(--accent);}
.sidebar-footer{margin-top:auto; padding-top:16px; border-top:1px solid var(--border);}
.logout-btn{width:100%; background:none; border:1px solid var(--border); color:var(--muted); padding:10px; border-radius:10px; cursor:pointer; font-size:13px; min-height:44px;}
.logout-btn:hover{color:var(--text); border-color:var(--muted);}

.main{flex:1; min-width:0; padding:clamp(16px,3vw,36px);}
.topbar{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:24px; flex-wrap:wrap;}
.topbar h1{font-size:clamp(20px,3vw,26px); font-weight:800;}
.btn{display:inline-flex; align-items:center; gap:8px; background:var(--accent); color:#0a0a0a; border:none; padding:11px 18px; border-radius:10px; font-weight:700; font-size:14px; cursor:pointer; min-height:44px; text-decoration:none;}
.btn:hover{background:var(--accent2);}
.btn.secondary{background:var(--surface2); color:var(--text); border:1px solid var(--border);}
.btn.secondary:hover{border-color:var(--muted);}
.btn.danger{background:transparent; color:var(--danger); border:1px solid var(--danger);}
.btn.danger:hover{background:var(--danger); color:#fff;}
.btn:disabled{opacity:.5; cursor:default;}

.grid-talents{display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:16px;}
.talent-card{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; cursor:pointer; transition:border-color .15s;}
.talent-card:hover{border-color:var(--accent);}
.talent-cover{aspect-ratio:4/3; background:var(--surface2) center/cover no-repeat; display:flex; align-items:center; justify-content:center; color:var(--muted); font-size:32px;}
.talent-body{padding:14px;}
.talent-name{font-weight:700; font-size:15px; margin-bottom:4px;}
.talent-niche{color:var(--muted); font-size:12.5px; margin-bottom:10px;}
.status-pill{display:inline-block; font-size:11px; font-weight:700; padding:4px 10px; border-radius:999px; letter-spacing:.03em;}
.status-pill.published{background:rgba(46,196,120,.15); color:#4fd88a;}
.status-pill.draft{background:rgba(255,255,255,.08); color:var(--muted);}
.empty-state{text-align:center; padding:60px 20px; color:var(--muted);}

.editor{max-width:960px;}
.tabs{display:flex; gap:6px; overflow-x:auto; margin-bottom:22px; border-bottom:1px solid var(--border); padding-bottom:2px;}
.tab-btn{background:none; border:none; color:var(--muted); padding:10px 14px; font-weight:700; font-size:13.5px; cursor:pointer; white-space:nowrap; border-bottom:2px solid transparent; min-height:44px;}
.tab-btn.active{color:var(--accent); border-bottom-color:var(--accent);}
.panel{display:none;}
.panel.active{display:block;}

.field{margin-bottom:16px;}
.field label{display:block; font-size:12.5px; font-weight:700; color:var(--muted); margin-bottom:6px; text-transform:uppercase; letter-spacing:.04em;}
.field input, .field select, .field textarea{width:100%; background:var(--surface); border:1px solid var(--border); color:var(--text); padding:11px 13px; border-radius:10px; font-size:14.5px;}
.field input:focus, .field select:focus, .field textarea:focus{outline:none; border-color:var(--accent);}
.field textarea{resize:vertical; min-height:100px;}
.field-row{display:grid; grid-template-columns:1fr 1fr; gap:14px;}
@media (max-width:640px){ .field-row{grid-template-columns:1fr;} }

.theme-picker{display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:12px; margin-bottom:20px;}
.theme-opt{border:2px solid var(--border); border-radius:12px; padding:14px; cursor:pointer; text-align:center;}
.theme-opt.selected{border-color:var(--accent);}
.theme-swatch{height:36px; border-radius:8px; margin-bottom:8px;}
.theme-opt span{font-size:12.5px; font-weight:700;}

.list-block{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:16px; margin-bottom:14px;}
.list-block .row{display:flex; gap:10px; align-items:flex-start; flex-wrap:wrap;}
.list-block .row > *{flex:1; min-width:120px;}
.remove-btn{background:none; border:1px solid var(--border); color:var(--muted); width:36px; height:36px; border-radius:8px; cursor:pointer; flex:0 0 auto !important; min-width:36px !important;}
.remove-btn:hover{color:var(--danger); border-color:var(--danger);}
.add-btn{background:var(--surface2); border:1px dashed var(--border); color:var(--muted); padding:12px; border-radius:10px; width:100%; cursor:pointer; font-weight:700; font-size:13.5px; min-height:44px;}
.add-btn:hover{color:var(--accent); border-color:var(--accent);}

.upload-zone{border:2px dashed var(--border); border-radius:var(--radius); padding:30px 16px; text-align:center; color:var(--muted); cursor:pointer; margin-bottom:18px;}
.upload-zone:hover{border-color:var(--accent); color:var(--accent);}
.asset-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px;}
.asset-item{position:relative; border-radius:10px; overflow:hidden; background:var(--surface2); aspect-ratio:4/5;}
.asset-item img, .asset-item video{width:100%; height:100%; object-fit:cover;}
.asset-item .del{position:absolute; top:6px; right:6px; background:rgba(0,0,0,.65); color:#fff; border:none; width:28px; height:28px; border-radius:8px; cursor:pointer; font-size:14px; z-index:2;}
.asset-item .tag{position:absolute; bottom:6px; left:6px; background:rgba(0,0,0,.65); color:#fff; font-size:10px; padding:3px 7px; border-radius:6px; font-weight:700;}
.asset-item .asset-cat{position:absolute; left:0; right:0; bottom:0; width:100%; background:rgba(10,10,10,.82); color:#fff; border:none; border-top:1px solid rgba(255,255,255,.12); font-size:12px; font-weight:700; padding:9px 8px; cursor:pointer; min-height:36px; border-radius:0;}
.asset-item .asset-cat:focus{outline:2px solid var(--accent);}
.asset-item .asset-cat option{background:#141414; color:#fff;}

.share-box{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px; display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:22px;}
.share-box input{flex:1; min-width:200px; background:var(--surface2); border:1px solid var(--border); color:var(--text); padding:10px 12px; border-radius:8px; font-size:13.5px;}

.toast{position:fixed; bottom:20px; right:20px; background:var(--surface2); border:1px solid var(--accent); color:var(--text); padding:13px 18px; border-radius:10px; font-size:14px; font-weight:600; z-index:100; box-shadow:0 8px 24px rgba(0,0,0,.4); max-width:calc(100vw - 40px);}

@media (max-width:840px){
  .app-shell{flex-direction:column;}
  .sidebar{width:100%; height:auto; position:static; flex-direction:row; align-items:center; overflow-x:auto; padding:12px;}
  .brand{padding:0 12px 0 0;}
  .sidebar-footer{margin-top:0; margin-left:auto; padding-top:0; border-top:none;}
  .nav-btn{white-space:nowrap;}
}
