/* =====================================================================
   ÁLBUM · PERFIL · INÍCIO — visual novo (tokens de theme.css)
   ===================================================================== */

/* ---------- ÁLBUM ---------- */
.al{max-width:1240px;margin:0 auto;display:flex;flex-direction:column;gap:14px}
.al-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:4px}
.al-head h2{font-family:var(--f-display);font-weight:600;font-size:clamp(28px,3.4vw,38px);letter-spacing:-.02em;color:var(--text);margin:0}
.al-head p{color:var(--text2);font-size:14px;margin:2px 0 0}
.al-head-actions{display:flex;gap:8px;flex-wrap:wrap}
.al-head-actions .btn-primary,.al-head-actions .btn-secondary{padding:10px 18px;font-size:14px}

.al-bar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.al-search{
  flex:1;min-width:220px;display:flex;align-items:center;gap:10px;padding:0 6px 0 16px;height:48px;border-radius:14px;cursor:text;
  background:var(--surface-hi);border:1px solid rgba(var(--ink-rgb),.14);transition:border-color .15s ease,box-shadow .15s ease;
}
:root[data-theme="dark"] .al-search{background:var(--surface)}
.al-search:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px rgba(var(--accent-rgb),.16)}
.al-search svg{width:18px;height:18px;fill:none;stroke:var(--text2);stroke-width:2;stroke-linecap:round;flex-shrink:0}
.al-search input{flex:1;min-width:0;height:100%;background:none;border:none;outline:none;color:var(--text);font-family:var(--f-corpo);font-size:15px}
.al-search input::-webkit-search-cancel-button{display:none}
.al-clear{display:none;width:34px;height:34px;border-radius:10px;border:none;cursor:pointer;background:rgba(var(--ink-rgb),.08);color:var(--text2);font-size:12px}
.al-search.has .al-clear{display:block}
.al-tools{display:flex;gap:8px;align-items:center}
.al-select{position:relative;display:flex;align-items:center;gap:8px;height:48px;padding:0 12px;border-radius:14px;background:var(--surface);border:1px solid var(--border);cursor:pointer}
.al-select svg,.al-icon svg,.al-view svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.al-select svg{color:var(--text2);flex-shrink:0}
.al-select select{appearance:none;-webkit-appearance:none;background:none;border:none;outline:none;color:var(--text);font-family:var(--f-corpo);font-size:14px;font-weight:600;cursor:pointer;padding-right:4px}
.al-select:focus-within{border-color:var(--accent)}
.al-icon,.al-more-btn{height:48px;min-width:48px;border-radius:14px;border:1px solid var(--border);background:var(--surface);color:var(--text);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-family:var(--f-corpo);font-weight:600;font-size:14px;padding:0 14px;transition:border-color .15s ease}
.al-icon{padding:0}
.al-icon:hover,.al-more-btn:hover{border-color:var(--accent)}
.al-more-btn span:empty{display:none}
.al-more-btn span{min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--accent);color:var(--on-accent);font-size:11px;display:inline-flex;align-items:center;justify-content:center}
.al-more-btn[aria-expanded="true"],.al-more-btn.has{border-color:var(--accent);color:var(--accent)}
.al-view{display:flex;padding:4px;border-radius:14px;background:var(--surface);border:1px solid var(--border);height:48px}
.al-view button{width:38px;border:none;border-radius:10px;background:transparent;color:var(--text3);cursor:pointer;display:flex;align-items:center;justify-content:center}
.al-view button.on{background:var(--accent);color:var(--on-accent)}

