/* AMARELO HUB · Phase 1 visual system
   Global shell and reusable primitives only. Feature layouts remain untouched. */
:root{
  color-scheme:light;
  font-family:Geist,"SF Pro Text","SF Pro Display",Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-synthesis:none;
  --ink:#111214;
  --muted:#6e7178;
  --line:#e8e8e4;
  --surface:#ffffff;
  --canvas:#f8f8f6;
  --yellow:#ffd52a;
  --am-yellow:#ffd52a;
  --am-yellow-hover:#f3c812;
  --am-yellow-soft:#fff5b8;
  --am-ink:#111214;
  --am-muted:#6e7178;
  --am-subtle:#f2f2ef;
  --am-line:#e8e8e4;
  --am-surface:#ffffff;
  --am-canvas:#f8f8f6;
  --am-positive:#238457;
  --am-warning:#b76b16;
  --am-danger:#c6454f;
  --am-info:#3568c8;
  --am-radius-sm:12px;
  --am-radius:18px;
  --am-radius-lg:24px;
  --am-shadow:0 1px 2px rgba(17,18,20,.03),0 12px 34px rgba(17,18,20,.035);
  --am-shadow-float:0 18px 55px rgba(17,18,20,.12);
  background:var(--am-canvas);
  color:var(--am-ink);
}

html,body{background:var(--am-canvas);color:var(--am-ink)}
body.hub-dark,body.hub-dark.agency-branded{
  color-scheme:light;
  background:
    radial-gradient(ellipse 42vw 30vh at 88% -8%,rgba(255,213,42,.09),transparent 75%),
    var(--am-canvas);
  color:var(--am-ink);
  background-attachment:fixed;
}
body,button,input,select,textarea{font-family:inherit}
h1,h2,h3,strong{color:var(--am-ink)}
small,.meta,.muted,.form-help,.work-help{color:var(--am-muted)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:2px solid #c39c00!important;
  outline-offset:3px;
}

/* Global application frame */
.hub-dark .shell{min-height:100dvh;background:transparent;color:var(--am-ink)}
.hub-dark .main{background:transparent;min-height:100dvh}
.hub-dark .content{max-width:1680px;padding-top:34px}

