/* Shared panel appearance. Semantic status, task priority and department colors remain distinct. */
@font-face{font-family:Vazirmatn;src:url('fonts/vazirmatn/Vazirmatn-Variable.woff2') format('woff2');font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:IRANYekan;src:url('fonts/iranyekan/IRANYekanWebRegular.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:IRANYekan;src:url('fonts/iranyekan/IRANYekanWebBold.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap}
html,body,#agencyflow-root{font-family:var(--af-font,IRANYekan,Tahoma,sans-serif)}
#agencyflow-root{color:var(--af-text);background:var(--af-surface)}
#agencyflow-root :is(button,input,select,textarea){font-family:var(--af-font,IRANYekan,Tahoma,sans-serif)}
#agencyflow-root :is(.app-shell,.main-content,.content-area,.auth-shell,.af-footer){background:var(--af-surface);color:var(--af-text)}
#agencyflow-root :is(.panel,.modal-card,.af-panel-dialog,.auth-card,.topbar,.af-profile-popover,.notification-center,.global-search-results,.project-action-menu,.settings-summary-grid>button,.project-hub-card,.department-project-card,.employee-card,.ac-modal,.chat-conversation,.chat-directory,.chat-context-panel){background:var(--af-panel);color:var(--af-text);border-color:var(--af-line)}
#agencyflow-root :is(.modal-head,.af-panel-dialog>header,.project-edit-modal-card .modal-head,.chat-conversation-head,.notification-center>header,.global-search-results>header,.project-action-menu>button,.settings-tabs,.af-header-profile summary){background:var(--af-panel);color:var(--af-text);border-color:var(--af-line)}
#agencyflow-root :is(h1,h2,h3,h4,h5,h6,.af-task-detail-title,.af-detail-grid dd,.topbar-heading h1,.settings-section-head h3,.settings-tabs-title span,.settings-tabs strong,.af-profile-name,.af-profile-popover>strong){color:var(--af-text)}
#agencyflow-root :is(.eyebrow,.settings-hero>div:first-child>span,.settings-section-head>div>span,.edit-form-eyebrow,.exec-panel-head>div>span){color:var(--af-link)}
#agencyflow-root :is(.settings-hero p,.settings-section-head p,.task-page-head p,.af-detail-description,.af-detail-grid dt,.af-detail-subtitle,.af-long-details p,.af-task-open small,.af-board-caption,.af-task-summary,.af-task-toolbar>label,.af-project-period-toolbar>label,.af-header-profile summary>i,.af-profile-popover>small,.af-profile-popover>p){color:var(--af-muted)}
#agencyflow-root :is(input:not([type=color]):not([type=checkbox]):not([type=radio]),select,textarea){background:var(--af-soft);color:var(--af-text);border-color:var(--af-line);accent-color:var(--af-accent)}
#agencyflow-root :is(input,textarea)::placeholder{color:var(--af-muted);opacity:.8}
#agencyflow-root :is(input,select,textarea):focus{border-color:var(--af-focus);outline-color:var(--af-focus);box-shadow:0 0 0 3px color-mix(in srgb,var(--af-primary) 15%,transparent)}
#agencyflow-root :is(button,a,summary):focus-visible{outline:2px solid var(--af-focus);outline-offset:3px}
#agencyflow-root :is(input[type=checkbox],input[type=radio]){accent-color:var(--af-accent)}
#agencyflow-root :is(.primary-button,.auth-submit,.ac-modal>footer button.primary,.report-command-actions>button,.report-builder-modal>footer button:last-child,.report-preview-toolbar>button.pdf-button){background:var(--af-primary)!important;color:var(--af-on-primary)!important;border-color:var(--af-primary)!important;box-shadow:0 6px 18px color-mix(in srgb,var(--af-primary) 16%,transparent)}
#agencyflow-root :is(.secondary-button,.global-view-button,.icon-button,.finance-secondary){background:var(--af-panel);color:var(--af-link);border-color:var(--af-line)}
#agencyflow-root :is(.af-view-tabs,.auth-tabs,.finance-tabs,.status-tabs,.project-hub-status-tabs,.af-kanban-column,.chat-search,.chat-security-strip){background:var(--af-soft);border-color:var(--af-line)}
#agencyflow-root :is(.af-view-tabs>button,.auth-tabs>button,.finance-tabs>button,.status-tabs>button,.project-hub-status-tabs>button){color:var(--af-muted)}
#agencyflow-root :is(.af-view-tabs>button[aria-selected=true],.auth-tabs>button.active,.finance-tabs>button.active,.status-tabs>button.active,.project-hub-status-tabs>button.active,.settings-tabs>button.active,.ac-view-switch>button.active){background:var(--af-accent-soft);color:var(--af-link);border-color:var(--af-accent)}
#agencyflow-root :is(.settings-tabs>button.active i,.settings-tabs>button.active strong,.settings-tabs>button.active b,.settings-summary-grid>button>i,.settings-summary-grid>button>b){color:var(--af-link);background:var(--af-accent-soft)}
#agencyflow-root :is(.settings-tabs>button small,.settings-tabs-title small,.settings-owner small){color:var(--af-muted)}
#agencyflow-root :is(.af-task-open,.af-task-open h4,.af-task-footer,.af-detail-link,.af-profile-popover>button:not(.af-profile-exit)){color:var(--af-text)}
#agencyflow-root .af-task-footer{border-color:var(--af-line)}
#agencyflow-root .af-kanban-card{background:var(--af-panel);color:var(--af-text)}
#agencyflow-root .af-kanban-card.priority-high{background:color-mix(in srgb,var(--af-panel) 96%,#d9736c)}
#agencyflow-root .af-add-task{background:var(--af-soft);border-color:var(--af-line);color:var(--af-link)}
#agencyflow-root .af-add-task:hover{background:var(--af-accent-soft);border-color:var(--af-accent)}
#agencyflow-root .af-kanban-column.is-over{background:var(--af-accent-soft);border-color:var(--af-accent);box-shadow:0 0 0 2px var(--af-accent)}
#agencyflow-root :is(.search-box,.task-head-actions>label,.department-tools-row>label,.af-report-summaries>button){background:var(--af-panel);border-color:var(--af-line);color:var(--af-text)}
#agencyflow-root :is(.af-report-summaries>button>b,.af-detail-link,.af-password-link,.auth-text-button,.auth-card footer button){color:var(--af-link)}
#agencyflow-root .af-footer{border-color:var(--af-line)}
#agencyflow-root .af-footer :is(span,small){color:var(--af-muted)}
#agencyflow-root .af-settings-message:not(.error){color:#24533e}
#agencyflow-root :is(.af-footer,.af-save-status){font-family:var(--af-font)}

/* Sidebar and branded feature areas share the selected menu palette. */
#agencyflow-root .sidebar{background:var(--af-sidebar);color:var(--af-nav-text)}
#agencyflow-root .sidebar :is(.nav-item,.department-item){color:var(--af-nav-text)}
#agencyflow-root .sidebar :is(.brand-subtitle,.nav-title,.nav-chevron){color:var(--af-nav-muted)}
#agencyflow-root .sidebar :is(.nav-item:hover,.department-item:hover){background:var(--af-nav-active);color:var(--af-nav-text)}
#agencyflow-root .sidebar :is(.nav-item.active,.department-item.active){background:var(--af-nav-active);color:var(--af-nav-active-text)}
#agencyflow-root .sidebar :is(.nav-item.active svg,.department-item.active .department-icon){color:var(--af-nav-active-text)}
#agencyflow-root .sidebar :is(.nav-item.active,.department-item.active)::before{background:var(--af-nav-active-text)}
#agencyflow-root .sidebar :is(.nav-item b,.department-item b){color:var(--af-nav-active-text);background:var(--af-nav-active)}
#agencyflow-root .sidebar .department-submenu::before{background:var(--af-nav-active)}
#agencyflow-root .sidebar-close{color:var(--af-nav-text)!important;background:var(--af-nav-active)!important;border-color:var(--af-nav-muted)!important}
#agencyflow-root :is(.brand-logo,.auth-brand-logo):not([style]){background-color:var(--af-logo-bg);border-radius:10px}
#agencyflow-root :is(.executive-hero,.af-executive-hero,.project-overview-hero,.settings-notification-hero,.backup-hero){background:var(--af-hero);color:var(--af-on-hero)}
#agencyflow-root :is(.executive-hero,.af-executive-hero,.project-overview-hero,.settings-notification-hero,.backup-hero) :is(h2,h3,strong){color:var(--af-on-hero)}
#agencyflow-root :is(.executive-hero,.af-executive-hero,.project-overview-hero,.settings-notification-hero,.backup-hero) :is(p,small,.executive-hero-copy>span){color:var(--af-hero-muted)}
#agencyflow-root .executive-period button{color:var(--af-on-hero);background:transparent;border-color:color-mix(in srgb,var(--af-on-hero) 25%,transparent)}
#agencyflow-root .executive-period button.active{background:var(--af-primary);color:var(--af-on-primary);border-color:var(--af-primary)}
#agencyflow-root .auth-brand-panel{color:var(--af-nav-text);background:radial-gradient(circle at 18% 18%,color-mix(in srgb,var(--af-primary) 14%,transparent),transparent 35%),linear-gradient(145deg,var(--af-sidebar),var(--af-hero))}
#agencyflow-root .auth-brand-panel h1{color:var(--af-nav-text)}
#agencyflow-root .auth-brand-panel :is(.brand-subtitle,p){color:var(--af-nav-muted)}
#agencyflow-root .auth-brand-panel:after{border-color:color-mix(in srgb,var(--af-primary) 20%,transparent);box-shadow:0 0 0 55px color-mix(in srgb,var(--af-primary) 4%,transparent),0 0 0 115px color-mix(in srgb,var(--af-primary) 3%,transparent)}
#agencyflow-root .auth-security-points span{color:var(--af-nav-text);border-color:var(--af-nav-muted);background:var(--af-nav-active)}
#agencyflow-root .auth-card header>span{color:var(--af-link)}
#agencyflow-root :is(.auth-card header p,.auth-form label span,.auth-card footer small){color:var(--af-muted)}
#agencyflow-root .auth-card footer{border-color:var(--af-line)}
#agencyflow-root .auth-brand-panel>span{color:var(--af-nav-muted)}
#agencyflow-root .af-writer-shell{background:var(--af-surface);color:var(--af-text)}
#agencyflow-root .af-writer-top{background:var(--af-sidebar);color:var(--af-nav-text)}
#agencyflow-root .af-writer-top :is(small,.brand-subtitle){color:var(--af-nav-muted)}
#agencyflow-root .af-writing-stats article{background:var(--af-panel);color:var(--af-text);border-color:var(--af-line)}
#agencyflow-root .af-writing-filters button{background:var(--af-soft);border-color:var(--af-line);color:var(--af-muted)}
#agencyflow-root .af-writing-filters button.active{background:var(--af-accent-soft);color:var(--af-link);border-color:var(--af-accent)}
#agencyflow-root :is(.af-writing-head p,.af-writing-stats small){color:var(--af-muted)}

/* Compact appearance controls and an isolated, unsaved preview. */
#agencyflow-root .af-style-editor{overflow:hidden;padding:24px}
.af-style-heading{display:flex;justify-content:space-between;align-items:start;gap:16px;margin-bottom:24px}
.af-style-heading h3{font-size:20px;margin:0 0 7px}.af-style-heading p{font-size:12px;line-height:1.9;color:var(--af-muted);margin:0}.af-style-heading>span{font-size:10px;color:var(--af-muted);white-space:nowrap;padding-top:7px}
.af-style-fields{border:0;margin:0;padding:0;min-width:0}.af-style-fields:disabled{opacity:.6}
.af-style-presets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:24px}
.af-style-presets>button{display:flex;flex-direction:column;align-items:center;gap:12px;background:var(--af-panel);border:1px solid var(--af-line);border-radius:12px;padding:14px 8px;cursor:pointer;min-height:84px;color:var(--af-text)}
.af-style-presets>button[aria-pressed=true]{border-color:var(--af-accent);box-shadow:0 0 0 1px var(--af-accent);background:var(--af-accent-soft)}
.af-style-presets strong{font-size:11px;font-weight:600}.af-style-swatches{display:flex;direction:rtl}.af-style-swatches i{display:block;width:20px;height:20px;border-radius:50%;border:2px solid var(--af-panel);margin-left:-5px}
.af-style-colors{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.af-style-color{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 12px;background:var(--af-soft);border-radius:12px;border:1px solid var(--af-line);min-width:0}
.af-style-color label{font-size:12px;font-weight:600}.af-style-color small{display:block;color:var(--af-muted);font-size:10px;margin-top:5px}.af-style-color>div:last-child{display:flex;gap:7px;align-items:center;direction:ltr;flex-shrink:0}
#agencyflow-root .af-style-color input[type=color]{width:34px;height:34px;border:0;border-radius:8px;padding:2px;cursor:pointer;background:transparent}
#agencyflow-root .af-style-color input:not([type=color]){width:79px;height:34px;min-width:0;padding:5px;font-family:ui-monospace,monospace;font-size:11px;border-radius:7px;border:1px solid var(--af-line);background:var(--af-panel)}
.af-style-font{display:flex;align-items:center;gap:14px;margin:20px 0 24px;font-size:12px}.af-style-font>span{font-weight:600}.af-style-font select{min-width:180px;border:1px solid var(--af-line);border-radius:9px;padding:10px}.af-style-font small{color:var(--af-muted);font-size:10px}
.af-style-preview-section{border-top:1px solid var(--af-line);padding-top:20px}.af-style-preview-section>header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.af-style-preview-section>header>strong{font-size:12px}.af-style-preview-section .af-view-tabs{margin:0}.af-style-preview-section .af-view-tabs>button{padding:8px 13px;min-height:34px;font-size:11px}
.af-style-preview{border:1px solid var(--af-line);border-radius:14px;overflow:hidden;background:var(--af-surface);color:var(--af-text);font-family:var(--af-font);pointer-events:none}
.af-preview-panel{display:grid;grid-template-columns:120px minmax(0,1fr);min-height:230px}.af-preview-panel>aside{padding:22px 14px;background:var(--af-sidebar);color:var(--af-nav-text);display:flex;flex-direction:column;gap:9px;font-size:11px}.af-preview-panel>aside>strong{font-size:18px;margin-bottom:14px}.af-preview-panel>aside>span{padding:8px;border-radius:7px}.af-preview-panel>aside>.selected{background:var(--af-nav-active);color:var(--af-nav-active-text)}
.af-preview-work{padding:16px}.af-preview-work>header{display:flex;justify-content:space-between;align-items:center;font-size:12px;margin-bottom:15px}.af-preview-work>header>span{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--af-accent-soft);color:var(--af-link)}
.af-preview-card{padding:18px;background:var(--af-panel);border-radius:10px;border:1px solid var(--af-line)}.af-preview-card>small{display:block;font-size:10px;color:var(--af-link);margin-bottom:10px}.af-preview-card>strong{font-size:13px}.af-preview-card>p{font-size:10px;line-height:2;color:var(--af-muted);margin:9px 0 14px}.af-preview-card>div{display:flex;gap:13px;align-items:center;flex-wrap:wrap}
.af-preview-button{display:inline-block;border-radius:7px;background:var(--af-primary);color:var(--af-on-primary);font-size:10px;padding:9px 12px;text-align:center}.af-preview-link{color:var(--af-link);font-size:10px}
.af-preview-login{display:grid;grid-template-columns:1fr 1fr;min-height:230px}.af-preview-login>aside{display:flex;flex-direction:column;justify-content:center;padding:24px;background:var(--af-hero);color:var(--af-on-hero)}.af-preview-login>aside>strong{font-size:22px}.af-preview-login>aside>p{font-size:12px;line-height:2;color:var(--af-hero-muted)}.af-preview-login>div{display:flex;flex-direction:column;gap:10px;margin:18px;padding:18px;background:var(--af-panel);border:1px solid var(--af-line);border-radius:12px}.af-preview-login>div>strong{font-size:13px;margin-bottom:3px}.af-preview-input{border:1px solid var(--af-line);border-radius:6px;color:var(--af-muted);font-size:10px;padding:8px;background:var(--af-soft)}
.af-style-preview-note{font-size:11px;line-height:1.9;color:var(--af-muted);margin:12px 0 0}.af-style-actions{display:flex;justify-content:space-between;gap:12px;align-items:center;border-top:1px solid var(--af-line);padding-top:20px;margin-top:20px}.af-style-actions>div{display:flex;gap:8px;flex-wrap:wrap}.af-style-actions button{font-size:11px;min-height:40px}.af-style-editor button:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:1250px){.af-style-colors{grid-template-columns:1fr}.af-style-font{flex-wrap:wrap}.af-style-font small{width:100%}.af-preview-panel{grid-template-columns:100px minmax(0,1fr)}}
@media(max-width:640px){#agencyflow-root .af-style-editor{padding:16px}.af-style-heading{flex-direction:column;gap:4px;margin-bottom:18px}.af-style-presets{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.af-style-color{padding:12px 10px;gap:7px}.af-style-color small{font-size:9px}.af-style-color input:not([type=color]){width:73px!important}.af-style-font{gap:10px}.af-style-font select{flex:1;min-width:130px}.af-style-preview-section>header{flex-wrap:wrap}.af-style-preview-section .af-view-tabs{width:auto}.af-preview-panel{grid-template-columns:75px minmax(0,1fr)}.af-preview-panel>aside{padding:18px 7px;font-size:9px}.af-preview-panel>aside>strong{font-size:14px}.af-preview-work{padding:10px}.af-preview-card{padding:12px}.af-preview-card>strong{font-size:11px}.af-preview-login{grid-template-columns:1fr}.af-preview-login>aside{padding:18px}.af-preview-login>aside>strong{font-size:17px}.af-preview-login>aside>p{margin-bottom:0;font-size:11px}.af-style-actions{flex-wrap:wrap}.af-style-actions>div{width:100%}.af-style-actions>div>button{flex:1}.af-style-actions>.secondary-button{min-height:36px}}

/* The native password-recovery and owner-only WordPress screens use the same choice. */
body.login,body.wp-admin{background:var(--af-surface);color:var(--af-text);font-family:var(--af-font)}
body.login :is(input,button,select,textarea),body.wp-admin :is(input,button,select,textarea){font-family:var(--af-font)}
body.login #login{max-width:calc(100vw - 28px)}
body.login #login h1 a{background-color:var(--af-sidebar)}
body.login :is(#loginform,#lostpasswordform,#resetpassform){background:var(--af-panel);border-color:var(--af-line);color:var(--af-text)}
body.login :is(input[type=text],input[type=password],input[type=email]){background:var(--af-soft);color:var(--af-text);border-color:var(--af-line)}
body.login .button-primary,.wp-admin.wp-core-ui .button-primary{background:var(--af-primary);border-color:var(--af-primary);color:var(--af-on-primary);text-shadow:none}
body.login #nav a,body.login .privacy-policy-link{color:var(--af-link)}
body.wp-admin :is(#adminmenu,#adminmenuwrap,#adminmenuback){background:var(--af-sidebar)}
body.wp-admin #adminmenu a{color:var(--af-nav-text)}
body.wp-admin #adminmenu :is(a:hover,.current a.menu-top,a.wp-has-current-submenu){background:var(--af-nav-active);color:var(--af-nav-active-text)}
body.wp-admin :is(.postbox,.stuffbox,.wp-list-table){background:var(--af-panel);border-color:var(--af-line)!important;color:var(--af-text)}