.al-chips{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding:2px 0}
.al-chips::-webkit-scrollbar{display:none}
.al-chip{
  flex-shrink:0;display:inline-flex;align-items:center;gap:6px;padding:9px 14px;border-radius:999px;cursor:pointer;
  font-family:var(--f-corpo);font-size:13.5px;font-weight:600;color:var(--text2);
  background:var(--surface);border:1px solid var(--border);transition:all .15s ease;
}
.al-chip small{font-size:11px;font-weight:700;padding:1px 7px;border-radius:999px;background:rgba(var(--ink-rgb),.08);color:var(--text3)}
.al-chip:hover{border-color:var(--accent);color:var(--text)}
.al-chip.on{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.al-chip.on small{background:rgba(255,255,255,.22);color:var(--on-accent)}
.al-chip--soft{background:transparent;padding:7px 12px;font-size:13px}
.al-chip--soft.on{background:rgba(var(--accent-rgb),.14);border-color:rgba(var(--accent-rgb),.5);color:var(--accent)}
.al-chip--soft.on small{background:rgba(var(--accent-rgb),.18);color:var(--accent)}
.al-chip:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

.al-more{display:flex;gap:24px;flex-wrap:wrap;padding:16px;border-radius:18px;background:var(--surface);border:1px solid var(--border)}
.al-more.hidden{display:none}
.al-more-group{display:flex;flex-direction:column;gap:8px}
.al-dates{display:flex;align-items:center;gap:8px;color:var(--text3);font-size:13px}
.al-dates .st-input{width:auto;padding:9px 12px}
.al-quick{display:flex;gap:6px;flex-wrap:wrap}
.al-active{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.al-active:empty{display:none}
.al-pill{display:inline-flex;align-items:center;gap:8px;padding:6px 8px 6px 12px;border-radius:999px;border:none;cursor:pointer;background:rgba(var(--accent-rgb),.12);color:var(--accent);font-family:var(--f-corpo);font-size:12.5px;font-weight:700}
.al-pill span{width:18px;height:18px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:rgba(var(--accent-rgb),.18);font-size:9px}
.al-pill:hover{background:rgba(var(--accent-rgb),.2)}

.album-card-extra{display:none}
.al-empty{grid-column:1 / -1;display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:56px 20px;border:1.5px dashed rgba(var(--ink-rgb),.16);border-radius:24px}
.al-empty h3{font-family:var(--f-display);font-weight:600;font-size:20px;color:var(--text);margin:0}
.al-empty p{color:var(--text2);font-size:14px;margin:0 0 8px;max-width:380px}

/* lista */
.album-grid.is-list{grid-template-columns:1fr !important;gap:8px}
.album-grid.is-list .album-card{display:grid;grid-template-columns:56px minmax(0,1fr);align-items:center;gap:14px;padding:8px 52px 8px 8px;border-radius:16px}
.album-grid.is-list .album-card:hover{transform:none}
.album-grid.is-list .album-card-poster{width:56px;height:84px;aspect-ratio:auto;border-radius:10px !important;font-size:22px}
.album-grid.is-list .album-card:hover .album-card-poster{transform:none}
.album-grid.is-list .album-card-body{padding:0;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;column-gap:16px;align-items:center}
.album-grid.is-list .album-card-title{font-size:15px;-webkit-line-clamp:1;line-clamp:1;margin:0}
.album-grid.is-list .album-card-extra{display:block;grid-column:1;font-size:12.5px;color:var(--text3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.album-grid.is-list .album-card-meta{grid-column:2;grid-row:1 / span 2;font-size:14px}
.album-grid.is-list .album-card-meta span:first-child{display:none}
.album-grid.is-list .album-card-status{position:static;grid-column:1;justify-self:start;display:none}
.album-grid.is-list .album-card-menu{top:50%;right:10px;transform:translateY(-50%)}
.album-grid.is-list .album-card-menu-btn{opacity:1}

@media (max-width:768px){
  .al-head-text{display:none}
  .al-head{justify-content:stretch}
  .al-head-actions{width:100%}
  .al-head-actions button{flex:1}
  .al-bar{flex-direction:column;align-items:stretch}
  .al-tools{width:100%}
  .al-select{flex:1}
  .al-select select{width:100%}
  .al-more{gap:16px}
}

/* ---------- PERFIL ---------- */
.ph-wrap{display:flex;flex-direction:column;gap:28px;margin-top:28px}
.ph-fav{display:flex;flex-direction:column;gap:10px}
.ph{display:flex;flex-direction:column;gap:16px}
.ph-tabs{display:flex;gap:6px;padding:5px;border-radius:999px;align-self:flex-start;max-width:100%;overflow-x:auto;background:rgba(var(--ink-rgb),.06);scrollbar-width:none}
.ph-tabs button{all:unset;cursor:pointer;white-space:nowrap;padding:10px 18px;border-radius:999px;font-size:14px;font-weight:600;color:var(--text2)}
.ph-tabs button small{font-size:11px;font-weight:700;margin-left:4px;color:var(--text3)}
.ph-tabs button.on{background:var(--surface-hi);color:var(--text);box-shadow:0 4px 12px -6px rgba(var(--shadow-rgb),.5)}
:root[data-theme="dark"] .ph-tabs button.on{background:var(--surface2)}
.ph-tabs button:focus-visible{outline:2px solid var(--accent)}
.ph-tools{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-bottom:12px}
.ph-tools .al-chips{flex:1;min-width:0}
.ph-search{flex:0 1 280px;min-width:200px;height:44px}
.ph-more{display:flex;justify-content:center;margin-top:16px}
.ph-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}
.ph-kpis div{padding:16px;border-radius:18px;background:var(--surface);border:1px solid var(--border);display:flex;flex-direction:column}
.ph-kpis b{font-family:var(--f-display);font-weight:600;font-size:30px;color:var(--text);line-height:1.1}
.ph-kpis span{font-size:12.5px;color:var(--text3)}
.ph-charts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.ph-chart{padding:18px;border-radius:18px;background:var(--surface);border:1px solid var(--border);display:flex;flex-direction:column;gap:10px}
.ph-chart h4{font-size:14px;font-weight:700;color:var(--text);margin:0 0 4px}
.ph-bar{display:grid;grid-template-columns:96px 1fr 32px;align-items:center;gap:10px;font-size:13px;color:var(--text2)}
.ph-bar i{height:10px;border-radius:999px;background:rgba(var(--ink-rgb),.08);position:relative;overflow:hidden}
.ph-bar i::after{content:'';position:absolute;inset:0;width:var(--w);border-radius:inherit;background:var(--accent)}
.ph-bar b{text-align:right;color:var(--text)}
.ph-cols{display:flex;align-items:flex-end;gap:10px;height:140px}
.ph-col{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;height:100%;font-size:12px;color:var(--text3)}
.ph-col i{width:100%;max-width:38px;height:var(--h);min-height:4px;border-radius:8px 8px 4px 4px;background:var(--accent)}
.ph-col b{color:var(--text);font-size:12.5px}
.ph-tags{display:flex;flex-wrap:wrap;gap:6px}
.ph-tags span{padding:5px 10px;border-radius:999px;background:rgba(var(--ink-rgb),.06);font-size:12.5px;color:var(--text2)}
.ph-tags b{color:var(--text)}
@media (max-width:900px){.ph-charts{grid-template-columns:1fr}}
@media (max-width:640px){
  .ph-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ph-tabs{align-self:stretch}
  .ph-tabs button{flex:1;text-align:center;padding:9px 10px}
  .ph-search{flex:1 1 100%}
}

/* ---------- INÍCIO ---------- */
.feed-container:has(.hm){display:block}
.hm{max-width:1240px;margin:0 auto;display:flex;flex-direction:column;gap:30px}
.hm-hero{
  display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"main kpis" "actions kpis";gap:18px 28px;align-items:center;
  padding:clamp(20px,3vw,32px);border-radius:28px;
  background:radial-gradient(520px 260px at 100% 0%, rgba(var(--accent-rgb),.18), transparent 70%),var(--surface);
  border:1px solid var(--border);box-shadow:0 20px 50px -36px rgba(var(--shadow-rgb),.9);
}
.hm-hero-main{grid-area:main;display:flex;align-items:center;gap:16px}
.hm-avatar{width:64px;height:64px;border-radius:50%;overflow:hidden;flex-shrink:0;background:var(--accent);color:var(--on-accent);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:24px;box-shadow:0 0 0 4px rgba(var(--accent-rgb),.18)}
.hm-avatar img{width:100%;height:100%;object-fit:cover}
.hm-date{font-family:var(--f-mono);font-size:11.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--text3);margin:0 0 2px}
.hm-hero h1{font-family:var(--f-display);font-weight:600;font-size:clamp(28px,3.6vw,44px);letter-spacing:-.025em;line-height:1.05;color:var(--text);margin:0}
.hm-actions{grid-area:actions;display:flex;gap:8px;flex-wrap:wrap}
.hm-actions button{padding:10px 18px;font-size:14px}
.hm-kpis{grid-area:kpis;display:grid;grid-template-columns:repeat(2,minmax(120px,1fr));gap:8px}
.hm-kpis button{all:unset;box-sizing:border-box;cursor:pointer;display:flex;flex-direction:column;padding:14px 16px;border-radius:16px;background:var(--bg);border:1px solid var(--border);transition:transform .15s ease,border-color .15s ease}
.hm-kpis button:hover{transform:translateY(-2px);border-color:rgba(var(--accent-rgb),.5)}
.hm-kpis button:focus-visible{outline:2px solid var(--accent)}
.hm-kpis b{font-family:var(--f-display);font-weight:600;font-size:26px;line-height:1.1;color:var(--text)}
.hm-kpis span{font-size:12px;color:var(--text3)}
.hm-block{display:flex;flex-direction:column;gap:12px}
.hm-going{gap:12px}
.hm-go{flex-shrink:0;width:156px;display:flex;flex-direction:column;gap:5px;cursor:pointer;scroll-snap-align:start}
.hm-go-img{position:relative;display:block;aspect-ratio:2/3;border-radius:16px;overflow:hidden;background:var(--bg3);border:1px solid var(--border)}
.hm-go-img img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:1;transition:transform .35s ease}
.hm-go:hover .hm-go-img img{transform:scale(1.03)}
.hm-go-title{font-size:13.5px;font-weight:700;color:var(--text);line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hm-go-meta{font-size:12px;color:var(--text3)}
.hm-go-step{align-self:flex-start;margin-top:2px;padding:7px 12px;border-radius:999px;border:1px solid rgba(var(--accent-rgb),.4);background:rgba(var(--accent-rgb),.1);color:var(--accent);font-family:var(--f-corpo);font-weight:700;font-size:12px;cursor:pointer}
.hm-go-step:hover{background:var(--accent);color:var(--on-accent)}
.hm-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:16px;align-items:start}
.hm-main,.hm-side{display:flex;flex-direction:column;gap:16px;min-width:0}
.hm .glass-panel{opacity:1 !important;animation:none !important;width:100%;max-width:100%;background:var(--surface) !important;border:1px solid var(--border) !important;border-radius:22px !important;box-shadow:none !important;backdrop-filter:none !important}
.hm .panel-header{border-bottom:1px solid var(--border)}
.hm .panel-title{font-family:var(--f-display);font-weight:600;font-size:18px;letter-spacing:-.01em;text-transform:none}
@media (max-width:1000px){
  .hm-hero{grid-template-columns:1fr;grid-template-areas:"main" "kpis" "actions"}
  .hm-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
  .hm-grid{grid-template-columns:1fr}
}
@media (max-width:640px){
  .hm{gap:22px}
  .hm-hero{padding:18px;border-radius:22px;gap:14px}
  .hm-avatar{width:52px;height:52px;font-size:20px}
  .hm-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .hm-actions button{flex:1 1 auto}
  .hm-go{width:132px}
}
#page-feed > .page-header{display:none}
@media (max-width:768px){
  .al-more-group{width:100%}
  .al-dates{width:100%}
  .al-dates .st-input{flex:1;min-width:0;width:100%;padding:9px 8px;font-size:13.5px}
  .al-select{min-width:0;padding:0 10px}
  .al-select select{font-size:13.5px;min-width:0}
  .al-more-btn{padding:0 12px}
}
@media (max-width:768px){
  .al-search{flex:none;width:100%;min-width:0}
  .al-select > svg{display:none}
  .al-head-actions button{white-space:nowrap;font-size:13.5px;padding:10px 12px}
}

/* Álbum: tipos ocupam a linha toda; status mora dentro de "Filtros" */
#albumFilterTypeRow .al-chip{flex:1 0 auto;justify-content:center;padding:11px 16px;font-size:14px}
.al-more-status{flex-basis:100%}
.al-more-status .al-chip{padding:7px 12px}

/* Início: sem buraco embaixo da atividade */
.hm-grid{align-items:stretch}
.hm-main{display:flex;flex-direction:column}
.hm .activity-panel{max-height:none;flex:1 1 0;min-height:280px;display:flex;flex-direction:column;overflow:hidden}
.hm .activity-panel .panel-content{max-height:none;flex:1 1 auto;min-height:0;overflow-y:auto}
@media (max-width:1000px){
  .hm .activity-panel{flex:none;max-height:440px}
}

/* Menu "Ordenar" (substitui o <select> nativo) */
.al-sort{position:relative}
.al-select{font-family:var(--f-corpo);font-size:14px;font-weight:600;color:var(--text);transition:border-color .15s ease}
button.al-select{appearance:none;-webkit-appearance:none}
.al-select:hover,.al-select[aria-expanded="true"]{border-color:var(--accent)}
.al-select .al-chev{width:16px;height:16px;color:var(--text3);transition:transform .2s ease}
.al-select[aria-expanded="true"] .al-chev{transform:rotate(180deg)}
.al-select span{white-space:nowrap}
.al-menu{
  position:absolute;z-index:60;top:calc(100% + 6px);left:0;min-width:max(100%,220px);padding:6px;border-radius:16px;
  background:var(--surface-hi);border:1px solid var(--border);box-shadow:0 20px 44px -18px rgba(var(--shadow-rgb),.7);
  display:flex;flex-direction:column;gap:2px;animation:alMenuIn .16s cubic-bezier(.2,.8,.2,1);
}
:root[data-theme="dark"] .al-menu{background:var(--surface2)}
.al-menu.hidden{display:none}
@keyframes alMenuIn{from{opacity:0;transform:translateY(-4px)}}
.al-menu-opt{
  display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:11px 12px;border:none;border-radius:11px;
  background:transparent;color:var(--text);font-family:var(--f-corpo);font-size:14px;font-weight:500;text-align:left;cursor:pointer;
}
.al-menu-opt:hover,.al-menu-opt:focus-visible{background:rgba(var(--accent-rgb),.1);outline:none}
.al-menu-opt svg{width:16px;height:16px;fill:none;stroke:var(--accent);stroke-width:3;stroke-linecap:round;stroke-linejoin:round;opacity:0}
.al-menu-opt.on{font-weight:700;color:var(--accent)}
.al-menu-opt.on svg{opacity:1}
@media (max-width:768px){
  .al-sort{flex:1;min-width:0}
  .al-sort .al-select{width:100%;justify-content:flex-start}
  .al-sort .al-select span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;text-align:left}
  .al-menu{min-width:100%}
}