.hub-dark .shell .sidebar,
body.hub-dark.agency-branded .shell .sidebar{
  background:rgba(255,255,255,.97)!important;
  color:var(--am-ink)!important;
  border-color:var(--am-line)!important;
  box-shadow:none!important;
  -webkit-backdrop-filter:blur(18px) saturate(120%);
  backdrop-filter:blur(18px) saturate(120%);
  transition:transform .22s ease,width .22s ease,box-shadow .22s ease;
}
.hub-dark .sidebar nav{scrollbar-width:thin;scrollbar-color:#dadad4 transparent}
.hub-dark .portal-brand,.hub-dark .brand{color:var(--am-ink)}
.hub-dark .portal-brand strong,.hub-dark .brand strong{color:var(--am-ink)!important}
.hub-dark .portal-brand p,.hub-dark .portal-brand small,.hub-dark .brand-product{color:var(--am-muted)!important}
.hub-dark .sidebar .nav-label,
body.hub-dark.agency-branded .sidebar .nav-label{
  color:#96989d!important;
  font-size:10px;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.hub-dark .sidebar .nav-item,
body.hub-dark.agency-branded .sidebar .nav-item{
  color:#4f535a!important;
  background:transparent!important;
  border:1px solid transparent!important;
  border-radius:13px;
  min-height:43px;
  font-size:13px;
  font-weight:500;
  transition:background .16s ease,color .16s ease,transform .16s ease;
}
.hub-dark .sidebar .nav-item:hover,
body.hub-dark.agency-branded .sidebar .nav-item:hover{
  color:var(--am-ink)!important;
  background:#f5f5f1!important;
  transform:translateX(2px);
}
.hub-dark .sidebar .nav-item.active,
body.hub-dark.agency-branded .sidebar .nav-item.active{
  color:var(--am-ink)!important;
  background:linear-gradient(110deg,var(--am-yellow),#ffe786)!important;
  border-color:#f1cf35!important;
  box-shadow:0 5px 16px rgba(199,157,0,.12)!important;
  font-weight:700;
}
.hub-dark .sidebar .nav-item svg{stroke:currentColor!important}
.hub-dark .nav-group{border-color:var(--am-line)}
.hub-dark .nav-group summary{color:#7b7e84}
.hub-dark .sidebar-bottom,
body.hub-dark.agency-branded .sidebar-bottom{
  color:var(--am-ink)!important;
  border-color:var(--am-line)!important;
  background:transparent;
}
.hub-dark .sidebar-bottom p{color:var(--am-muted)!important}

/* Header: mostly flat, with a restrained glass treatment */
.hub-dark .topbar,
body.hub-dark.agency-branded .topbar{
  background:rgba(255,255,255,.84)!important;
  color:var(--am-ink)!important;
  border-color:var(--am-line)!important;
  box-shadow:0 1px 0 rgba(17,18,20,.02)!important;
  -webkit-backdrop-filter:blur(20px) saturate(135%);
  backdrop-filter:blur(20px) saturate(135%);
}
.hub-dark .header-workspace strong,
.hub-dark .header-profile-name,
.hub-dark .header-profile>span,
body.hub-dark.agency-branded .header-workspace strong,
body.hub-dark.agency-branded .header-profile-name{color:var(--am-ink)!important}
.hub-dark .header-workspace small,
.hub-dark .header-profile small,
body.hub-dark.agency-branded .header-workspace small,
body.hub-dark.agency-branded .header-profile small{color:var(--am-muted)!important;opacity:1}
.hub-dark .header-search,
.hub-dark .header-notices,
.hub-dark .mobile-menu-toggle,
body.hub-dark.agency-branded :is(.header-search,.header-notices,.mobile-menu-toggle){
  background:#f5f5f2!important;
  border:1px solid var(--am-line)!important;
  color:#45484e!important;
  box-shadow:none!important;
  border-radius:999px;
}
.hub-dark .header-search:hover,.hub-dark .header-notices:hover,.hub-dark .mobile-menu-toggle:hover{
  background:#ededE8!important;
  color:var(--am-ink)!important;
}
.hub-dark .header-search kbd{
  background:#fff;
  border-color:#dfdfda;
  color:#6b6e73;
  border-radius:7px;
  box-shadow:0 1px 1px rgba(0,0,0,.03);
}
.hub-dark .header-notices span{background:var(--am-yellow);color:var(--am-ink);box-shadow:none}
.hub-dark .header-profile{border-radius:999px;padding:4px 8px 4px 4px;transition:background .16s ease}
.hub-dark .header-profile:hover{background:#f3f3ef}
.hub-dark .header-profile>.header-avatar{
  background:#ecece7;
  border:2px solid #fff;
  color:var(--am-ink);
  box-shadow:0 0 0 1px var(--am-line);
}
.hub-dark .live-sync-status{color:#4f7d5a!important}
.hub-dark .live-sync-status:before{background:#68bc70;box-shadow:0 0 0 3px #68bc7020}

/* Editorial page headings */
.hub-dark .page-head{margin-bottom:30px}
.hub-dark .page-head h1,.agency-branded .page-head h1{
  color:var(--am-ink)!important;
  font-size:clamp(29px,3vw,42px);
  font-weight:720;
  letter-spacing:-.045em;
}
.hub-dark .page-head p:not(.eyebrow),.hub-dark .page-description{color:var(--am-muted)}
.hub-dark .eyebrow{
  color:#8b7b32!important;
  font-size:10px!important;
  font-weight:750;
  letter-spacing:.18em;
}
.hub-dark .page-head>.badge,.agency-branded .page-head>.badge{
  color:#695813!important;
  background:#fff9d8!important;
  border:1px solid #eee3a7!important;
  border-radius:999px;
  padding:8px 13px;
}

/* Reusable surfaces */
.hub-dark :is(.panel,.home-agencies,.welcome-profile,.metric,.agency-directory,.delivery-card,.resource-card,.team-card,.security-status,.calendar-shell,.calendar-wrap,.calendar-head,.task-filters,.work-overview,.client-agency-panel,.meta-toolbar,.personal-column,.finance-overview-card),
.agency-branded :is(.panel,.metric,.client-agency-panel){
  background:var(--am-surface)!important;
  color:var(--am-ink)!important;
  border:1px solid var(--am-line)!important;
  box-shadow:var(--am-shadow)!important;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}
.hub-dark :is(.panel-head,.home-panel-head,.calendar-head),
.agency-branded :is(.panel-head,.home-panel-head){
  background:transparent!important;
  border-color:var(--am-line)!important;
}
.hub-dark :is(.panel,.home-agencies,.welcome-profile,.metric,.agency-directory,.delivery-card,.resource-card,.team-card,.security-status,.calendar-shell,.calendar-wrap,.task-filters,.work-overview,.client-agency-panel,.meta-toolbar,.finance-overview-card){border-radius:var(--am-radius-lg)}
.hub-dark :is(.panel,.home-agencies,.welcome-profile,.metric,.agency-directory,.delivery-card,.resource-card,.team-card,.security-status,.calendar-shell,.calendar-wrap,.calendar-head,.task-filters,.work-overview,.client-agency-panel,.meta-toolbar,.personal-column,.finance-overview-card) :is(h2,h3,strong){color:var(--am-ink)}
.hub-dark :is(.panel,.home-agencies,.welcome-profile,.metric,.agency-directory,.delivery-card,.resource-card,.team-card,.security-status,.calendar-shell,.calendar-wrap,.calendar-head,.task-filters,.work-overview,.client-agency-panel,.meta-toolbar,.personal-column,.finance-overview-card) :is(p,small,.form-help){color:var(--am-muted)}
.hub-dark .metric{border-radius:18px!important}
.hub-dark .metrics .metric{background:#fff!important;border:1px solid var(--am-line)!important;padding:20px}
.hub-dark .metrics .metric strong{color:var(--am-ink);font-size:34px}
.hub-dark .metrics .metric:nth-child(even){background:#fbfbf9!important}

/* Controls */
.hub-dark .btn,
body.hub-dark.agency-branded .btn{
  min-height:42px;
  border-radius:999px;
  padding:10px 17px;
  font-weight:650;
  background:#fff!important;
  border:1px solid #deded9!important;
  color:#303238!important;
  box-shadow:0 1px 1px rgba(17,18,20,.02)!important;
  transition:background .15s ease,border-color .15s ease,transform .15s ease,box-shadow .15s ease;
}
.hub-dark .btn:hover,.hub-dark .btn:not(.primary):not(.danger):not(.panic-button):hover{
  background:#f4f4f0!important;
  border-color:#d2d2cc!important;
  transform:translateY(-1px);
}
.hub-dark .btn.primary,
body.hub-dark.agency-branded .btn.primary{
  background:var(--am-yellow)!important;
  border-color:#ebc725!important;
  color:var(--am-ink)!important;
  box-shadow:0 5px 15px rgba(195,153,0,.12)!important;
}
.hub-dark .btn.primary:hover{background:var(--am-yellow-hover)!important}
.hub-dark .btn.danger{background:#fff1f2!important;border-color:#f0c8cc!important;color:#a9333e!important}
.hub-dark input:not([type=checkbox]):not([type=range]),
.hub-dark select,.hub-dark textarea,
.hub-dark .task-filters input,.hub-dark .task-filters select,
.hub-dark .work-card select,.hub-dark .workspace-search-label input{
  background:#fff!important;
  color:var(--am-ink)!important;
  border:1px solid #deded9!important;
  border-radius:13px;
  min-height:44px;
  box-shadow:inset 0 1px 2px rgba(17,18,20,.025);
}
.hub-dark input::placeholder,.hub-dark textarea::placeholder{color:#a4a6aa}
.hub-dark label,.hub-dark .work-card label,.hub-dark .workspace-search-label{color:#55585f}

/* Tables, menus, indicators and dialogs */
.hub-dark table{color:var(--am-ink)}
.hub-dark th,.hub-dark .panel th{background:#f7f7f4!important;color:#72757b!important;border-color:var(--am-line)!important}
.hub-dark td,.hub-dark .panel td,.hub-dark .task-row{border-color:var(--am-line)!important;color:#34363b}
.hub-dark tr:hover td,.hub-dark .panel tr:hover td{background:#fafaf7!important}
.hub-dark .badge{border-radius:999px;border:1px solid transparent}
.hub-dark .badge.done{background:#eaf7ef;color:#23724c;border-color:#d4eedf}
.hub-dark .badge.pending{background:#fff0f1;color:#a33a43;border-color:#f5d9dc}
.hub-dark .badge.process{background:#edf3ff;color:#3b61aa;border-color:#dce7fb}
.hub-dark .badge.review{background:#f5effc;color:#76509c;border-color:#e8dcf6}
.hub-dark .badge.wait{background:#fff6df;color:#96651c;border-color:#f5e7bf}
.hub-dark dialog,.hub-dark .personal-note-menu,.hub-dark .offer-preview-dialog{
  background:rgba(255,255,255,.96)!important;
  color:var(--am-ink)!important;
  border:1px solid var(--am-line)!important;
  border-radius:var(--am-radius-lg);
  box-shadow:var(--am-shadow-float)!important;
  -webkit-backdrop-filter:blur(24px) saturate(130%);
  backdrop-filter:blur(24px) saturate(130%);
}
.hub-dark dialog :is(h2,h3,strong){color:var(--am-ink)}
.hub-dark dialog :is(p,small){color:var(--am-muted)}
.hub-dark dialog::backdrop{background:rgba(24,24,22,.3);backdrop-filter:blur(5px)}
.hub-dark .notice-panel,.hub-dark .notifications-panel{
  background:rgba(255,255,255,.97);
  color:var(--am-ink);
  border:1px solid var(--am-line);
  box-shadow:var(--am-shadow-float);
  -webkit-backdrop-filter:blur(20px);
  backdrop-filter:blur(20px);
}
.hub-dark .notification{border-color:var(--am-line);color:var(--am-ink)}
.hub-dark .notification.unread{background:#fffbed}
.hub-dark #toast{background:#151618;color:#fff;border:1px solid #151618;border-radius:999px;box-shadow:0 12px 35px rgba(0,0,0,.2)}

/* Preserve meaningful semantic color while removing dark card chrome */
.hub-dark .work-column,.hub-dark .personal-column{
  background:#f4f4f1!important;
  color:var(--am-ink);
  border-color:var(--am-line)!important;
  box-shadow:none!important;
}
.hub-dark .work-card,.hub-dark .personal-task,.hub-dark .grid-period-card{
  background:#fff!important;
  color:var(--am-ink)!important;
  border-color:var(--am-line)!important;
  box-shadow:0 1px 2px rgba(17,18,20,.03)!important;
}
.hub-dark .work-card :is(strong,p,button),.hub-dark .personal-task :is(strong,p,button){color:var(--am-ink)}
.hub-dark .personal-task-title{color:var(--am-ink)}
.hub-dark .progress-track,.hub-dark .progress{background:#ecece7;border-color:#deded8}
.hub-dark .progress-track>span,.hub-dark .progress>div{background:var(--am-yellow)}

/* Login follows the same identity without changing authentication. */
.login-page{background:var(--am-canvas)!important;color:var(--am-ink)}
.hub-dark .login-card,.login-page .login-card{background:#fff!important;color:var(--am-ink)!important;border:1px solid var(--am-line)!important;box-shadow:var(--am-shadow)!important}
.login-page .login-card :is(h1,h2,h3,strong){color:var(--am-ink)!important}
.login-page .login-card :is(p,small){color:var(--am-muted)!important}

/* Responsive frame */
@media(max-width:760px){
  body.hub-dark,body.hub-dark.agency-branded{background:var(--am-canvas)}
  .hub-dark .content{padding:22px 16px calc(100px + env(safe-area-inset-bottom,0px))}
  .hub-dark .topbar{min-height:68px}
  .hub-dark .shell .sidebar{box-shadow:12px 0 45px rgba(17,18,20,.14)!important}
  .hub-dark .mobile-dock,
  body.hub-dark.agency-branded .mobile-dock{
    background:rgba(255,255,255,.9)!important;
    color:#64676d!important;
    border-color:var(--am-line)!important;
    box-shadow:0 -8px 30px rgba(17,18,20,.06)!important;
    -webkit-backdrop-filter:blur(22px) saturate(135%);
    backdrop-filter:blur(22px) saturate(135%);
  }
  .hub-dark .mobile-dock button,
  body.hub-dark.agency-branded .mobile-dock button{color:#73767c!important}
  .hub-dark .mobile-dock button.active,
  body.hub-dark.agency-branded .mobile-dock button.active{background:var(--am-yellow-soft)!important;color:var(--am-ink)!important}
  .hub-dark .page-head h1{font-size:30px}
  .hub-dark .metrics .metric{padding:17px}
}

@media(prefers-reduced-motion:reduce){
  .hub-dark .shell .sidebar,.hub-dark .sidebar .nav-item,.hub-dark .btn{transition:none!important}
}

.library-scope-switch{display:flex;align-items:center;gap:8px;margin:0 0 16px;padding:10px 12px;border:1px solid var(--am-line,#e7e8eb);border-radius:12px;background:#fafafa}.library-scope-switch .btn{min-height:34px;padding:7px 13px;font-size:11px}.library-scope-switch small{margin-left:auto;color:#6f7278;font-size:11px}@media(max-width:700px){.library-scope-switch{align-items:stretch;flex-wrap:wrap}.library-scope-switch .btn{flex:1}.library-scope-switch small{width:100%;margin:0}}
/* Materials: one Drive structure with per-item visibility */
body.hub-dark .library-category-tile{background:#fff;color:#171717;border:1px solid #e4e4e1;box-shadow:0 1px 2px rgba(0,0,0,.03)}
body.hub-dark .library-category-tile strong{color:#171717}
body.hub-dark .library-category-tile small,body.hub-dark .library-category-tile>span:last-child{color:#707279}
body.hub-dark .library-category-tile:hover{border-color:#d1b200;background:#fffdf3}
body.hub-dark .library-access-card{background:#fff;color:#171717;border:1px solid #e4e4e1;box-shadow:0 1px 2px rgba(0,0,0,.03)}
body.hub-dark .library-access-card>strong,body.hub-dark .library-access-title{color:#171717}
body.hub-dark .library-access-card>small{color:#707279}
.library-sync-note{margin:5px 0 0;color:#6f7278;font-size:12px;line-height:1.45}
.library-visibility{border:1px solid #deded9;border-radius:999px;background:#f5f5f2;color:#4d5055;font:600 11px/1.1 inherit;padding:7px 10px;cursor:pointer;white-space:nowrap}
.library-visibility.shared{background:#fff6bf;border-color:#e4c62a;color:#5c4a00}
.library-visibility:hover{filter:brightness(.97)}
.library-access-card.is-folder{cursor:pointer;transition:border-color .15s ease,transform .15s ease,background .15s ease}
.library-access-card.is-folder:hover{border-color:#d1b200;background:#fffdf3;transform:translateY(-1px)}
.library-access-card.is-folder:focus-visible{outline:2px solid #e3c400;outline-offset:3px}
.library-open-hint{font-size:12px;font-weight:650;color:#666a70}
.library-loading{min-height:96px;display:flex;align-items:center;color:#74777d;font-size:13px}

/* Visor unificado de archivos de Drive (carpetas universales y materiales enlazados) */
.drive-thumb{position:relative;display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:4/3;border-radius:10px;overflow:hidden;background:#8881}
.material-drive-card .drive-thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:0}
.material-drive-card .drive-thumb.is-image img{object-fit:contain}
.drive-thumb-fallback{display:flex;flex-direction:column;align-items:center;gap:4px;opacity:.72}
.material-drive-card .drive-thumb-fallback svg{width:44px;height:44px}
.drive-thumb-fallback small{font-size:10px;font-weight:700;letter-spacing:.08em}
.drive-play{position:absolute;left:50%;top:50%;width:44px;height:44px;margin:-22px 0 0 -22px;border-radius:50%;background:#000000a6;box-shadow:0 2px 10px #0000004d;pointer-events:none}
.drive-play::after{content:"";position:absolute;left:17px;top:13px;border-style:solid;border-width:9px 0 9px 14px;border-color:transparent transparent transparent #fff}
.material-drive-card-top .library-visibility{position:absolute;bottom:7px;right:7px;z-index:3}
.material-drive-card>small{color:#74777d;font-size:11px;margin-top:-6px}
.drive-preview-stage{display:flex;justify-content:center;align-items:center;min-height:120px}
.drive-preview-stage .material-drive-frame{width:100%}
.drive-preview-error{width:100%}

.ui-next-try{width:100%;margin-bottom:8px}
