/* =========================================================
   Carlos Cruz · Brand Theme v6.5
   Identidade global. Apenas apresentação; sem regras de negócio.
   ========================================================= */
:root{
  --brand-ink:#111111;
  --brand-ink-soft:#1e1e1e;
  --brand-gold:#d2a575;
  --brand-gold-hover:#be8e5b;
  --brand-gold-soft:#f3e4d2;
  --brand-canvas:#f7f5f2;
  --brand-surface:#ffffff;
  --brand-border:#e8e2db;
  --brand-muted:#6b7280;
}

html,body{background:var(--brand-canvas)}
body{color:var(--brand-ink)}
::selection{background:rgba(210,165,117,.34);color:#111}
a{color:#8a6241}
a:hover{color:#68482f}

/* Global controls */
.btn-primary{background:var(--brand-gold);border-color:var(--brand-gold);color:#111;box-shadow:0 7px 18px rgba(138,98,65,.13)}
.btn-primary:hover{background:var(--brand-gold-hover);border-color:var(--brand-gold-hover);color:#111}
.btn-secondary{border-color:var(--brand-border);color:#2d2925}
.btn-secondary:hover{background:#faf8f5;border-color:#ddd2c6}
.btn-ghost:hover{background:#f6f1eb}
.field input:focus,.field select:focus,.field textarea:focus,.filter-bar input:focus,.filter-bar select:focus,.reset-form input:focus,.kanban-filters input:focus,.kanban-filters select:focus{border-color:var(--brand-gold);box-shadow:0 0 0 3px rgba(210,165,117,.16)}
.eyebrow{color:#8a6241}
.badge-info{background:var(--brand-gold-soft);color:#795439}
.entity-initial,.client-initial-large,.client-top-initial{background:var(--brand-gold-soft);color:#795439}
.task-title:hover{color:#8a6241}
.priority-normal{background:var(--brand-gold-soft);color:#795439}

/* Reusable brand assets */
.brand-logo{display:block;width:auto;max-width:100%;object-fit:contain}
.brand-logo-dark{height:31px}
.brand-logo-light{height:36px}
.brand-logo-link{display:inline-flex;align-items:center;line-height:0}

/* Auth / setup / error */
.auth-page{min-height:100vh;background:#111}
.auth-shell{min-height:100vh;display:grid;grid-template-columns:minmax(320px,.88fr) minmax(420px,1.12fr);padding:0}
.auth-visual{position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;padding:48px;background:#111;color:#fff}
.auth-visual:before{content:"";position:absolute;width:430px;height:430px;border-radius:50%;right:-190px;top:-160px;background:radial-gradient(circle,rgba(210,165,117,.28),rgba(210,165,117,0) 68%)}
.auth-visual:after{content:"";position:absolute;width:360px;height:360px;border:1px solid rgba(210,165,117,.28);border-radius:50%;left:-220px;bottom:-190px}
.auth-visual>*{position:relative;z-index:1}
.auth-visual-logo{width:254px;max-width:78%}
.auth-visual-copy{max-width:440px}
.auth-visual-copy .auth-kicker{color:var(--brand-gold);font-size:11px;font-weight:750;letter-spacing:.14em;text-transform:uppercase;margin-bottom:12px}
.auth-visual-copy h2{font-size:34px;line-height:1.12;letter-spacing:-.035em;margin:0 0 14px;color:#fff}
.auth-visual-copy p{color:#bcb8b4;font-size:14px;line-height:1.65;margin:0}
.auth-visual-foot{font-size:11px;color:#77726d}
.auth-form-zone{display:grid;place-items:center;padding:40px;background:var(--brand-canvas)}
.auth-card{width:min(480px,100%);border:1px solid var(--brand-border);border-radius:22px;padding:34px;background:#fff;box-shadow:0 22px 70px rgba(17,17,17,.08)}
.auth-card-logo{display:none;margin-bottom:28px}
.auth-card h1{font-size:28px;letter-spacing:-.03em;margin-bottom:8px}
.auth-card>.muted{line-height:1.55;margin-bottom:22px}
.auth-card form{display:grid;gap:16px}
.auth-card .btn-primary{width:100%;min-height:46px;margin-top:2px}
.auth-card-footer{margin:22px 0 0;padding-top:18px;border-top:1px solid #eee9e3;font-size:12px}
.auth-error-code{display:inline-flex;align-items:center;justify-content:center;min-width:72px;height:34px;padding:0 12px;border-radius:999px;background:var(--brand-gold-soft);color:#795439;font-size:12px;font-weight:800;letter-spacing:.08em;margin-bottom:16px}

/* Admin brand override */
.admin-ui-v2{
  --admin-bg:var(--brand-canvas);
  --admin-card:#fff;
  --admin-text:var(--brand-ink);
  --admin-muted:var(--brand-muted);
  --admin-border:var(--brand-border);
  --admin-primary:var(--brand-gold);
  --admin-primary-hover:var(--brand-gold-hover);
}
.admin-ui-v2 .sidebar-brand{min-height:96px;padding:24px 22px;gap:0}
.admin-ui-v2 .sidebar-brand-logo{width:158px;height:auto;display:block}
.admin-ui-v2 .sidebar-brand-meta{display:block;margin-top:8px;color:#8a837c;font-size:10px;font-weight:600;letter-spacing:.06em;text-transform:uppercase}
.admin-ui-v2 .nav-item.is-active{background:var(--brand-gold-soft);color:#68482f}
.admin-ui-v2 .nav-item.is-active>.material-symbols-outlined{color:#a37249}
.admin-ui-v2 .nav-item:hover{background:#faf8f5}
.admin-ui-v2 .nav-count{background:var(--brand-ink);color:#fff}
.admin-ui-v2 .sidebar-account{background:#faf8f5}
.admin-ui-v2 .avatar,.admin-ui-v2 .avatar-sidebar{background:var(--brand-gold-soft);color:#795439}
.admin-ui-v2 .notification-bell:hover{background:#faf8f5}
.admin-ui-v2 .btn-primary{background:var(--brand-gold);border-color:var(--brand-gold);color:#111;box-shadow:0 6px 14px rgba(138,98,65,.14)}
.admin-ui-v2 .btn-primary:hover{background:var(--brand-gold-hover);border-color:var(--brand-gold-hover);color:#111}
.admin-ui-v2 .btn-secondary:hover,.admin-ui-v2 .btn-ghost:hover{background:#faf8f5}
.dashboard-v2 .dashboard-hero{background:linear-gradient(135deg,#fff 0%,#fcfaf7 100%)}
.dashboard-v2 .dashboard-kicker,.client-page-kicker{border-color:#ead4bd;background:var(--brand-gold-soft);color:#795439}
.dashboard-v2 .quick-create-menu>a>.material-symbols-outlined,.dashboard-v2 .metric-icon-blue,.dashboard-v2 .dashboard-empty>.material-symbols-outlined,.client-empty-state>.material-symbols-outlined,.client-project-icon,.client-detail-metric-icon.blue{background:var(--brand-gold-soft);color:#9a6e48}
.dashboard-v2 .client-avatar-mini,.client-avatar-fallback,.client-detail-logo-fallback{background:var(--brand-gold-soft);color:#795439}
.dashboard-v2 .priority-normal{background:var(--brand-gold-soft);color:#795439}
.client-search-control input:focus,.client-select-control select:focus{border-color:var(--brand-gold);box-shadow:0 0 0 3px rgba(210,165,117,.14)}
.client-detail-tabs a.is-active{background:var(--brand-gold-soft);color:#795439}
.client-project-status.is-completed{background:var(--brand-gold-soft);color:#795439}
.client-activity-dot{background:#d9b58f;box-shadow:0 0 0 3px var(--brand-gold-soft)}

/* Client panel */
.client-topbar{background:rgba(255,255,255,.96);border-color:var(--brand-border);backdrop-filter:blur(10px);min-height:78px}
.client-system-brand{display:inline-flex;align-items:center;padding-right:16px;margin-right:4px;border-right:1px solid var(--brand-border)}
.client-system-brand img{width:126px;height:auto;display:block}
.client-brand-wrap{min-width:0}
.client-brand-wrap .client-identity{display:flex;align-items:center;gap:10px;min-width:0}
.client-brand-wrap strong{color:var(--brand-ink)}
.client-dashboard{padding-top:32px}
.client-dashboard-head h1{letter-spacing:-.025em}
.client-dashboard .metric-card,.client-dashboard .panel,.client-project-card,.task-card{border-color:var(--brand-border);box-shadow:0 1px 2px rgba(17,17,17,.025)}
.client-project-card{background:#fcfaf7}
.client-kanban-column,.kanban-column{background:#f2eee9;border-color:#e4ddd5}
.kanban-count{border-color:#dfd7cf}
.kanban-cards.is-drag-over{background:rgba(210,165,117,.12);outline-color:var(--brand-gold)}
.badge-client-request{background:#f6ede3;color:#795439}
.client-modal-backdrop{background:rgba(17,17,17,.62)}
.client-modal-dialog{border-color:var(--brand-border);box-shadow:0 24px 70px rgba(17,17,17,.28)}
.client-modal-close:hover{background:#faf8f5}
.notification-row.is-unread{background:#fffbf5}
.notification-row.is-unread .notification-dot{background:var(--brand-gold);box-shadow:0 0 0 4px rgba(210,165,117,.16)}
.toggle-row>input[type=checkbox]{accent-color:#a37249}

/* Brand strip used in notifications and client header */
.client-brand-lockup{display:flex;align-items:center;gap:14px;min-width:0}
.client-brand-lockup .brand-logo-dark{height:24px;width:auto;flex:none}
.client-brand-divider{width:1px;height:34px;background:var(--brand-border);flex:none}

@media(max-width:900px){
  .auth-shell{grid-template-columns:1fr;background:var(--brand-canvas)}
  .auth-visual{display:none}
  .auth-form-zone{min-height:100vh;padding:24px}
  .auth-card-logo{display:block}
  .auth-card-logo img{width:164px;height:auto}
  .client-system-brand{padding-right:10px}
  .client-system-brand img{width:104px}
}
@media(max-width:640px){
  .auth-card{padding:26px 22px;border-radius:18px}
  .client-system-brand{display:none}
  .client-brand-divider{display:none}
  .client-topbar{padding:10px 14px}
}

/* Final consistency */
body{font-family:"Geist",Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.admin-ui-v2 .sidebar-brand{flex-direction:column;align-items:flex-start;justify-content:center}
.admin-ui-v2 .sidebar-brand .brand-logo-link{width:100%}
.admin-ui-v2 .sidebar-brand-logo{max-width:100%}
.admin-ui-v2 input:focus,.admin-ui-v2 select:focus,.admin-ui-v2 textarea:focus{border-color:var(--brand-gold)!important;box-shadow:0 0 0 3px rgba(210,165,117,.14)!important;outline:none}
.admin-ui-v2 a:not(.btn):not(.nav-item):not(.notification-bell):not(.brand-logo-link){color:#8a6241}
.admin-ui-v2 a:not(.btn):not(.nav-item):not(.notification-bell):not(.brand-logo-link):hover{color:#68482f}
