.agency-backdrop{position:fixed;inset:0;z-index:80;background:rgba(20,25,22,.64);backdrop-filter:blur(8px);display:grid;place-items:center;padding:20px}.agency-modal{width:min(1120px,100%);max-height:min(92vh,940px);overflow:hidden;border:1px solid #dfe5da;border-radius:24px;background:#f7f8f3;box-shadow:0 30px 100px rgba(0,0,0,.35);color:#222b25;display:flex;flex-direction:column}.agency-header{display:flex;align-items:center;justify-content:space-between;padding:22px 28px;border-bottom:1px solid #e2e6dc;background:#fff}.agency-header h2{font-size:24px;letter-spacing:-.035em;margin:5px 0 0}.agency-kicker{font-size:10px;font-weight:850;letter-spacing:.14em;color:#758074}.agency-close{border:0;background:#f0f3ed;border-radius:50%;height:38px;width:38px;font-size:26px;line-height:1;color:#586256;cursor:pointer}.agency-body{padding:24px 28px 18px;overflow:auto}.agency-loading{padding:80px 24px;text-align:center;color:#5e6c5e;font-weight:700}.agency-spinner{display:inline-block;width:16px;height:16px;border:2px solid #cbd5c6;border-top-color:#345b3e;border-radius:50%;animation:agency-spin .75s linear infinite;vertical-align:-3px;margin-right:9px}@keyframes agency-spin{to{transform:rotate(360deg)}}.agency-auth-layout{display:grid;grid-template-columns:1fr 1fr;min-height:430px;border-radius:18px;overflow:hidden;background:#fff}.agency-auth-art{padding:48px 42px;background:radial-gradient(ellipse at 85% 18%,rgba(184,227,74,.33),transparent 35%),linear-gradient(142deg,#20392c,#344c3b 66%,#21372c);color:#f6f8ee;display:flex;flex-direction:column;justify-content:center}.agency-auth-mark{font-size:48px;font-weight:900;letter-spacing:-.08em;color:#b8e34a;margin-bottom:38px}.agency-auth-art .agency-kicker{color:#c8d6c2}.agency-auth-art h3{font-size:34px;line-height:1.04;letter-spacing:-.05em;margin:12px 0}.agency-auth-art p{max-width:390px;color:#d4dfd0;line-height:1.6}.agency-auth-panel{padding:44px 40px;align-self:center}.agency-auth-panel h3{font-size:28px;letter-spacing:-.04em;margin:8px 0}.agency-auth-panel p,.agency-auth-panel small{color:#647064;line-height:1.55}.agency-form{display:grid;gap:13px}.agency-form label{display:grid;gap:6px;color:#566055;font-size:12px;font-weight:700}.agency-form input,.agency-form select{width:100%;min-width:0;border:1px solid #d8ded4;border-radius:10px;background:#fff;color:#202820;padding:11px 12px;font:inherit;outline:none}.agency-form input:focus,.agency-form select:focus{border-color:#76985b;box-shadow:0 0 0 3px rgba(184,227,74,.19)}.agency-form input[type=color]{height:42px;padding:4px}.agency-primary,.agency-secondary{border:1px solid transparent;border-radius:10px;min-height:40px;padding:10px 14px;font:inherit;font-size:12px;font-weight:800;cursor:pointer;transition:transform .15s,background .15s}.agency-primary{background:#263d2e;color:#fff}.agency-primary:hover{background:#365740;transform:translateY(-1px)}.agency-secondary{background:#fff;border-color:#d7ded4;color:#344338}.agency-secondary:hover{background:#f0f4eb}.agency-primary:disabled,.agency-secondary:disabled{opacity:.45;cursor:not-allowed}.agency-message{margin:0 0 16px;padding:11px 14px;border-radius:10px;font-size:12px;line-height:1.45;background:#edf1e9;color:#455143}.agency-message.success{background:#e7f4de;color:#2b5d34}.agency-message.error{background:#fff0eb;color:#922e20}.agency-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}.agency-toolbar p{margin:5px 0 0;color:#6f7a6e;font-size:12px}.agency-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:18px;min-height:360px}.agency-client-sidebar,.agency-detail,.agency-section{background:#fff;border:1px solid #e1e6dc;border-radius:16px}.agency-client-sidebar{padding:16px 12px}.agency-section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 13px}.agency-section-heading h3,.agency-section-heading h4{margin:3px 0 0;font-size:17px;letter-spacing:-.025em}.agency-section-heading h3 span{font-size:11px;color:#748071;background:#f1f4ee;border-radius:99px;padding:3px 7px;vertical-align:2px}.agency-add{border:0;border-radius:9px;width:31px;height:31px;font-size:22px;background:#b8e34a;color:#203525;cursor:pointer}.agency-client-list{display:grid;gap:5px}.agency-client-row{width:100%;display:grid;grid-template-columns:36px 1fr 12px;align-items:center;gap:9px;text-align:left;border:1px solid transparent;border-radius:11px;background:transparent;padding:9px 7px;color:#29342a;cursor:pointer}.agency-client-row:hover,.agency-client-row.selected{background:#f1f5ec;border-color:#e1e8db}.agency-client-row strong,.agency-project-row strong,.agency-template-row strong{display:block;font-size:12px}.agency-client-row small,.agency-project-row small,.agency-template-row small{display:block;margin-top:4px;color:#7a8578;font-size:10px}.agency-client-avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:var(--client-accent,#b8e34a);color:#283429;font-weight:900}.agency-client-row>b{font-size:20px;color:#85917f}.agency-detail{padding:18px;min-width:0}.agency-client-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;padding-bottom:16px;border-bottom:1px solid #edf0e9}.agency-client-heading h3{font-size:23px;letter-spacing:-.035em;margin:4px 0}.agency-client-heading p{font-size:11px;color:#788276;margin:5px 0 0}.agency-content-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(250px,.85fr);gap:14px;margin-top:16px}.agency-section{padding:14px;min-width:0}.agency-project-create{display:grid;grid-template-columns:minmax(0,1fr) 115px auto;gap:7px;margin:0 0 10px}.agency-project-list,.agency-template-list{display:grid;gap:7px}.agency-project-row,.agency-template-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid #eff1ec}.agency-project-row:last-child,.agency-template-row:last-child{border-bottom:0}.agency-row-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px}.agency-primary.compact,.agency-secondary.compact{min-height:31px;padding:7px 9px;font-size:10px}.agency-template-create{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;margin-bottom:8px}.agency-template-icon{width:30px;height:30px;display:grid;place-items:center;border-radius:9px;background:#f0f4e9;color:#435c36}.agency-template-row>div{flex:1}.agency-empty-small{padding:18px 8px;text-align:center;font-size:11px;color:#8a9488;background:#fafbf8;border-radius:10px}.agency-state-card{max-width:520px;margin:26px auto;padding:38px 30px;text-align:center;background:#fff;border:1px solid #e2e7de;border-radius:18px}.agency-state-card h3{font-size:23px;letter-spacing:-.035em;margin:10px 0}.agency-state-card p{color:#6e786d;line-height:1.6;font-size:13px}.agency-state-icon{margin:0 auto 10px;width:38px;height:38px;display:grid;place-items:center;border-radius:13px;background:#edf3e6;color:#426143;font-weight:900}.agency-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:17px}.agency-client-form{max-width:640px;margin:4px auto}.agency-form-title{font-size:15px;font-weight:850;color:#28382b;margin:0 0 4px}.secondary-title{border-top:1px solid #e8ece4;padding-top:16px;margin-top:4px}.agency-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.agency-share-card{margin-top:12px;border:1px solid #dce6d5;background:#f7faf3;border-radius:12px;padding:12px}.agency-share-card strong{font-size:12px}.agency-share-card small{display:block;margin-top:3px;color:#6f7a6d;font-size:10px}.agency-share-input{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;margin-top:9px}.agency-share-input input{min-width:0;border:1px solid #d8dfd3;border-radius:8px;padding:8px 9px;font-size:10px;background:#fff}.agency-warning{font-size:10px;color:#8d4a28;line-height:1.45;margin:9px 0 0}.agency-footer{display:flex;justify-content:space-between;gap:10px;padding:12px 28px;border-top:1px solid #e2e6dc;color:#879183;font-size:9px;letter-spacing:.04em}.agency-footer span:first-child{font-weight:900;color:#647260;letter-spacing:.1em}.agency-auth-panel .agency-form{margin:22px 0}.agency-auth-panel .agency-form button{margin-top:4px}.agency-auth-panel small{display:block;font-size:10px}.agency-state-card .agency-message{margin-bottom:15px}
@media(max-width:860px){.agency-modal{max-height:95vh}.agency-body{padding:18px}.agency-layout{grid-template-columns:205px minmax(0,1fr)}.agency-content-grid{grid-template-columns:1fr}.agency-project-create{grid-template-columns:minmax(0,1fr) 110px auto}.agency-row-actions .agency-primary{white-space:nowrap}.agency-footer{padding:10px 18px}}
@media(max-width:640px){.agency-backdrop{padding:0}.agency-modal{max-height:100dvh;height:100dvh;border-radius:0;border:0}.agency-header{padding:16px 18px}.agency-header h2{font-size:20px}.agency-body{padding:14px}.agency-auth-layout{grid-template-columns:1fr}.agency-auth-art{padding:22px 24px;min-height:210px}.agency-auth-mark{font-size:34px;margin-bottom:14px}.agency-auth-art h3{font-size:25px}.agency-auth-panel{padding:24px}.agency-layout{grid-template-columns:1fr}.agency-client-sidebar{padding:12px}.agency-client-list{display:flex;overflow:auto}.agency-client-row{min-width:190px}.agency-detail{padding:12px}.agency-client-heading{align-items:flex-start}.agency-client-heading h3{font-size:19px}.agency-project-create{grid-template-columns:1fr 110px}.agency-project-create button{grid-column:1/-1}.agency-project-row{align-items:flex-start;flex-direction:column}.agency-row-actions{width:100%;justify-content:flex-start}.agency-form-grid{grid-template-columns:1fr}.agency-footer{flex-wrap:wrap;font-size:8px;padding:9px 14px}.agency-footer span:nth-child(2){display:none}.agency-toolbar{align-items:center}.agency-share-input{grid-template-columns:1fr auto}}

.agency-team-panel,.agency-audit-panel{margin-top:16px;padding:16px;background:#fff;border:1px solid #e1e6dc;border-radius:16px}.agency-invite-form{display:grid;grid-template-columns:minmax(0,1fr) 180px auto;align-items:end;gap:9px}.agency-invite-form label{display:grid;gap:6px;color:#566055;font-size:11px;font-weight:750}.agency-invite-form input,.agency-invite-form select,.agency-audit-form select{width:100%;min-width:0;border:1px solid #d8ded4;border-radius:9px;background:#fff;color:#202820;padding:9px 10px;font:inherit;font-size:12px}.agency-team-note{font-size:10px;color:#738071;line-height:1.5;margin:9px 0 10px}.agency-team-list,.agency-invite-list,.agency-audit-list{display:grid;gap:0}.agency-team-row{display:flex;align-items:center;gap:10px;padding:9px 0;border-top:1px solid #eff1ec}.agency-team-row>div{flex:1;min-width:0}.agency-team-row strong{display:block;overflow-wrap:anywhere;font-size:11px}.agency-team-row small{display:block;margin-top:3px;color:#7b8579;font-size:10px}.agency-role-pill,.agency-invite-status{font-size:9px;font-weight:800;color:#52624f;background:#eff4e9;border-radius:99px;padding:5px 8px;white-space:nowrap}.agency-invite-status.revoked{background:#f5eeee;color:#8e5953}.agency-invite-status.accepted{background:#e8f4e4;color:#3c7340}.agency-audit-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-bottom:8px}.agency-audit-row{display:grid;grid-template-columns:minmax(160px,.7fr) minmax(150px,1fr);gap:5px 14px;padding:11px 0;border-top:1px solid #eff1ec}.agency-audit-row strong{display:block;font-size:11px}.agency-audit-row small,.agency-audit-row>span{color:#758074;font-size:10px}.agency-audit-row p{grid-column:1/-1;margin:0;padding:9px 11px;border-radius:9px;background:#f7f9f4;color:#475348;font-size:11px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:640px){.agency-invite-form{grid-template-columns:1fr 1fr}.agency-invite-form button{grid-column:1/-1}.agency-team-row{flex-wrap:wrap}.agency-team-row>div{min-width:150px}.agency-audit-row{grid-template-columns:1fr}.agency-audit-row p{grid-column:1}.agency-audit-form{grid-template-columns:1fr}.agency-audit-form button{width:100%}}

/* Milestone M3: Visual Saved Arts Gallery & Brand Identity Directory */
.agency-project-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px;margin-top:10px}
.agency-project-card{display:flex;flex-direction:column;background:#fff;border:1px solid #dce2d7;border-radius:12px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04);transition:transform .15s,box-shadow .15s}
.agency-project-card:hover{transform:translateY(-2px);box-shadow:0 6px 16px rgba(0,0,0,.08);border-color:#b5c4ad}
.agency-project-card-thumb{width:100%;height:150px;background:#f2f5ee;display:grid;place-items:center;overflow:hidden;border-bottom:1px solid #edf1ea}
.project-thumbnail{width:100%;height:100%;display:grid;place-items:center;background-size:cover;background-position:center;overflow:hidden}
.project-thumbnail.is-portrait{aspect-ratio:800/1130}
.project-thumbnail.is-square{aspect-ratio:1/1}
.project-thumbnail-svg{width:100%;height:100%;display:block;pointer-events:none}
.thumbnail-placeholder{background:#edf2ea;color:#7a8678;display:grid;place-items:center;font-size:11px;font-weight:700}
.thumbnail-empty{color:#889485;font-size:10px;font-weight:800}
.agency-project-card-info{padding:10px 12px;flex:1;display:flex;flex-direction:column;gap:4px}
.agency-project-card-title{font-size:12px;font-weight:800;color:#222c23;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agency-project-card-meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:10px}
.agency-project-card-meta small{color:#768374}
.agency-format-badge{font-size:9px;font-weight:800;background:#e9efe4;color:#35532f;padding:2px 6px;border-radius:4px}
.agency-status-badge{font-size:9px;font-weight:800;padding:2px 6px;border-radius:99px}
.agency-status-badge.status-draft{background:#edf2ea;color:#4f5d4e}
.agency-status-badge.status-awaiting_client{background:#fdf3d8;color:#875a10}
.agency-status-badge.status-approved{background:#e2f4da;color:#23612a}
.agency-status-badge.status-changes_requested{background:#fde8e5;color:#9b2c1f}
.agency-project-card-actions{padding:8px 12px;border-top:1px solid #f0f3ed;display:flex;gap:6px;background:#fafbf8}
.agency-project-card-actions button{flex:1;font-size:10px;text-align:center;padding:6px 4px}
.agency-brand-banner{display:flex;align-items:center;gap:12px;background:#f7f9f5;border:1px solid #e1e7dc;border-radius:12px;padding:10px 14px;margin-top:10px}
.agency-brand-banner-logo{max-width:100%;max-height:100%;object-fit:contain}
.agency-brand-banner-nologo{font-size:8px;font-weight:800;color:#7e8b7d}
.agency-brand-fonts{font-size:10px;font-weight:500;color:#768374}
.agency-palette-chips{display:flex;align-items:center;gap:5px;margin-top:4px}
.agency-palette-chip{width:14px;height:14px;border-radius:50%;border:1px solid rgba(0,0,0,0.15);display:inline-block}
.agency-manual-btn{text-decoration:none;display:inline-flex;align-items:center;gap:4px}
.agency-asset-pdf{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#fdeeee;border-radius:6px}
.pdf-icon{font-size:24px;line-height:1}
.pdf-tag{font-size:8px;font-weight:900;color:#c92a2a;background:#fff;padding:1px 5px;border-radius:3px;margin-top:2px}

