:root {
    color-scheme: light;
    --primary: #4b1822;
    --primary-hover: #351018;
    --primary-dark: #351018;
    --primary-soft: #f7eef0;
    --secondary: #7a3442;
    --sidebar: #351018;
    --background: #f8f6f6;
    --surface: #fff;
    --page: #f8f6f6;
    --card: #fff;
    --border: #eadfe1;
    --text-primary: #24191b;
    --text-secondary: #76686b;
    --text: #24191b;
    --muted: #76686b;
    --success: #15803d;
    --warning: #a16207;
    --danger: #b91c1c;
    --radius: 16px;
    --sidebar-width: 272px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--text); font-family: 'Tajawal', Tahoma, Arial, sans-serif; }
html, body { --bs-body-font-family: 'Tajawal', Tahoma, Arial, sans-serif; }
button, input, select, textarea { font-family: inherit; }
a { color: var(--primary); }
button, input, select { font: inherit; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; background: radial-gradient(ellipse at 15% 12%,rgba(251,191,36,.2),transparent 31%),radial-gradient(ellipse at 88% 84%,rgba(234,88,12,.12),transparent 34%),linear-gradient(140deg,#fffaf2 0%,#fff5e7 48%,#fffaf4 100%); }
.auth-card { position: relative; overflow: hidden; width: min(100%, 440px); padding: 26px 32px 30px; border: 1px solid rgba(255,255,255,.9); border-radius: 25px; background: rgba(255,255,255,.96); box-shadow: 0 28px 80px rgba(91,45,18,.14),0 4px 18px rgba(180,83,9,.07); }
.auth-card::before { position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg,#b45309,#f59e0b 52%,#fb923c); content: ""; }
.auth-card-wide { width: min(100%, 710px); }
.auth-language, .language-switch { display: inline-flex; align-items: center; gap: 3px; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: #fffaf2; }
.auth-language { margin-inline-start: auto; display: flex; width: max-content; }
.auth-language a, .language-switch a { padding: 6px 11px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 12px; }
.auth-language a.is-current, .language-switch a.is-current { background: #fff; color: var(--primary-dark); box-shadow: 0 2px 8px rgba(154,52,18,.13); }
.auth-brand { margin: 17px 0 27px; text-align: center; }
.brand-logo-frame { width: 142px; height: 142px; display: grid; place-items: center; margin: 0 auto 12px; }
.brand-logo { display: block; width: 100%; height: 100%; object-fit: contain; }
.auth-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; color: #b45309; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.auth-eyebrow::before, .auth-eyebrow::after { width: 17px; height: 1px; background: #f2c17c; content: ""; }
.auth-brand h1 { margin: 0; font-size: 20px; line-height: 1.55; font-weight: 750; }
.auth-brand p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.auth-brand-compact { margin-bottom: 20px; }
.auth-brand-compact .brand-logo-frame { width: 112px; height: 112px; margin-bottom: 8px; }
.auth-brand-compact h1 { font-size: 22px; }
.auth-brand-compact p { max-width: 520px; margin: 8px auto 0; line-height: 1.7; }
.auth-form { display: grid; gap: 10px; }
.auth-form label, .form-field label { margin: 2px 0 0; color: #334155; font-size: 13px; font-weight: 650; }
.form-control { min-height: 43px; border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 10px 12px; color: var(--text); box-shadow: none; }
.form-control:focus { border-color: var(--primary); outline: 0; box-shadow: 0 0 0 3px rgba(194,65,12,.12); }
.button { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border: 1px solid transparent; border-radius: 10px; text-align: center; text-decoration: none; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: linear-gradient(110deg,#9a3412,#c2410c 55%,#ea580c); color: #fff; box-shadow: 0 7px 16px rgba(194,65,12,.19); }
.button-primary:hover { color: #fff; background: linear-gradient(110deg,#7c2d12,#b45309 55%,#c2410c); }
.button-secondary { border-color: #f3d7b5; background: linear-gradient(135deg,#fffaf2,#fff2df); color: #9a3412; }
.button-secondary:hover { color: #7c2d12; border-color: #edbd7b; background: #ffefd8; }
.button-danger { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.button-danger:hover { color: #7f1d1d; background: #fee2e2; }
.auth-form .button-primary { width: 100%; margin-top: 8px; }
.auth-footer { margin-top: 12px; }
.auth-footer .button { width: 100%; }
.register-form { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 16px; row-gap: 12px; }
.form-field { min-width: 0; display: grid; gap: 7px; }
.register-actions { grid-column: 1/-1; display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; margin-top: 5px; }
.notice { margin: 0 0 15px; padding: 11px 13px; border: 1px solid transparent; border-radius: 10px; font-size: 13px; line-height: 1.6; }
.notice-success { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.notice-danger { border-color: #fecaca; background: #fef2f2; color: #991b1b; }

.admin-shell { min-height: 100vh; }
.admin-sidebar { position: fixed; z-index: 1040; inset-block: 0; inset-inline-start: 0; width: var(--sidebar-width); overflow-y: auto; padding: 20px 15px; background: radial-gradient(ellipse at 50% 0%,rgba(217,119,6,.18),transparent 40%),linear-gradient(165deg,#3a2116 0%,#271711 56%,#20130f 100%); color: #fffaf2; box-shadow: 8px 0 35px rgba(74,35,13,.13); }
.admin-brand { padding: 13px; border: 1px solid rgba(250,204,120,.21); border-radius: 18px; background: rgba(255,255,255,.055); box-shadow: inset 0 1px rgba(255,255,255,.06); }
.admin-brand-logo-frame { width: 100%; min-height: 0; display: grid; place-items: center; padding: 3px 12px 8px; }
.admin-brand-logo { display: block; width: min(100%, 154px); height: auto; max-height: 154px; object-fit: contain; filter: brightness(0) invert(1); }
.admin-brand-copy { padding: 11px 3px 0; text-align: center; }
.admin-brand strong { display: block; color: #fff4df; font-size: 13px; line-height: 1.65; }
.admin-brand small { display: block; margin-top: 3px; color: #f3c77f; font-size: 10px; line-height: 1.5; }
.admin-brand .language-switch { display: flex; width: max-content; margin: 12px auto 0; border-color: rgba(250,204,120,.18); background: rgba(24,14,10,.5); }
.admin-brand .language-switch a { color: #f5dfbf; }
.admin-brand .language-switch a.is-current { background: #d97706; color: #fff; box-shadow: 0 3px 10px rgba(217,119,6,.28); }
.sidebar-caption { margin: 25px 10px 8px; color: #7c8798; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.admin-nav { display: grid; gap: 4px; }
.admin-nav a { min-height: 42px; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: #cbd5e1; text-decoration: none; font-size: 13px; transition: background .15s ease,color .15s ease; }
.admin-nav a:hover { background: rgba(251,191,36,.1); color: #fff; }
.admin-nav a.is-active { border-inline-start: 3px solid #fbbf24; padding-inline-start: 9px; background: linear-gradient(100deg,rgba(217,119,6,.28),rgba(194,65,12,.12)); color: #fff8eb; }
.admin-nav .nav-icon { width: 20px; color: #fbbf24; text-align: center; font-size: 15px; }
.admin-nav form { margin-top: 8px; }
.admin-nav .nav-logout { min-height: 42px; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; background: transparent; color: #fca5a5; text-align: start; font-size: 13px; cursor: pointer; }
.admin-nav .nav-logout:hover { background: rgba(248,113,113,.1); }
.admin-nav .nav-logout .nav-icon { color: #fca5a5; }
.admin-content { min-height: 100vh; margin-inline-start: var(--sidebar-width); padding: 28px clamp(16px,3vw,40px) 40px; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-heading { display: flex; align-items: center; gap: 12px; }
.page-header h1 { margin: 0; font-size: 23px; font-weight: 750; }
.page-subtitle { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.user-chip { display: flex; align-items: center; gap: 11px; padding: 8px 13px; border: 1px solid var(--border); border-radius: 13px; background: #fff; }
.user-avatar { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(140deg,#fff0d5,#ffe0ad); color: #9a3412; font-weight: 750; }
.user-chip strong, .user-chip small { display: block; }
.user-chip strong { font-size: 12px; }
.user-chip small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.mobile-menu-button { display: none; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); }
.sidebar-backdrop { display: none; }
.content-stack { display: grid; gap: 18px; }
.summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.summary-card, .data-card { border: 1px solid #f2e5d5; border-radius: var(--radius); background: var(--card); box-shadow: 0 7px 25px rgba(112,62,26,.055); }
.summary-card { display: flex; align-items: center; gap: 13px; padding: 16px 18px; }
.summary-card-link { color: inherit; text-decoration: none; }
.summary-card-link:hover { border-color: #f2c17c; background: #fffaf2; color: inherit; }
.summary-card-link.is-selected { border-color: #d97706; box-shadow: 0 0 0 2px rgba(217,119,6,.12),0 7px 25px rgba(112,62,26,.055); }
.summary-icon-pending { background: #fef3c7; color: #b45309; }
.summary-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--primary-soft); color: var(--primary); font-weight: 800; }
.summary-card strong { display: block; font-size: 20px; }
.summary-card small { color: var(--muted); font-size: 11px; }
.data-card { min-width: 0; padding: 19px; }
.data-card-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.data-card-header h2 { margin: 0; font-size: 16px; font-weight: 750; }
.data-card-header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; max-width: 100%; min-width: 0; }
.toolbar .form-control { width: auto; flex: 1 1 240px; min-width: 0; min-height: 44px; font-size: 13px; }
.toolbar .button { flex: 0 0 auto; width: auto; min-height: 44px; padding: 11px 20px; line-height: 1.5; white-space: nowrap; }
.toolbar .button svg { flex-shrink: 0; }
.toolbar.project-actions { gap: 6px; }
.toolbar.project-actions .button { min-height: 31px; padding: 5px 9px; font-size: 11px; border-radius: 8px; line-height: 1.5; }
.toolbar.project-actions .button svg { width: 15px; height: 15px; margin-inline-end: 5px !important; }
.toolbar.project-actions form { margin: 0; flex: 0 0 auto; }
.project-notifications { position: relative; }
.screen-header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.screen-notifications { position: relative; }
.screen-notifications .project-notification-panel { inset-inline-start: auto; inset-inline-end: 0; }
.screen-notifications > summary { list-style: none; display: flex; align-items: center; gap: 8px; }
.screen-notifications > summary::-webkit-details-marker { display: none; }
.screen-notifications:not([open]) > .project-notification-panel { display: none; }
.project-notifications > summary { list-style: none; gap: 8px; }
.project-notifications > summary::-webkit-details-marker { display: none; }
.project-notification-count { min-width: 22px; padding: 2px 6px; border-radius: 99px; background: #008ca9; color: #fff; font-size: 12px; }
.project-notification-panel { position: absolute; z-index: 1050; inset-inline-start: 0; top: calc(100% + 2px); width: min(360px, calc(100vw - 48px)); max-height: 440px; overflow-y: auto; padding: 16px; border: 1px solid #dce9ed; border-radius: 14px; background: #fff; box-shadow: 0 12px 35px rgba(8,46,61,.18); }
.project-notification-panel h3 { font-size: 16px; margin: 0 0 6px; }
.project-notification-panel p, .project-notification-panel small { color: #70858c; font-size: 12px; line-height: 1.7; margin: 4px 0; overflow-wrap: anywhere; }
.project-notification-panel article { padding-block: 12px; border-bottom: 1px solid #e5eff1; }
.project-notification-panel strong { font-size: 13px; }
.notification-read-button { display: block; margin-top: 8px; padding: 4px 0; border: 0; background: transparent; color: #087f9c; font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; }
.notification-read-status { display: block; margin-top: 8px; }
.login-notifications-dialog { width: min(620px, calc(100vw - 32px)); max-height: 85vh; padding: 24px; border: 1px solid #dce9ed; border-radius: 18px; color: #163945; background: #fff; box-shadow: 0 18px 60px rgba(8,46,61,.2); }
.login-notifications-dialog::backdrop { background: rgba(4,22,31,.5); }
.login-notifications-dialog h2 { font-size: 21px; }
.login-notifications-dialog p, .login-notifications-dialog small { color: #70858c; line-height: 1.7; overflow-wrap: anywhere; }
.login-notifications-list { max-height: 50vh; overflow-y: auto; }
.login-notifications-list article { padding: 12px 0; border-bottom: 1px solid #e5eff1; }
.project-notification-panel > a { margin-top: 12px; }
.project-notifications:not([open]) > .project-notification-panel { display: none; }
@media (max-width: 560px) {
    .toolbar .form-control { flex-basis: 100%; width: 100%; }
    .toolbar .button { max-width: 100%; white-space: normal; text-align: center; overflow-wrap: anywhere; }
}
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid #edf0f5; border-radius: 12px; }
.users-table { width: 100%; min-width: 950px; margin: 0; border-collapse: collapse; font-size: 12px; }
.users-table thead { background: #f8fafc; color: #64748b; }
.users-table th { padding: 13px 12px; border-bottom: 1px solid var(--border); text-align: start; white-space: nowrap; font-size: 11px; font-weight: 700; }
.users-table td { padding: 13px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; white-space: nowrap; }
.users-table tbody tr:last-child td { border-bottom: 0; }
.users-table tbody tr:hover { background: #fafbff; }
.person-cell { display: flex; align-items: center; gap: 9px; }
.person-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: #fff0d5; color: #9a3412; font-size: 12px; font-weight: 750; }
.person-name { display: block; font-weight: 700; line-height: 1.6; }
.person-meta { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.status-badge, .role-badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 700; }
.status-active { background: #dcfce7; color: #166534; }
.status-inactive { background: #fee2e2; color: #991b1b; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.role-admin { background: #ffedd5; color: #9a3412; }
.role-user { background: #ccfbf1; color: #115e59; }
.table-action { width: 31px; height: 31px; display: inline-grid; place-items: center; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: var(--muted); text-decoration: none; }
.table-action:hover { border-color: #f2c17c; background: #fff4e5; color: var(--primary-dark); }
.user-row-actions { display: inline-flex; align-items: center; gap: 6px; }
.user-row-actions form { margin: 0; }
.user-status-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.user-status-filters a { display: inline-flex; min-height: 34px; align-items: center; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--muted); font-size: 11px; font-weight: 700; text-decoration: none; transition: background .15s,border-color .15s,color .15s; }
.user-status-filters a:hover { border-color: #f2c17c; background: #fffaf2; color: #9a3412; }
.user-status-filters a.is-active { border-color: #9a3412; background: #9a3412; color: #fff; }
.user-status-filters a:focus-visible { outline: 3px solid rgba(245,158,11,.35); outline-offset: 2px; }
.request-action { min-height: 31px; padding: 0 9px; border: 1px solid transparent; border-radius: 8px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.admin-password-reset { position: relative; }
.admin-password-reset > summary { display: inline-flex; align-items: center; cursor: pointer; list-style: none; }
.admin-password-reset > summary::-webkit-details-marker { display: none; }
.request-password { border-color: #eadfe1; background: #f7eef0; color: #4b1822; }
.request-password:hover { background: #eee0e3; }
.admin-password-reset-form { position: absolute; z-index: 10; inset-inline-end: 0; top: calc(100% + 8px); display: grid; width: min(310px,80vw); gap: 10px; padding: 15px; border: 1px solid #eadfe1; border-radius: 12px; background: #fff; box-shadow: 0 12px 34px rgba(53,16,24,.16); white-space: normal; }
.admin-password-reset-form > strong { color: #351018; font-size: 12px; }
.admin-password-reset-form > p { margin: -5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.admin-password-reset-form label { display: grid; gap: 5px; color: #43363a; font-size: 10px; font-weight: 700; }
.admin-password-reset-form .form-control { min-height: 37px; font-size: 12px; }
.request-password-submit { background: #4b1822; color: #fff; }
.request-password-submit:hover { background: #351018; }
.request-approve { background: #dcfce7; color: #166534; }
.request-approve:hover { background: #bbf7d0; }
.request-reject { background: #fee2e2; color: #991b1b; }
.request-reject:hover { background: #fecaca; }
.empty-state { padding: 34px 12px !important; color: var(--muted); text-align: center; }
.page-overlay { position: fixed; inset: 0; z-index: 1030; display: none; background: rgba(15,23,42,.45); }

@media (max-width: 1100px) {
    :root { --sidebar-width: 245px; }
    .users-table { min-width: 890px; }
}
@media (max-width: 767px) {
    :root { --sidebar-width: 280px; }
    .admin-sidebar { transition: transform .2s ease; }
    html[dir="rtl"] .admin-sidebar { transform: translateX(105%); }
    html[dir="ltr"] .admin-sidebar { transform: translateX(-105%); }
    body.sidebar-open .admin-sidebar { transform: translateX(0); }
    body.sidebar-open .page-overlay { display: block; }
    .admin-content { margin-inline-start: 0; padding: 17px 14px 28px; }
    .mobile-menu-button { display: inline-grid; place-items: center; }
    .page-header { align-items: flex-start; margin-bottom: 18px; }
    .page-header h1 { font-size: 19px; }
    .page-heading { align-items: flex-start; }
    .user-chip { padding: 5px 8px; gap: 7px; }
    .user-chip .user-avatar { width: 33px; height: 33px; }
    .user-chip small { display: none; }
    .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
    .summary-card { padding: 12px 14px; }
    .summary-icon { width: 37px; height: 37px; }
    .data-card { padding: 14px 12px; }
    .data-card-header { align-items: flex-start; flex-direction: column; }
    .toolbar { width: 100%; }
    .toolbar .form-control { min-width: 0; flex: 1; }
}
@media (max-width: 560px) {
    .auth-card { padding: 21px 19px 23px; }
    .auth-card-wide { width: min(100%, 460px); }
    .auth-brand h1 { font-size: 18px; }
    .register-form { grid-template-columns: 1fr; }
    .register-actions { grid-template-columns: 1fr; }
    .register-actions .button-secondary { grid-row: 2; }
    .user-chip { max-width: 145px; }
    .user-chip strong { max-width: 85px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

.project-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 2px; }
.project-intro h2 { margin: 0; font-size: 21px; font-weight: 750; }
.project-intro p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.project-summary-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.project-stat-card { min-width: 0; }
.project-stat-card.stat-warning .summary-icon { color: #b45309; background: #fef3c7; }
.project-stat-card.stat-success .summary-icon { color: #166534; background: #dcfce7; }
.project-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.project-card-grid.project-list-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.project-list-grid .project-card-top { flex-wrap: wrap; }
.project-list-grid .project-card-top h3 { overflow-wrap: anywhere; }
@media (max-width: 1199px) {
    .project-card-grid.project-list-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 767px) {
    .project-card-grid.project-list-grid { grid-template-columns: 1fr; }
}
.project-card, .department-card { min-width: 0; padding: 17px; border: 1px solid #edf0f5; border-radius: 14px; background: #fff; }
.project-card-top, .department-card-header, .project-overview-heading, .project-overview-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.project-card-top h3, .department-card-header h3 { margin: 0; font-size: 15px; font-weight: 750; }
.project-card-top p, .department-card-header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.project-status, .task-status { display: inline-flex; flex: 0 0 auto; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 700; }
.project-status-new, .task-status-new { color: #475569; background: #f1f5f9; }
.project-status-progress, .task-status-progress { color: #1d4ed8; background: #dbeafe; }
.project-status-complete, .task-status-complete { color: #166534; background: #dcfce7; }
.project-status-hold, .task-status-blocked { color: #9a3412; background: #ffedd5; }
.task-status-overdue { color: #991b1b; background: #fee2e2; }
.project-progress-label { display: flex; justify-content: space-between; gap: 12px; margin: 17px 0 7px; color: var(--muted); font-size: 11px; }
.project-progress-label strong { color: var(--text); }
.progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #e9edf5; }
.progress-track > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#c2410c,#f59e0b 58%,#fbbf24); }
.progress-track-large { height: 11px; }
.project-card-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 15px; color: var(--muted); font-size: 11px; }
.project-card-meta strong { margin-inline-start: 3px; color: var(--text); }
.project-card-dates { display: grid; gap: 6px; margin-top: 14px; color: var(--muted); font-size: 11px; }
.project-card-dates strong { color: var(--text); font-weight: 650; }
.project-card-link { width: 100%; justify-content: space-between; margin-top: 16px; }
.projects-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project-filter-form { display: flex; flex: 1; flex-wrap: wrap; gap: 8px; }
.project-filter-form .form-control { min-width: 145px; max-width: 220px; min-height: 40px; font-size: 12px; }
.project-overview-card { padding: 22px; border: 1px solid #edf0f5; border-radius: var(--radius); background: #fff; box-shadow: 0 4px 16px rgba(15,23,42,.035); }
.project-overview-title { align-items: center; justify-content: flex-start; flex-wrap: wrap; }
.project-overview-title h2 { margin: 0; font-size: 21px; font-weight: 750; }
.project-overview-heading > div > p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.project-overview-progress { margin-top: 22px; }
.project-overview-progress .project-progress-label { font-size: 13px; }
.project-overview-facts { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 14px; margin-top: 20px; padding-top: 18px; border-top: 1px solid #eef1f5; }
.project-overview-facts span { display: grid; gap: 5px; }
.project-overview-facts small { color: var(--muted); font-size: 10px; }
.project-overview-facts strong { font-size: 13px; }
.project-description { margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.inline-add-form { display: flex; align-items: center; gap: 8px; }
.inline-add-form .form-control { min-width: 145px; min-height: 39px; font-size: 12px; }
.department-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 14px; }
.department-column { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.department-progress { color: var(--primary); font-size: 16px; font-weight: 800; }
.project-type-label { margin-block: 12px 8px; }
.project-type-label strong { display: inline-block; padding: 5px 11px; border: 1px solid #cfe5e9; border-radius: 99px; background: #eef9fc; color: #087f9c; font-size: 12px; }
.department-summary { display: flex; justify-content: space-between; gap: 8px; margin: 9px 0 15px; color: var(--muted); font-size: 11px; }
.task-add-form { display: grid; gap: 8px; padding: 12px; border: 1px solid #edf0f5; border-radius: 11px; background: #fafbff; }
.task-add-form .form-control, .quick-status-form .form-control { min-height: 37px; font-size: 11px; }
.task-add-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.task-add-form textarea.form-control { resize: vertical; }
.task-add-form .button { justify-self: start; min-height: 36px; padding: 7px 12px; font-size: 11px; }
.task-list { display: grid; gap: 1px; margin-top: 12px; }
.task-row { display: grid; grid-template-columns: minmax(0,1fr) auto 145px; align-items: center; gap: 9px; padding: 11px 2px; border-bottom: 1px solid #f1f5f9; }
.task-row:last-child { border-bottom: 0; }
.task-row-main { min-width: 0; display: grid; gap: 4px; }
.task-row-main a { color: var(--text); text-decoration: none; white-space: normal; overflow-wrap: anywhere; line-height: 1.7; font-size: 12px; font-weight: 700; }
.task-row-main a:hover { color: var(--primary); }
.task-row-main small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.quick-status-form { min-width: 0; margin: 0; }
.department-empty { margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.project-form-card { max-width: 900px; }
.project-template-notice { display: grid; gap: 8px; margin: 0 0 18px; padding: 14px 16px; border: 1px solid #b8eaf3; border-radius: 14px; background: linear-gradient(120deg,#f1fcff,#f8fdff); color: #164e63; }
.project-template-notice > strong { font-size: 13px; }
.project-template-counts { display: flex; flex-wrap: wrap; gap: 9px; }
.project-template-counts span { padding: 6px 10px; border: 1px solid #d2f0f6; border-radius: 999px; background: #fff; color: #33515c; font-size: 12px; }
.project-template-counts b { color: #0785a0; font-size: 15px; }
.project-template-notice small { color: #55727d; line-height: 1.6; }
.project-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.project-form .form-field { display: grid; gap: 7px; }
.project-form label { color: #334155; font-size: 12px; font-weight: 700; }
.project-form textarea { resize: vertical; }
.project-form-wide { grid-column: 1/-1; }
.project-form-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.task-edit-card { max-width: 850px; }
.task-table-link { color: var(--text); text-decoration: none; font-weight: 650; }
.task-table-link:hover { color: var(--primary); }

@media (max-width: 1100px) {
    .project-summary-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .project-overview-facts { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 767px) {
    .project-card-grid, .department-grid { grid-template-columns: 1fr; }
    .projects-toolbar { align-items: stretch; flex-direction: column; }
    .project-filter-form .form-control { flex: 1 1 140px; max-width: none; }
    .project-overview-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .project-overview-heading { flex-direction: column; }
    .inline-add-form { width: 100%; }
    .inline-add-form .form-control { flex: 1; min-width: 0; }
    .project-intro { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 560px) {
    .project-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .project-stat-card { gap: 9px; padding: 11px 9px; }
    .project-stat-card .summary-icon { width: 32px; height: 32px; }
    .project-stat-card strong { font-size: 17px; }
    .project-stat-card small { font-size: 10px; }
    .task-row { grid-template-columns: minmax(0,1fr) auto; }
    .quick-status-form { grid-column: 1/-1; }
    .quick-status-form .form-control { width: 100%; }
    .project-form { grid-template-columns: 1fr; }
    .project-form-wide { grid-column: auto; }
    .task-add-fields { grid-template-columns: 1fr; }
    .inline-add-form { align-items: stretch; flex-direction: column; }
    .inline-add-form .button { width: 100%; }
}

body { background-color: var(--page); }
.auth-page { position: relative; isolation: isolate; }
.auth-brand { margin-top: 12px; }
.auth-brand h1 { color: #352016; }
.auth-form label, .form-field label { color: #513a2b; }
.auth-form .form-control, .project-form .form-control, .project-filter-form .form-control {
    border-color: #eadbc9;
    background-color: #fffdfa;
}
.auth-form .form-control:focus, .project-form .form-control:focus, .project-filter-form .form-control:focus {
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217,119,6,.13);
}
.auth-footer .button-secondary { border-color: #f1dfc7; background: #fffaf2; }
.admin-content { background: radial-gradient(ellipse at 100% 0%,rgba(251,191,36,.09),transparent 26%); }
.page-header { padding: 15px 18px; border: 1px solid rgba(240,223,205,.84); border-radius: 16px; background: rgba(255,255,255,.88); box-shadow: 0 5px 20px rgba(112,62,26,.045); }
.page-header h1 { color: #352016; }
.page-subtitle { color: #857469; }
.mobile-menu-button { border-color: #f0dfcd; background: #fffaf2; color: #9a3412; }
.sidebar-caption { color: #c49a67; }
.admin-nav a { color: #eadcc9; }
.admin-nav a.is-active { box-shadow: inset 0 0 18px rgba(245,158,11,.07); }
.admin-nav .nav-logout { color: #fdba74; }
.admin-nav .nav-logout .nav-icon { color: #fdba74; }
.user-chip { border-color: #f0dfcd; box-shadow: 0 3px 12px rgba(112,62,26,.04); }
.summary-card { position: relative; overflow: hidden; border-color: #f1e2d0; background: linear-gradient(145deg,#fff 45%,#fffaf2); }
.summary-card::after { position: absolute; inset-inline-end: -18px; inset-block-end: -28px; width: 76px; height: 76px; border: 1px solid rgba(217,119,6,.1); border-radius: 50%; content: ""; }
.summary-icon { background: #fff0d5; color: #a34112; }
.project-stat-card:nth-child(3n+2) .summary-icon { background: #ffedd5; color: #c2410c; }
.project-stat-card:nth-child(3n) .summary-icon { background: #fef3c7; color: #a16207; }
.project-card, .department-card { border-color: #f0e3d4; box-shadow: 0 7px 21px rgba(112,62,26,.045); transition: transform .18s ease,border-color .18s ease,box-shadow .18s ease; }
.project-card:hover, .department-card:hover { transform: translateY(-2px); border-color: #e9c38f; box-shadow: 0 13px 28px rgba(112,62,26,.09); }
.department-card { background: linear-gradient(160deg,#fff 76%,#fffaf2); }
.task-add-form { border-color: #f0e3d4; background: #fffaf4; }
.task-row { border-bottom-color: #f3e9dc; }
.table-wrap { border-color: #f0e3d4; }
.users-table thead { background: #fff8ed; color: #725c48; }
.users-table tbody tr:hover { background: #fffaf2; }
.users-table td { border-bottom-color: #f4ece3; }
.project-overview-card { border-color: #f0e3d4; background: linear-gradient(145deg,#fff 75%,#fff8ec); box-shadow: 0 8px 24px rgba(112,62,26,.055); }
.project-overview-title h2 { color: #3c2517; }
.project-overview-facts { border-top-color: #f0e3d4; }
.data-card-header h2 { color: #3c2517; }
.data-card-header p { color: #867466; }
.empty-state { border-color: #f0e3d4; border-radius: 14px; background: #fffaf4; }
.request-action:focus-visible, .button:focus-visible, .admin-nav a:focus-visible {
    outline: 3px solid rgba(245,158,11,.38);
    outline-offset: 2px;
}

@media (max-width: 560px) {
    .auth-brand { margin-bottom: 22px; }
    .brand-logo-frame { width: 126px; height: 126px; }
    .auth-card { border-radius: 22px; }
    .page-header { padding: 12px; }
}

.project-progress-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 17px 0 8px; }
.project-progress-heading > div { display: grid; gap: 2px; color: var(--muted); font-size: 12px; }
.project-progress-heading strong { color: #9a3412; font-size: 27px; line-height: 1.1; }
.project-progress-heading strong small { margin-inline-start: 2px; font-size: 14px; }
.project-progress-count { color: var(--muted); font-size: 11px; }
.completion-flow-card { padding: 22px; border: 1px solid #f0e3d4; border-radius: var(--radius); background: linear-gradient(135deg,#fff 55%,#fff8ed); box-shadow: 0 8px 24px rgba(112,62,26,.045); }
.completion-flow-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.completion-flow-kicker { color: #b45309; font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.completion-flow-heading h2 { margin: 5px 0 0; color: #3c2517; font-size: 18px; }
.completion-flow-heading p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.completion-stepper { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; margin: 24px 0 0; padding: 0; list-style: none; }
.completion-step { position: relative; display: grid; grid-template-columns: 38px minmax(0,1fr); align-content: start; gap: 10px; min-width: 0; padding-inline-end: 14px; }
.completion-step:not(:last-child)::after { position: absolute; top: 18px; inset-inline-start: 48px; inset-inline-end: 0; height: 2px; background: #e7e5e4; content: ""; }
.completion-step-marker { z-index: 1; display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #e7e5e4; border-radius: 50%; background: #fff; color: #78716c; font-size: 11px; font-weight: 800; }
.completion-step-copy { display: grid; gap: 5px; padding-top: 3px; }
.completion-step-copy strong { color: #57534e; font-size: 12px; }
.completion-step-copy small { color: #78716c; font-size: 10px; line-height: 1.6; }
.completion-step-state { width: fit-content; padding: 3px 7px; border-radius: 999px; background: #f5f5f4; color: #78716c; font-size: 9px; font-weight: 700; }
.completion-step.is-done .completion-step-marker { border-color: #f59e0b; background: #f59e0b; color: #fff; }
.completion-step.is-done:not(:last-child)::after { background: #f59e0b; }
.completion-step.is-done .completion-step-copy strong { color: #166534; }
.completion-step.is-done .completion-step-state { background: #dcfce7; color: #166534; }
.completion-step.is-current .completion-step-marker { border: 2px solid #c2410c; color: #9a3412; box-shadow: 0 0 0 4px rgba(245,158,11,.13); }
.completion-step.is-current .completion-step-copy strong { color: #9a3412; }
.completion-step.is-current .completion-step-state { background: #ffedd5; color: #9a3412; }
.form-hint-warning { display: block; margin-top: 6px; color: #9a3412; line-height: 1.6; }

@media (max-width: 900px) {
    .completion-stepper { grid-template-columns: repeat(2,minmax(0,1fr)); row-gap: 20px; }
    .completion-step:nth-child(2)::after { display: none; }
}
@media (max-width: 560px) {
    .completion-flow-card { padding: 17px 14px; }
    .completion-flow-heading { align-items: stretch; flex-direction: column; }
    .completion-flow-heading .button { width: 100%; }
    .completion-stepper { grid-template-columns: 1fr; gap: 15px; margin-top: 18px; }
    .completion-step { grid-template-columns: 34px minmax(0,1fr); padding: 0; }
    .completion-step:not(:last-child)::after { top: 36px; inset-inline-start: 16px; inset-inline-end: auto; width: 2px; height: calc(100% - 20px); }
    .completion-step:nth-child(2)::after { display: block; }
    .completion-step-marker { width: 34px; height: 34px; }
    .completion-step-copy { padding-top: 0; }
    .project-progress-heading { align-items: flex-start; flex-direction: column; }
}

/* White and wine visual identity */
body { background: #f8f6f6; color: #24191b; }
a { color: #4b1822; }
.auth-page {
    background:
        radial-gradient(ellipse at 12% 10%,rgba(75,24,34,.075),transparent 32%),
        radial-gradient(ellipse at 90% 88%,rgba(122,52,66,.06),transparent 34%),
        linear-gradient(140deg,#fff 0%,#faf8f8 56%,#fff 100%);
}
.auth-card { border-color: rgba(255,255,255,.98); background: rgba(255,255,255,.98); box-shadow: 0 28px 80px rgba(53,16,24,.11),0 4px 18px rgba(75,24,34,.045); }
.auth-card::before { background: linear-gradient(90deg,#351018,#4b1822 52%,#8a5360); }
.auth-language, .language-switch { border-color: #eadfe1; background: #faf7f8; }
.auth-language a.is-current, .language-switch a.is-current { color: #4b1822; box-shadow: 0 2px 8px rgba(75,24,34,.12); }
.auth-eyebrow { color: #6b2937; }
.auth-eyebrow::before, .auth-eyebrow::after { background: #d7c0c5; }
.auth-brand h1, .page-header h1 { color: #351018; }
.auth-form label, .form-field label, .project-form label { color: #43363a; }
.form-control, .auth-form .form-control, .project-form .form-control, .project-filter-form .form-control { border-color: #e5dadd; background-color: #fff; }
.form-control:focus, .auth-form .form-control:focus, .project-form .form-control:focus, .project-filter-form .form-control:focus { border-color: #7a3442; box-shadow: 0 0 0 3px rgba(75,24,34,.11); }
.button-primary { background: linear-gradient(110deg,#351018,#4b1822 58%,#71313f); color: #fff; box-shadow: 0 7px 16px rgba(75,24,34,.18); }
.button-primary:hover { background: linear-gradient(110deg,#280b12,#3d111b 58%,#5b2531); color: #fff; }
.button-secondary, .auth-footer .button-secondary { border-color: #e6d7da; background: linear-gradient(135deg,#fff,#f8f2f3); color: #4b1822; }
.button-secondary:hover { border-color: #c9aeb4; background: #f5ebed; color: #351018; }
.admin-sidebar {
    background: radial-gradient(ellipse at 45% 0%,rgba(255,255,255,.075),transparent 40%),linear-gradient(165deg,#55212d 0%,#421722 48%,#351018 100%);
    box-shadow: 8px 0 35px rgba(53,16,24,.14);
}
.admin-brand { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.055); }
.admin-brand strong { color: #fff; }
.admin-brand small { color: #dfc9ce; }
.admin-brand .language-switch { border-color: rgba(255,255,255,.16); background: rgba(33,8,14,.28); }
.admin-brand .language-switch a { color: #f3e9eb; }
.admin-brand .language-switch a.is-current { background: #fff; color: #4b1822; box-shadow: 0 3px 10px rgba(20,5,9,.2); }
.sidebar-caption { color: #c9aeb4; }
.admin-nav a { color: #f0e5e7; }
.admin-nav a:hover { background: rgba(255,255,255,.09); color: #fff; }
.admin-nav a.is-active { border-inline-start-color: #fff; background: linear-gradient(100deg,rgba(255,255,255,.16),rgba(255,255,255,.07)); box-shadow: inset 0 0 18px rgba(255,255,255,.035); color: #fff; }
.admin-nav .nav-icon { color: #e4cbd0; }
.admin-nav .nav-logout { color: #f1b6bc; }
.admin-nav .nav-logout .nav-icon { color: #f1b6bc; }
.admin-content { background: radial-gradient(ellipse at 100% 0%,rgba(75,24,34,.035),transparent 28%); }
.page-header { border-color: #eee5e7; background: rgba(255,255,255,.94); box-shadow: 0 5px 20px rgba(53,16,24,.035); }
.page-subtitle { color: #76686b; }
.mobile-menu-button { border-color: #eadfe1; background: #fff; color: #4b1822; }
.user-chip { border-color: #eadfe1; box-shadow: 0 3px 12px rgba(53,16,24,.035); }
.user-avatar, .summary-icon, .project-stat-card:nth-child(3n+2) .summary-icon, .project-stat-card:nth-child(3n) .summary-icon { background: #f3e8eb; color: #4b1822; }
.summary-card, .summary-card-link { border-color: #eee3e5; background: linear-gradient(145deg,#fff 58%,#faf5f6); }
.summary-card::after { border-color: rgba(75,24,34,.09); }
.summary-card-link:hover { border-color: #c9aeb4; background: #fcf8f9; }
.summary-card-link.is-selected { border-color: #4b1822; box-shadow: 0 0 0 2px rgba(75,24,34,.1),0 7px 25px rgba(53,16,24,.045); }
.data-card, .project-card, .department-card, .project-overview-card, .completion-flow-card { border-color: #eee3e5; box-shadow: 0 7px 22px rgba(53,16,24,.04); }
.project-card:hover, .department-card:hover { border-color: #d8c2c7; box-shadow: 0 13px 28px rgba(53,16,24,.075); }
.project-card, .department-card { background: #fff; }
.project-card-link, .task-table-link, .task-row-main a:hover { color: #4b1822; }
.project-status-hold, .task-status-blocked { color: #71313f; background: #f5ebed; }
.progress-track > span { background: linear-gradient(90deg,#351018,#4b1822 58%,#8a5360); }
.department-progress, .project-progress-heading strong { color: #4b1822; }
.project-overview-card, .completion-flow-card { background: linear-gradient(145deg,#fff 78%,#faf5f6); }
.project-overview-title h2, .data-card-header h2, .completion-flow-heading h2 { color: #351018; }
.project-overview-facts, .users-table td, .task-row { border-color: #eee3e5; }
.task-add-form { border-color: #eee3e5; background: #fcf9fa; }
.table-wrap { border-color: #eee3e5; }
.users-table thead { background: #f8f3f4; color: #61434a; }
.users-table tbody tr:hover { background: #fcf8f9; }
.table-action:hover { border-color: #d8c2c7; background: #f7eef0; color: #4b1822; }
.user-status-filters a:hover { border-color: #c9aeb4; background: #faf5f6; color: #4b1822; }
.user-status-filters a.is-active { border-color: #4b1822; background: #4b1822; color: #fff; }
.completion-flow-kicker { color: #71313f; }
.completion-step.is-done .completion-step-marker { border-color: #4b1822; background: #4b1822; color: #fff; }
.completion-step.is-done:not(:last-child)::after { background: #7a3442; }
.completion-step.is-current .completion-step-marker { border-color: #4b1822; color: #4b1822; box-shadow: 0 0 0 4px rgba(75,24,34,.1); }
.completion-step.is-current .completion-step-copy strong { color: #4b1822; }
.completion-step.is-current .completion-step-state { background: #f3e8eb; color: #4b1822; }
.form-hint-warning { color: #71313f; }
.empty-state { border-color: #eee3e5; background: #fcf8f9; }
.btn-primary, .btn-primary:hover, .btn-primary:focus { border-color: #4b1822; background-color: #4b1822; }
.btn-outline-primary { border-color: #4b1822; color: #4b1822; }
.btn-outline-primary:hover { border-color: #351018; background: #4b1822; color: #fff; }
.text-primary { color: #4b1822 !important; }
.request-action:focus-visible, .button:focus-visible, .admin-nav a:focus-visible, .table-action:focus-visible { outline: 3px solid rgba(75,24,34,.25); outline-offset: 2px; }
.account-edit-card { max-width: 900px; }
.account-edit-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.account-password-section { grid-column: 1/-1; padding: 18px; border: 1px solid #eee3e5; border-radius: 13px; background: #fcf8f9; }
.account-password-section h3 { margin: 0; color: #351018; font-size: 15px; }
.account-password-section > p { margin: 5px 0 14px; color: var(--muted); font-size: 12px; }
.account-password-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.account-edit-actions { grid-column: 1/-1; display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 560px) {
    .account-edit-form, .account-password-grid { grid-template-columns: 1fr; }
    .account-password-section, .account-edit-actions { grid-column: auto; }
    .account-edit-actions .button { width: 100%; }
}

/* Premium dashboard refinement; preserves existing page content and behavior. */
:root {
    --primary: #4b1822;
    --primary-hover: #351018;
    --secondary: #7a3442;
    --background: #f8f6f6;
    --surface: #fff;
    --border: #eadfe1;
    --text-primary: #24191b;
    --text-secondary: #76686b;
    --success: #15803d;
    --warning: #a16207;
    --danger: #b91c1c;
    --radius: 14px;
}

html { scroll-behavior: smooth; }
body {
    background: var(--background);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
::selection { background: #ead9dd; color: #351018; }
:focus-visible { outline: 3px solid rgba(75,24,34,.24); outline-offset: 2px; }

.admin-sidebar {
    background:
        radial-gradient(ellipse at 48% -5%,rgba(255,255,255,.08),transparent 42%),
        linear-gradient(165deg,#54212c 0%,#421722 48%,#351018 100%);
    box-shadow: 8px 0 30px rgba(53,16,24,.1);
}
.admin-brand {
    border-color: rgba(255,255,255,.15);
    background: linear-gradient(145deg,rgba(255,255,255,.075),rgba(255,255,255,.025));
    box-shadow: inset 0 1px rgba(255,255,255,.07);
}
.admin-brand-logo { transition: opacity .2s ease,transform .25s ease; }
.admin-brand-logo-frame:hover .admin-brand-logo { transform: translateY(-2px); }
.admin-nav { gap: 5px; }
.admin-nav a, .admin-nav .nav-logout {
    min-height: 43px;
    border: 1px solid transparent;
    transition: background .18s ease,border-color .18s ease,color .18s ease,transform .18s ease;
}
.admin-nav a:hover { transform: translateX(-2px); }
html[dir="ltr"] .admin-nav a:hover { transform: translateX(2px); }
.admin-nav a.is-active {
    border-color: rgba(255,255,255,.1);
    border-inline-start: 3px solid #fff;
    background: linear-gradient(100deg,rgba(255,255,255,.16),rgba(255,255,255,.065));
}
.admin-nav .nav-icon { transition: color .18s ease,transform .18s ease; }
.admin-nav a:hover .nav-icon { transform: translateY(-1px); color: #fff; }

.admin-content { background-color: var(--background); }
.page-header {
    position: relative;
    z-index: 30;
    overflow: visible;
    border-color: rgba(234,223,225,.85);
    background: rgba(255,255,255,.94);
    box-shadow: 0 3px 14px rgba(53,16,24,.025);
    backdrop-filter: blur(12px);
}
.page-header h1 { letter-spacing: -.025em; }
.user-chip { transition: border-color .18s ease,box-shadow .18s ease,transform .18s ease; }
.user-chip:hover { transform: translateY(-1px); border-color: #d8c2c7; box-shadow: 0 7px 18px rgba(53,16,24,.07); }
.user-avatar { background: linear-gradient(145deg,#f6edef,#ead9dd); color: var(--primary); }

.content-stack > * { animation: dashboard-enter .34s ease both; }
.content-stack > :nth-child(2) { animation-delay: 35ms; }
.content-stack > :nth-child(3) { animation-delay: 70ms; }
.content-stack > :nth-child(4) { animation-delay: 105ms; }
@keyframes dashboard-enter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.summary-card, .data-card, .project-card, .department-card, .project-overview-card, .completion-flow-card {
    border-color: #eee5e7;
    box-shadow: 0 3px 14px rgba(53,16,24,.025);
}
.summary-card {
    min-height: 82px;
    background: linear-gradient(145deg,#fff 65%,#fbf8f9);
    transition: transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.summary-card:hover {
    transform: translateY(-2px);
    border-color: #ddc9ce;
    box-shadow: 0 9px 22px rgba(53,16,24,.065);
}
.summary-card::after { border-color: rgba(75,24,34,.075); }
.summary-icon {
    border: 1px solid rgba(75,24,34,.045);
    background: #f5edef;
    color: var(--primary);
}
.summary-icon-pending { background: #f8f0df; color: #8a5b11; }
.data-card { padding: 21px; }
.data-card-header { align-items: center; }
.data-card-header h2 { letter-spacing: -.015em; }
.data-card-header p { line-height: 1.7; }

.button {
    min-height: 42px;
    border-radius: 11px;
    transition: background .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-primary {
    background: linear-gradient(115deg,#351018,#4b1822 62%,#71313f);
    box-shadow: 0 4px 11px rgba(75,24,34,.13);
}
.button-primary:hover { box-shadow: 0 7px 16px rgba(75,24,34,.18); }
.button-primary:disabled, .button-primary[aria-disabled="true"] { opacity: .56; box-shadow: none; cursor: not-allowed; transform: none; }
.button-secondary { background: #fff; }
.button-danger { transition: background .16s ease,border-color .16s ease,transform .16s ease; }
button:disabled, input:disabled, select:disabled { opacity: .58; cursor: not-allowed; }
.form-control {
    min-height: 44px;
    border-color: #e8dfe1;
    border-radius: 11px;
    background-color: #fff;
    transition: border-color .16s ease,box-shadow .16s ease,background-color .16s ease;
}
.form-control:hover:not(:focus):not(:disabled) { border-color: #d4c1c6; }
.form-control:focus { border-color: #7a3442; box-shadow: 0 0 0 3px rgba(75,24,34,.1); }
.form-field { gap: 8px; }
.form-field label, .auth-form label { line-height: 1.5; }

.table-wrap { border-color: #eee5e7; border-radius: 13px; }
.users-table { min-width: 980px; }
.users-table thead { background: #faf7f8; color: #62494f; }
.users-table th { padding-block: 14px; letter-spacing: .01em; }
.users-table td { padding-block: 14px; }
.users-table tbody tr { transition: background .15s ease; }
.users-table tbody tr:hover { background: #fdfafb; }
.person-avatar { border: 1px solid #eee3e5; background: #f5edef; color: var(--primary); }
.status-badge, .role-badge { min-height: 25px; padding-inline: 10px; }
.table-action { transition: background .15s ease,border-color .15s ease,color .15s ease,transform .15s ease; }
.table-action:hover { transform: translateY(-1px); }
.user-status-filters a { min-height: 36px; }
.admin-password-reset-form { border-color: #eee3e5; box-shadow: 0 16px 38px rgba(53,16,24,.13); }

.project-card, .department-card {
    border-radius: 15px;
    transition: transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.project-card:hover, .department-card:hover {
    transform: translateY(-2px);
    border-color: #ddc9ce;
    box-shadow: 0 12px 26px rgba(53,16,24,.075);
}
.project-overview-card, .completion-flow-card {
    border-radius: 17px;
    background: linear-gradient(145deg,#fff 78%,#fbf7f8);
}
.project-status, .task-status { min-height: 26px; align-items: center; }
.progress-track { background: #f0eaeb; }
.progress-track > span { background: linear-gradient(90deg,#351018,#4b1822 72%,#8a5360); }
.task-add-form { border-radius: 13px; }
.task-row { transition: background .15s ease; }
.task-row:hover { background: #fdfafb; }
.completion-flow-card { padding: 25px; }
.completion-flow-kicker { letter-spacing: .1em; }
.completion-step-marker { transition: border-color .18s ease,background .18s ease,box-shadow .18s ease; }
.completion-step.is-done .completion-step-marker { background: linear-gradient(145deg,#4b1822,#71313f); }
.completion-step.is-current .completion-step-marker { box-shadow: 0 0 0 4px rgba(75,24,34,.085); }

.auth-page {
    padding-block: clamp(20px,5vh,48px);
    background:
        radial-gradient(ellipse at 10% 12%,rgba(75,24,34,.055),transparent 33%),
        radial-gradient(ellipse at 92% 90%,rgba(122,52,66,.045),transparent 36%),
        linear-gradient(145deg,#fff 0%,#faf8f8 58%,#fff 100%);
}
.auth-card {
    border: 1px solid rgba(255,255,255,.96);
    box-shadow: 0 22px 62px rgba(53,16,24,.09),0 3px 12px rgba(53,16,24,.035);
}
.auth-card::before { height: 4px; }
.brand-logo-frame { transition: transform .2s ease; }
.brand-logo-frame:hover { transform: translateY(-2px); }
.auth-brand h1 { letter-spacing: -.02em; }
.auth-eyebrow { letter-spacing: .12em; }

.notice { border-radius: 12px; }
.project-template-notice { box-shadow: 0 8px 22px rgba(21,139,166,.06); }
.page-overlay { background: rgba(30,12,16,.48); backdrop-filter: blur(2px); }
.dropdown-menu, .modal-content {
    border: 1px solid #eee3e5;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(53,16,24,.12);
}
.dropdown-menu.show { animation: dropdown-enter .16s ease both; }
@keyframes dropdown-enter {
    from { opacity: 0; transform: translateY(-4px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 767px) {
    .data-card { padding: 16px 13px; }
    .summary-card { min-height: 72px; }
    .admin-sidebar { box-shadow: 12px 0 36px rgba(30,12,16,.2); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

:root {
    color-scheme: light;
    --primary: #15accf;
    --primary-hover: #0785a6;
    --primary-dark: #087f9c;
    --primary-deep: #075d73;
    --primary-light: #38c7e8;
    --primary-lighter: #8be4f5;
    --primary-soft: #eafaff;
    --secondary: #6366f1;
    --sidebar: #081923;
    --background: #f4f9fb;
    --page: #f4f9fb;
    --surface: #fff;
    --card: #fff;
    --border: #dce9ed;
    --text-primary: #10232c;
    --text-secondary: #617680;
    --text: #10232c;
    --muted: #617680;
    --success: #15803d;
    --warning: #a16207;
    --danger: #be123c;
}

body { background: var(--background); color: var(--text-primary); }
a { color: var(--primary-dark); }
.admin-content {
    background:
        radial-gradient(circle at 98% 0%,rgba(21,172,207,.09),transparent 29%),
        radial-gradient(circle at 0% 80%,rgba(99,102,241,.025),transparent 26%),
        var(--background);
}

.auth-page {
    background:
        radial-gradient(ellipse at 10% 10%,rgba(21,172,207,.14),transparent 33%),
        radial-gradient(ellipse at 92% 88%,rgba(99,102,241,.07),transparent 35%),
        linear-gradient(145deg,#fff 0%,#f2f9fb 58%,#fff 100%);
}
.auth-card {
    border-color: rgba(255,255,255,.96);
    box-shadow: 0 26px 72px rgba(8,46,61,.12),0 4px 16px rgba(21,172,207,.07);
}
.auth-card::before { background: linear-gradient(90deg,#087f9c,#15accf 48%,#8be4f5); }
.auth-eyebrow { color: #087f9c; }
.auth-eyebrow::before, .auth-eyebrow::after { background: #8bd7e5; }
.auth-brand h1, .page-header h1 { color: #102c38; }
.auth-language, .language-switch { border-color: #dce9ed; background: #f5fafb; }
.auth-language a.is-current, .language-switch a.is-current {
    color: #075d73;
    box-shadow: 0 2px 9px rgba(21,172,207,.17);
}

.admin-sidebar {
    background:
        radial-gradient(ellipse at 45% -4%,rgba(21,172,207,.16),transparent 42%),
        linear-gradient(165deg,#0c2531 0%,#0a202b 48%,#081923 100%);
    box-shadow: 8px 0 34px rgba(8,25,35,.19);
}
.admin-brand {
    border-color: rgba(139,228,245,.19);
    background: linear-gradient(145deg,rgba(255,255,255,.075),rgba(255,255,255,.025));
}
.admin-brand strong { color: #f4fdff; }
.admin-brand small { color: #a9d8e2; }
.admin-brand .language-switch { border-color: rgba(139,228,245,.2); background: rgba(3,17,24,.48); }
.admin-brand .language-switch a { color: #d1e9ee; }
.admin-brand .language-switch a.is-current {
    background: linear-gradient(135deg,#38c7e8,#15accf 58%,#0785a6);
    color: #fff;
    box-shadow: 0 3px 12px rgba(21,172,207,.27),inset 0 1px 0 rgba(255,255,255,.25);
}
.sidebar-caption { color: #80b8c5; }
.admin-nav a, .admin-nav .nav-logout { color: #c4d8de; }
.admin-nav a:hover { background: rgba(56,199,232,.09); color: #fff; }
.admin-nav a.is-active {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(139,228,245,.15);
    border-inline-start: 3px solid #8be4f5;
    background: linear-gradient(115deg,rgba(21,172,207,.26),rgba(56,199,232,.12));
    box-shadow: 0 5px 18px rgba(21,172,207,.12),inset 0 1px 0 rgba(255,255,255,.08);
    color: #f3fdff;
}
.admin-nav a.is-active::after {
    position: absolute;
    top: -60%;
    inset-inline-start: -45%;
    width: 35%;
    height: 220%;
    background: linear-gradient(90deg,transparent,rgba(255,255,255,.12),transparent);
    content: "";
    pointer-events: none;
}
.admin-nav .nav-icon { color: #66cde1; }
.admin-nav a.is-active .nav-icon { color: #b8f2fb; }
.admin-nav .nav-logout { color: #fda4af; }
.admin-nav .nav-logout .nav-icon { color: #fb7185; }

.page-header {
    border-color: rgba(220,233,237,.92);
    background: rgba(255,255,255,.84);
    box-shadow: 0 4px 18px rgba(8,46,61,.045);
}
.page-subtitle { color: #68808a; }
.mobile-menu-button { border-color: #dce9ed; background: #fff; color: #087f9c; }
.user-chip { border-color: #dce9ed; box-shadow: 0 3px 13px rgba(8,46,61,.045); }
.user-chip:hover { border-color: #a8dce6; box-shadow: 0 8px 20px rgba(21,172,207,.11); }
.user-avatar {
    border: 1px solid rgba(21,172,207,.12);
    background: linear-gradient(145deg,#e7fbff,#c5f2fb);
    color: #075d73;
}

.summary-card, .data-card, .project-card, .department-card, .project-overview-card, .completion-flow-card {
    border-color: #deeaed;
    box-shadow: 0 4px 18px rgba(8,46,61,.045);
}
.summary-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: linear-gradient(135deg,#fff 53%,#f2fbfd);
    transition: transform .2s ease,border-color .2s ease,box-shadow .2s ease;
}
.summary-card > * { position: relative; z-index: 1; }
.summary-card::after {
    width: 96px;
    height: 96px;
    border: 0;
    border-radius: 50%;
    background: radial-gradient(circle,rgba(21,172,207,.13),rgba(21,172,207,0) 70%);
    filter: blur(2px);
    pointer-events: none;
}
.summary-card:hover {
    transform: translateY(-2px);
    border-color: #addce5;
    box-shadow: 0 12px 28px rgba(21,172,207,.11);
}
.summary-icon {
    border: 1px solid rgba(21,172,207,.1);
    background: linear-gradient(145deg,#e8fbff,#d6f7fc);
    color: #087f9c;
}
.summary-card:nth-child(2) .summary-icon { border-color: #c8f0dc; background: linear-gradient(145deg,#effdf5,#d9f8e6); color: #15803d; }
.summary-card:nth-child(3) .summary-icon { border-color: #f5e5bd; background: linear-gradient(145deg,#fff9e9,#fff0c8); color: #a16207; }
.summary-card:nth-child(4) .summary-icon { border-color: #dedbff; background: linear-gradient(145deg,#f3f2ff,#e4e2ff); color: #5b55c8; }
.summary-card-link.is-selected {
    border-color: #15accf;
    background: linear-gradient(135deg,rgba(21,172,207,.11),rgba(255,255,255,.96) 74%);
    box-shadow: 0 0 0 2px rgba(21,172,207,.11),0 8px 22px rgba(21,172,207,.08);
}
.summary-card-link:hover { border-color: #9edbe6; background-color: #f8fdfe; }
.data-card { background: rgba(255,255,255,.97); }
.data-card-header h2 { color: #123643; }
.data-card-header p { color: #68808a; }

.button { position: relative; overflow: hidden; border-radius: 11px; }
.button-primary {
    border-color: rgba(7,127,156,.22);
    background: linear-gradient(135deg,#38c7e8 0%,#15accf 48%,#0785a6 100%);
    box-shadow: 0 8px 22px rgba(21,172,207,.22),inset 0 1px 0 rgba(255,255,255,.3);
}
.button-primary::before {
    position: absolute;
    top: -45%;
    inset-inline-start: -80%;
    width: 42%;
    height: 190%;
    background: linear-gradient(90deg,transparent,rgba(255,255,255,.34),transparent);
    content: "";
    pointer-events: none;
    transform: skewX(-22deg);
    transition: inset-inline-start .55s ease;
}
.button-primary:hover {
    border-color: rgba(7,127,156,.35);
    background: linear-gradient(135deg,#53d3ed 0%,#22b8e8 48%,#087f9c 100%);
    box-shadow: 0 11px 27px rgba(21,172,207,.28),inset 0 1px 0 rgba(255,255,255,.36);
}
.button-primary:hover::before { inset-inline-start: 140%; }
.button-primary:active { transform: translateY(1px); }
.button-primary:disabled, .button-primary[aria-disabled="true"] { opacity: .58; box-shadow: none; }
.button-secondary {
    border-color: #cfe5e9;
    background: linear-gradient(135deg,#fff,#f2fafb);
    color: #087f9c;
}
.button-secondary:hover { border-color: #9bd6e1; background: #eefdff; color: #075d73; }
.button-danger { box-shadow: 0 3px 10px rgba(190,18,60,.08); }
.form-control {
    border-color: #dce9ed;
    background-color: #fff;
}
.form-control:hover:not(:focus):not(:disabled) { border-color: #a9dbe4; }
.form-control:focus, .auth-form .form-control:focus, .project-form .form-control:focus, .project-filter-form .form-control:focus {
    border-color: #15accf;
    box-shadow: 0 0 0 3px rgba(21,172,207,.14);
}
.auth-form label, .form-field label, .project-form label { color: #29434c; }

.table-wrap { border-color: #deeaed; }
.users-table thead { background: linear-gradient(180deg,#f3fafb,#edf6f8); color: #46636d; }
.users-table th { border-bottom-color: #deeaed; }
.users-table td { border-bottom-color: #edf3f4; }
.users-table tbody tr:hover { background: #f5fbfc; }
.person-avatar { border-color: #d7eef2; background: linear-gradient(145deg,#e9fbfe,#d5f5fa); color: #087f9c; }
.status-badge, .task-status, .project-status {
    gap: 6px;
    border: 1px solid transparent;
}
.status-badge::before, .task-status::before, .project-status::before {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: currentColor;
    content: "";
    opacity: .72;
}
.status-active, .task-status-complete, .project-status-complete {
    border-color: #bbebcf;
    background: #edfbf3;
    color: #167346;
}
.status-inactive, .status-rejected, .task-status-overdue {
    border-color: #f5cbd5;
    background: #fff1f4;
    color: #b42348;
}
.status-pending, .task-status-blocked, .project-status-hold {
    border-color: #f2e1b6;
    background: #fff9e9;
    color: #94640c;
}
.project-status-new, .task-status-new {
    border-color: #d8e7eb;
    background: #f2f8fa;
    color: #49636d;
}
.project-status-progress, .task-status-progress {
    border-color: #b9e7ef;
    background: #eafbfe;
    color: #087f9c;
}
.role-admin { border: 1px solid #dfd9ff; background: #f2f0ff; color: #5a4cb4; }
.role-user { border: 1px solid #b9e7ef; background: #eafbfe; color: #087f9c; }
.table-action { border-color: #dce9ed; }
.table-action:hover { border-color: #9bd6e1; background: #eafbfe; color: #075d73; }
.user-status-filters a { border-color: #dce9ed; }
.user-status-filters a:hover { border-color: #a9dbe4; background: #f2fbfd; color: #087f9c; }
.user-status-filters a.is-active {
    border-color: transparent;
    background: linear-gradient(135deg,#38c7e8 0%,#15accf 52%,#0785a6 100%);
    box-shadow: 0 5px 14px rgba(21,172,207,.2),inset 0 1px 0 rgba(255,255,255,.24);
    color: #fff;
}
.request-password { border-color: #dce9ed; background: #eafbfe; color: #087f9c; }
.request-password:hover { background: #d8f6fb; }
.request-password-submit { background: linear-gradient(135deg,#38c7e8,#15accf 52%,#0785a6); color: #fff; }
.request-password-submit:hover { background: linear-gradient(135deg,#53d3ed,#22b8e8 52%,#087f9c); }
.admin-password-reset-form { border-color: #dce9ed; box-shadow: 0 16px 40px rgba(8,46,61,.16); }
.admin-password-reset-form > strong { color: #123643; }
.admin-password-reset-form label { color: #29434c; }
.request-approve { border: 1px solid #bbebcf; }
.request-reject { border: 1px solid #f5cbd5; }

.project-card, .department-card { border-color: #deeaed; background: linear-gradient(155deg,#fff 74%,#f6fbfc); }
.project-card.project-state-completed { background: linear-gradient(145deg,#ddf6e8 0%,#bce9cf 100%); border-color: #64bf8c; border-inline-start: 5px solid #16834d; }
.project-card.project-state-completed:hover { border-color: #16834d; }
.project-card.project-state-planning { background: linear-gradient(145deg,#dfedff 0%,#bfdafa 100%); border-color: #71a9df; border-inline-start: 5px solid #2874bd; }
.project-card.project-state-planning:hover { border-color: #2874bd; }
.project-card.project-state-on_hold { background: linear-gradient(145deg,#ffe4e4 0%,#f6c6c6 100%); border-color: #db8b8b; border-inline-start: 5px solid #bf4c4c; }
.project-card.project-state-on_hold:hover { border-color: #bf4c4c; }
.project-card.project-state-in_progress { background: #fff; }
.project-list-grid .branch-project-card { --branch-accent:#0785a6; --branch-soft:#edfaff; --branch-edge:#cbe7ed; display:flex; flex-direction:column; gap:0; padding:20px; border:1px solid var(--branch-edge); border-top:4px solid var(--branch-accent); border-radius:20px; background:linear-gradient(155deg,var(--branch-soft) 0%,#fff 75%); box-shadow:0 6px 20px rgba(16,44,56,.045); }
.project-list-grid .branch-project-card.project-state-completed { --branch-accent:#188653; --branch-soft:#c7efd8; --branch-edge:#99d6b2; }
.project-list-grid .branch-project-card.project-state-planning { --branch-accent:#2876c2; --branch-soft:#cde3ff; --branch-edge:#a6c9ed; }
.project-list-grid .branch-project-card.project-state-on_hold { --branch-accent:#c14e59; --branch-soft:#fad2d6; --branch-edge:#e8a9b1; }
.project-list-grid .branch-project-card.project-state-in_progress { --branch-soft:#fff; }
.project-list-grid .branch-project-card:hover { border-color:var(--branch-accent); box-shadow:0 12px 28px rgba(16,44,56,.09); }
.branch-card-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:16px; }
.branch-card-symbol { display:grid; place-items:center; width:42px; height:42px; border-radius:13px; background:rgba(255,255,255,.75); color:var(--branch-accent); border:1px solid var(--branch-edge); }
.branch-card-status { display:inline-flex; gap:6px; align-items:center; padding:6px 10px; border-radius:99px; font-size:11px; font-weight:700; color:var(--branch-accent); background:rgba(255,255,255,.85); }
.branch-card-status > span { font-size:8px; }
.branch-card-title h3 { margin:0; font-size:17px; font-weight:800; line-height:1.6; overflow-wrap:anywhere; }
.branch-card-title p { margin:4px 0 12px; color:#587582; font-size:12px; }
.branch-card-type { align-self:flex-start; font-size:11px; font-weight:700; color:var(--branch-accent); padding:4px 10px; border:1px solid var(--branch-edge); border-radius:7px; background:rgba(255,255,255,.55); }
.branch-card-progress { display:flex; align-items:center; justify-content:space-between; margin:20px 0 8px; }
.branch-card-progress > span { color:#587582; font-size:12px; }
.branch-card-progress strong { color:var(--branch-accent); font-size:26px; line-height:1; }
.branch-card-progress small { font-size:13px; margin-inline-start:2px; }
.branch-project-card .progress-track { height:7px; background:#e6eef1; }
.branch-project-card .progress-track > span { background:var(--branch-accent); }
.branch-card-deadline, .branch-card-creator { display:flex; flex-wrap:wrap; justify-content:space-between; gap:5px; font-size:11px; margin-top:14px; color:#587582; }
.branch-card-deadline strong, .branch-card-creator strong { color:#163945; }
.branch-card-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; margin:18px 0; }
.branch-card-metrics > div { display:grid; gap:5px; text-align:center; padding:11px 4px; background:rgba(255,255,255,.8); border:1px solid var(--branch-edge); border-radius:11px; }
.branch-card-metrics strong { font-size:17px; }
.branch-card-metrics strong span { font-size:11px; color:#587582; }
.branch-card-metrics small { font-size:10px; color:#587582; line-height:1.5; }
.branch-card-overdue { color:#b25252; margin-bottom:10px; }
.branch-project-card .branch-card-link { margin-top:auto; display:flex; justify-content:space-between; color:var(--branch-accent); border:1px solid var(--branch-edge); background:#fff; min-height:40px; font-size:12px; padding:10px 13px; }
.branch-project-card .branch-card-link:hover { background:var(--branch-soft); border-color:var(--branch-accent); }
.project-state-completed .progress-track > span { background: linear-gradient(90deg,#229b60,#78dba2); }
.project-state-planning .project-status-new { background: #e8f2ff; border-color: #bdd7f4; color: #3276b3; }
.project-state-on_hold .project-status-hold { background: #ffeded; border-color: #efbcbc; color: #b25252; }
.project-card:hover, .department-card:hover {
    border-color: #a9dbe4;
    box-shadow: 0 13px 28px rgba(21,172,207,.12);
}
.project-overview-card, .completion-flow-card {
    border-color: #dce9ed;
    background: linear-gradient(145deg,#fff 72%,#eff9fb);
}
.project-overview-title h2, .completion-flow-heading h2 { color: #123643; }
.project-overview-facts { border-top-color: #e5eef0; }
.project-progress-heading strong, .department-progress { color: #087f9c; }
.progress-track { background: #e6f0f2; }
.progress-track > span {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg,#087f9c 0%,#15accf 55%,#72e0f3 100%);
}
.progress-track > span::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg,transparent 25%,rgba(255,255,255,.42) 50%,transparent 72%);
    content: "";
    animation: progress-glint .9s ease-out .12s 1 both;
}
@keyframes progress-glint {
    from { transform: translateX(-110%); }
    to { transform: translateX(110%); }
}
.task-add-form { border-color: #deeaed; background: linear-gradient(145deg,#fff,#f6fbfc); }
.task-row { border-bottom-color: #eaf1f3; }
.task-row:hover { background: #f5fbfc; }
.completion-flow-card { box-shadow: 0 7px 24px rgba(8,46,61,.055); }
.completion-flow-kicker { color: #087f9c; }
.completion-step-marker { border-color: #dce9ed; }
.completion-step.is-done .completion-step-marker {
    border-color: #087f9c;
    background: linear-gradient(145deg,#38c7e8,#15accf 58%,#0785a6);
    box-shadow: 0 4px 12px rgba(21,172,207,.18);
}
.completion-step.is-done:not(:last-child)::after { background: linear-gradient(90deg,#15accf,#8be4f5); }
.completion-step.is-current .completion-step-marker { border-color: #15accf; color: #087f9c; box-shadow: 0 0 0 4px rgba(21,172,207,.11); }
.completion-step.is-current .completion-step-copy strong { color: #087f9c; }
.completion-step.is-current .completion-step-state { background: #eafbfe; color: #087f9c; }

.account-password-section { border-color: #deeaed; background: #f6fbfc; }
.account-password-section h3 { color: #123643; }
.empty-state { border-color: #deeaed; background: #f6fbfc; }
.notice-success { border-color: #bbebcf; }
.notice-danger { border-color: #f5cbd5; }
.page-overlay { background: rgba(4,22,31,.55); }
.dropdown-menu, .modal-content { border-color: #deeaed; box-shadow: 0 16px 40px rgba(8,46,61,.15); }

html[data-theme="dark"] {
    color-scheme: dark;
    --background: #071318;
    --page: #071318;
    --surface: #0b1f28;
    --card: #0b1f28;
    --border: #21404b;
    --text-primary: #e6f3f6;
    --text-secondary: #a0bbc3;
    --text: #e6f3f6;
    --muted: #a0bbc3;
}
html[data-theme="dark"] body, html[data-theme="dark"] .admin-content { background-color: var(--background); color: var(--text-primary); }
html[data-theme="dark"] .page-header, html[data-theme="dark"] .data-card,
html[data-theme="dark"] .summary-card, html[data-theme="dark"] .project-card,
html[data-theme="dark"] .department-card, html[data-theme="dark"] .project-overview-card,
html[data-theme="dark"] .completion-flow-card, html[data-theme="dark"] .admin-password-reset-form,
html[data-theme="dark"] .dropdown-menu, html[data-theme="dark"] .modal-content {
    border-color: var(--border);
    background: linear-gradient(145deg,#0b1f28,#102a36);
    color: var(--text-primary);
}
html[data-theme="dark"] .page-header h1, html[data-theme="dark"] .data-card-header h2,
html[data-theme="dark"] .project-overview-title h2, html[data-theme="dark"] .completion-flow-heading h2,
html[data-theme="dark"] .admin-password-reset-form > strong { color: #e6f3f6; }
html[data-theme="dark"] .users-table thead { background: #102a36; color: #c6e1e7; }
html[data-theme="dark"] .users-table td { border-color: #21404b; }
html[data-theme="dark"] .users-table tbody tr:hover, html[data-theme="dark"] .task-row:hover { background: rgba(21,172,207,.08); }
html[data-theme="dark"] .form-control { border-color: #21404b; background: #071b24; color: #e6f3f6; }
html[data-theme="dark"] .button-secondary, html[data-theme="dark"] .table-action,
html[data-theme="dark"] .user-status-filters a { border-color: #21404b; background: #102a36; color: #bceef6; }
html[data-theme="dark"] .task-add-form, html[data-theme="dark"] .account-password-section { border-color: #21404b; background: #0b1f28; }
html[data-theme="dark"] .completion-step-marker { border-color: #21404b; background: #102a36; color: #b7ccd2; }
html[data-theme="dark"] .auth-page { background: radial-gradient(ellipse at 10% 10%,rgba(21,172,207,.12),transparent 35%),#071318; }
html[data-theme="dark"] .auth-card { border-color: #21404b; background: #0b1f28; }
html[data-theme="dark"] .auth-brand h1, html[data-theme="dark"] .auth-form label { color: #e6f3f6; }
html[data-theme="dark"] .auth-language { border-color: #21404b; background: #102a36; }

@media (prefers-reduced-motion: reduce) {
    .progress-track > span::after { animation: none; }
    .button-primary::before { transition: none; }
}

.project-task-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}
.project-task-summary-card {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 16px;
    border: 1px solid #deeaed;
    border-radius: 14px;
    background: linear-gradient(145deg,#fff,#f4fbfd);
    box-shadow: 0 5px 17px rgba(8,46,61,.045);
}
.project-task-summary-card small { color: #66808a; font-size: 12px; }
.project-task-summary-card strong { color: #123643; font-size: 25px; line-height: 1; }
.project-task-summary-card.status-completed strong { color: #15803d; }
.project-task-summary-card.status-in_progress strong { color: #087f9c; }
.project-task-summary-card.status-blocked strong { color: #c2413b; }
.stopped-task-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 10px; }
.stopped-task-item {
    display: grid;
    gap: 5px;
    padding: 13px;
    border: 1px solid #f3c9c5;
    border-inline-start: 3px solid #e6685f;
    border-radius: 11px;
    background: #fff8f7;
    color: #79342f;
    text-decoration: none;
}
.stopped-task-item span, .stopped-task-item small { color: #8d6562; font-size: 12px; }
.task-filter-bar { display: grid; grid-template-columns: minmax(220px,1fr) repeat(2,minmax(160px,.45fr)); gap: 9px; margin: 14px 0; }
.department-card { overflow: hidden; padding: 0; }
.department-card:not([open]) > :not(summary) { display: none; }
.department-card > summary { padding: 17px; cursor: pointer; list-style: none; }
.department-card > summary::-webkit-details-marker { display: none; }
.department-card > summary::after { content: "⌄"; color: #087f9c; font-size: 18px; transition: transform .18s ease; }
.department-card[open] > summary::after { transform: rotate(180deg); }
.department-card[open] > :not(summary) { animation: department-content-in .18s ease-out; }
.department-card > :not(summary) { margin-inline: 16px; }
.department-card > .task-add-open { margin-block: 12px; }
.department-schedule { margin-block: 12px; padding: 12px; border: 1px solid #dce9ed; border-radius: 10px; background: #f6fbfc; }
.department-schedule form { display: grid; gap: 8px; }
.department-schedule label { font-size: 13px; font-weight: 700; }
.department-schedule small { color: #70858c; line-height: 1.7; }
.department-card > .task-list, .department-card > .department-attachments { margin-block: 12px 16px; }
.task-row {
    display: grid;
    grid-template-columns: minmax(150px,1.4fr) auto minmax(150px,.7fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #e8f0f2;
    animation: department-content-in .2s ease-out;
}
.task-row[hidden] { display: none; }
.task-row-main { min-width: 0; display: grid; gap: 4px; }
.task-row-main a { overflow-wrap: anywhere; font-weight: 700; }
.task-row-main small, .task-note-form label, .task-special-meta small { color: #70858c; font-size: 11px; }
.task-row-actions { display: flex; align-items: center; gap: 4px; }
.task-attachments { grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid #e5eff1; }
.task-attachments h4 { margin: 0 0 10px; font-size: 13px; font-weight: 700; }
.task-attachment-upload { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.task-attachment-upload .form-control { min-width: 0; flex: 1 1 180px; width: auto; }
.task-attachment-upload .button { flex: 0 0 auto; }
.task-attachments > small { display: block; margin-block: 6px; color: #70858c; }
.task-attachment-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.task-attachment-list .button { max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
.task-note-form { display: grid; gap: 5px; grid-column: 1 / -1; }
.task-note-form textarea { min-height: 48px; font-size: 12px; }
.task-special-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    grid-column: 1 / -1;
    padding: 9px 11px;
    border: 1px solid #d9f0f4;
    border-radius: 9px;
    background: #f2fbfd;
    color: #075d73;
    font-size: 12px;
}
.task-add-open { margin-block: 12px; }
.department-attachments { padding-top: 13px; border-top: 1px solid #e5eff1; }
.attachments-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.attachments-heading h4 { margin: 0; color: #123643; font-size: 14px; font-weight: 750; }
.attachments-heading span { color: #768d94; font-size: 11px; }
.attachment-upload-form { display: grid; grid-template-columns: minmax(160px,1.2fr) minmax(140px,1fr) auto; gap: 8px; margin-bottom: 12px; }
.attachment-upload-form .form-control { min-width: 0; min-height: 38px; font-size: 11px; }
.attachment-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(230px,1fr)); gap: 9px; }
.attachment-card { display: grid; grid-template-columns: 52px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 9px; border: 1px solid #deeaed; border-radius: 11px; background: #fff; }
.attachment-card-copy { min-width: 0; display: grid; gap: 4px; }
.attachment-card-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.attachment-card-copy small { color: #6d848b; font-size: 10px; }
.attachment-preview-button { width: 52px; height: 52px; overflow: hidden; padding: 0; border: 0; border-radius: 8px; background: #eef8fa; }
.attachment-preview-button img { width: 100%; height: 100%; object-fit: cover; }
.attachment-file-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 8px; background: #e7f8fb; color: #087f9c; font-size: 10px; font-weight: 800; }
.attachment-card .button, .attachment-card .button-quiet { padding: 5px 8px; font-size: 10px; }
.project-activity-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.project-activity-card > summary { cursor: pointer; list-style: none; margin-bottom: 0; }
.project-activity-card > summary::-webkit-details-marker { display: none; }
.project-activity-card > summary::after { content: '⌄'; color: #087f9c; font-size: 20px; }
.project-activity-card[open] > summary { margin-bottom: 17px; }
.project-activity-card[open] > summary::after { transform: rotate(180deg); }
.project-activity-card:not([open]) > :not(summary) { display: none; }
.project-activity-card > summary:focus-visible { outline: 2px solid #15accf; outline-offset: 4px; border-radius: 8px; }
.project-activity-list li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; padding: 10px 0; }
.activity-dot { width: 9px; height: 9px; margin-top: 5px; border: 2px solid #fff; border-radius: 50%; background: #15accf; box-shadow: 0 0 0 2px #bcecf4; }
.project-activity-list li > div { display: flex; flex-wrap: wrap; gap: 5px 10px; align-items: baseline; }
.project-activity-list strong { color: #123643; font-size: 12px; }
.project-activity-list span { color: #4c6670; font-size: 12px; }
.project-activity-list small { color: #80949a; font-size: 10px; }
.project-toast { position: fixed; z-index: 1080; inset-inline-end: 22px; bottom: 22px; max-width: min(90vw,380px); padding: 12px 18px; border: 1px solid #a5e5c0; border-radius: 12px; background: #effcf4; box-shadow: 0 12px 30px rgba(8,46,61,.16); color: #166534; opacity: 0; transform: translateY(12px); transition: opacity .2s ease,transform .2s ease; pointer-events: none; }
.project-toast.is-visible { opacity: 1; transform: translateY(0); }
.project-toast.is-error { border-color: #f0b8b5; background: #fff4f3; color: #a12e2a; }
.task-modal-fields { display: grid; gap: 13px; }
.task-modal-fields label { display: grid; gap: 6px; color: #36515a; font-size: 12px; font-weight: 700; }
.image-preview-content { position: relative; align-items: center; padding: 18px; background: #071b24; }
.image-preview-content img { max-width: 100%; max-height: 78vh; object-fit: contain; }
.image-preview-content p { margin: 9px 0 0; color: #d7f5fa; }
.image-preview-close { position: absolute; z-index: 1; top: 14px; inset-inline-end: 14px; background-color: white; }
.button-quiet { min-height: 30px; padding: 5px 8px; border: 0; background: transparent; color: #087f9c; font-size: 11px; }
.button-quiet:hover { background: #eaf8fb; }
.danger-text { color: #b42318; }
.button-danger { border: 1px solid #efc3c0; background: #fff3f2; color: #a12e2a; }
.template-department-form { padding-bottom: 13px; border-bottom: 1px solid #e5eff1; }
.template-department-heading, .template-edit-fields, .template-task-form { display: flex; align-items: center; gap: 9px; }
.template-department-heading { justify-content: space-between; margin-bottom: 10px; }
.template-department-heading h2 { margin: 0; font-size: 16px; }
.template-edit-fields > label { flex: 1; display: grid; gap: 5px; color: #617980; font-size: 11px; }
.template-edit-fields .form-control, .template-task-form .form-control { min-width: 0; min-height: 36px; font-size: 11px; }
.template-edit-fields .button, .template-task-form .button { flex: 0 0 auto; }
.template-active-toggle { display: flex; flex: 0 0 auto; align-items: center; gap: 5px; color: #58717a; font-size: 11px; white-space: nowrap; }
.template-task-list { display: grid; gap: 8px; margin-top: 12px; }
.template-task-form { display: grid; grid-template-columns: minmax(180px,1.1fr) minmax(200px,1.8fr) 74px auto auto; }
.template-task-form .template-task-title,
.template-task-form .template-task-description { width: 100%; min-width: 0; }
.template-task-form .template-sequence { width: 74px; }
.template-task-add { grid-template-columns: minmax(180px,1.1fr) minmax(200px,1.8fr) auto; }
.template-task-add > span { display: none; }
.modal { position: fixed; z-index: 1055; inset: 0; display: none; overflow-x: hidden; overflow-y: auto; outline: 0; }
.modal.show { display: block; }
.modal-dialog { position: relative; width: auto; max-width: min(600px,calc(100% - 28px)); margin: 1.75rem auto; pointer-events: none; }
.modal-dialog.modal-xl { max-width: min(1140px,calc(100% - 28px)); }
.modal-content { position: relative; display: flex; flex-direction: column; width: 100%; border: 1px solid #deeaed; border-radius: 16px; outline: 0; background: #fff; box-shadow: 0 18px 55px rgba(8,46,61,.22); pointer-events: auto; }
.modal-header, .modal-footer { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid #e5eff1; }
.modal-header { justify-content: space-between; }
.modal-header .modal-title { margin: 0; color: #123643; font-size: 17px; font-weight: 750; }
.modal-footer { justify-content: flex-end; border-top: 1px solid #e5eff1; border-bottom: 0; }
.modal-body { position: relative; flex: 1 1 auto; padding: 18px; }
.modal.fade .modal-dialog { transform: translateY(-8px) scale(.98); transition: transform .18s ease-out; }
.modal.fade.show .modal-dialog { transform: translateY(0) scale(1); }
.project-modal-backdrop { position: fixed; z-index: 1050; inset: 0; background: rgba(4,22,31,.52); animation: project-backdrop-in .16s ease-out; }
body.modal-open { overflow: hidden; }
.attachment-pdf-preview { text-decoration: none; }
.attachment-pdf-preview small { color: #087f9c; font-size: 8px; }
@keyframes project-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes department-content-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

html[data-theme="dark"] .project-task-summary-card,
html[data-theme="dark"] .attachment-card,
html[data-theme="dark"] .task-special-meta,
html[data-theme="dark"] .stopped-task-item {
    border-color: #21404b;
    background: #102a36;
    color: #d6edf2;
}
html[data-theme="dark"] .project-task-summary-card strong,
html[data-theme="dark"] .attachments-heading h4,
html[data-theme="dark"] .project-activity-list strong { color: #e6f3f6; }
html[data-theme="dark"] .project-toast { background: #102a36; color: #b7f2cf; }
html[data-theme="dark"] .task-modal-fields label { color: #c4dbe0; }
html[data-theme="dark"] .modal-content { border-color: #21404b; background: #0b1f28; color: #e6f3f6; }
html[data-theme="dark"] .modal-header, html[data-theme="dark"] .modal-footer { border-color: #21404b; }
html[data-theme="dark"] .modal-header .modal-title { color: #e6f3f6; }

@media (max-width: 900px) {
    .project-task-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .task-row { grid-template-columns: minmax(130px,1fr) auto; }
    .task-row-actions { justify-content: flex-start; }
}
@media (max-width: 600px) {
    .project-task-summary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
    .project-task-summary-card { padding: 12px; }
    .project-task-summary-card strong { font-size: 21px; }
    .task-filter-bar, .attachment-upload-form { grid-template-columns: 1fr; }
    .task-row { grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
    .quick-status-form { grid-column: 1 / -1; }
    .task-row-actions { grid-column: 1 / -1; }
    .task-note-form { grid-column: 1 / -1; }
    .attachment-card { grid-template-columns: 42px minmax(0,1fr); }
    .attachment-preview-button, .attachment-file-icon { width: 42px; height: 42px; }
    .attachment-card > a, .attachment-card > form { grid-column: 2; }
    .template-department-heading, .template-edit-fields, .template-task-form { flex-wrap: wrap; }
    .template-edit-fields > label { flex: 1 1 140px; }
    .template-task-form:not(.template-task-add) { grid-template-columns: minmax(0,1fr) auto auto; }
    .template-task-form .template-task-title,
    .template-task-form .template-task-description { grid-column: 1 / -1; }
    .template-task-form:not(.template-task-add) .template-sequence { grid-column: 1; }
    .template-task-add { grid-template-columns: minmax(0,1fr) auto; }
    .template-task-add .button { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
    .department-card > summary::after, .project-toast { transition: none; }
    .modal.fade .modal-dialog, .project-modal-backdrop, .department-card[open] > :not(summary), .task-row { animation: none; transition: none; }
}

/* One-row dashboard metrics, with horizontal scrolling on narrow screens. */
.summary-grid.dashboard-metrics { grid-template-columns: repeat(7,minmax(155px,1fr)); gap: 12px; overflow-x: auto; padding: 5px 2px 12px; scrollbar-width: thin; scrollbar-color: #b4d7e1 transparent; scroll-snap-type: x proximity; }
.dashboard-metrics .project-stat-card { --metric-color:#0785a6; --metric-bg:#fff; display:flex; align-items:center; gap:13px; min-height:88px; padding:17px 14px; border:1px solid #e2eaf0; border-radius:17px; background:#fff; box-shadow:0 2px 3px rgba(16,44,56,.02),0 7px 18px rgba(16,44,56,.04); scroll-snap-align:start; transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease; }
.dashboard-metrics .project-stat-card::before, .dashboard-metrics .project-stat-card::after { display:none; }
.dashboard-metrics .project-stat-card:hover { background:#fff; border-color:#bfd3de; transform:translateY(-2px); box-shadow:0 4px 6px rgba(16,44,56,.025),0 10px 22px rgba(16,44,56,.07); }
.dashboard-metrics .metric-blue { --metric-color:#387bc2; --metric-bg:#eaf2fc; }
.dashboard-metrics .metric-green { --metric-color:#248859; --metric-bg:#e6f7ee; }
.dashboard-metrics .metric-red { --metric-color:#c45462; --metric-bg:#fcecef; }
.dashboard-metrics .metric-purple { --metric-color:#7964b9; --metric-bg:#f1edfb; }
.dashboard-metrics .metric-amber { --metric-color:#b58321; --metric-bg:#fff5df; }
.dashboard-metrics .project-stat-card .summary-icon { width:40px; height:40px; flex:0 0 40px; border:1px solid #e6edf2; border-radius:13px; color:var(--metric-color); background:#fff; box-shadow:0 2px 5px rgba(16,44,56,.025); }
.dashboard-metrics .summary-icon svg { width:22px; height:22px; }
.dashboard-metrics .metric-copy { display:grid; gap:6px; min-width:0; }
.dashboard-metrics .metric-copy strong { color:#143340; font-size:25px; line-height:1; font-weight:800; font-variant-numeric:tabular-nums; letter-spacing:-.03em; }
.dashboard-metrics .metric-copy small { color:#647d8b; font-size:10px; font-weight:500; line-height:1.6; white-space:nowrap; }
@media (prefers-reduced-motion: reduce) { .dashboard-metrics .project-stat-card { transition:none; } .dashboard-metrics .project-stat-card:hover { transform:none; } }
.summary-grid.dashboard-metrics:focus-visible { outline:2px solid #15accf; outline-offset:3px; border-radius:14px; }

/* Refined enterprise shell and shared project cards. */
:root { --sidebar-width:250px; }
.admin-sidebar { padding:16px 12px; }
.admin-brand { padding:10px; border-radius:16px; border-color:rgba(139,228,245,.12); box-shadow:none; }
.admin-brand-logo { width:120px; max-height:120px; }
.admin-brand-logo-frame { padding:2px 8px 4px; }
.admin-brand-copy { padding-top:6px; }
.admin-nav a.is-active { background:rgba(34,193,220,.16); border:0; border-inline-start:3px solid #22c1dc; box-shadow:none; }
.admin-nav a.is-active::after { content:none; }
.page-header { min-height:82px; padding:10px 16px; border:1px solid #e8eef2; border-radius:16px; box-shadow:0 4px 18px rgba(15,23,42,.04); }
.page-header h1 { font-size:25px; font-weight:700; }
.user-chip { padding:6px 10px; gap:8px; border-radius:12px; box-shadow:none; }
.user-avatar { width:32px; height:32px; border-radius:10px; }
.user-chip small { font-size:10px; }
.project-card-grid.project-list-grid { gap:16px; }
.project-list-grid .branch-project-card { padding:18px; background:#fcfdfe; border:1px solid #e8eef2; border-top:3px solid var(--branch-accent); border-radius:16px; box-shadow:0 4px 18px rgba(15,23,42,.04); }
.project-list-grid .branch-project-card:hover { transform:translateY(-3px); box-shadow:0 8px 24px rgba(15,23,42,.075); border-color:#dbe6eb; border-top-color:var(--branch-accent); }
.branch-card-heading { margin-bottom:10px; }
.branch-card-symbol { width:34px; height:34px; border-radius:12px; background:color-mix(in srgb,var(--branch-accent) 8%,white); border:0; }
.branch-card-status { background:color-mix(in srgb,var(--branch-accent) 9%,white); border-radius:999px; }
.branch-card-title h3 { font-size:18px; font-weight:700; line-height:1.4; }
.branch-card-title p { margin:4px 0 8px; font-size:12px; }
.branch-card-type { border:0; background:#f1f7f9; color:#527380; border-radius:999px; }
.branch-card-progress { margin:12px 0 6px; }
.branch-card-progress strong { font-size:24px; }
.branch-card-deadline, .branch-card-creator { margin-top:10px; }
.branch-card-metrics { margin:12px 0; gap:0; }
.branch-card-metrics > div { display:flex; flex-wrap:wrap; flex-direction:row-reverse; align-items:center; justify-content:center; gap:4px; background:transparent; border:0; border-radius:0; padding:4px; }
.branch-card-metrics > div + div { border-inline-start:1px solid #e8eef2; }
.branch-card-metrics strong { font-size:13px; }
.branch-card-metrics small { font-size:10px; }
.branch-project-card .branch-card-link { min-height:28px; padding:5px 0 0; border:0; border-top:1px solid #e8eef2; border-radius:0; background:transparent; box-shadow:none; font-size:12px; }
.branch-project-card .branch-card-link:hover { background:transparent; border-color:#e8eef2; }
.branch-card-link > span { transition:transform .2s ease; }
.branch-project-card:hover .branch-card-link > span { transform:translateX(-3px); }
html[dir="ltr"] .branch-project-card:hover .branch-card-link > span { transform:translateX(3px); }
@media (max-width:767px) { .page-header { min-height:80px; } .page-header h1 { font-size:21px; } }
@media (prefers-reduced-motion:reduce) { .project-list-grid .branch-project-card:hover, .branch-project-card:hover .branch-card-link > span { transform:none; } }
/* Restore the stronger status backgrounds with the compact card layout. */
.project-list-grid .branch-project-card.project-state-completed { background:linear-gradient(155deg,#c7efd8 0%,#fff 90%); border-color:#99d6b2; }
.project-list-grid .branch-project-card.project-state-planning { background:linear-gradient(155deg,#cde3ff 0%,#fff 90%); border-color:#a6c9ed; }
.project-list-grid .branch-project-card.project-state-on_hold { background:linear-gradient(155deg,#fad2d6 0%,#fff 90%); border-color:#e8a9b1; }
.project-list-grid .branch-project-card.project-state-in_progress { background:#fff; }
/* Task controls wrap within the department card instead of overflowing. */
.department-card .task-row { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 12px; }
.department-card .task-row-main { grid-column:1; grid-row:1; }
.department-card .task-row > .task-status { grid-column:2; grid-row:1; justify-self:end; max-width:100%; white-space:nowrap; }
.department-card .task-row .quick-status-form { grid-column:1; grid-row:2; width:100%; min-width:0; }
.department-card .task-row .quick-status-form .form-control { width:100%; min-width:0; min-height:36px; }
.department-card .task-row-actions { grid-column:2; grid-row:2; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:4px; min-width:0; }
.department-card .task-row-actions .button { display:inline-flex; align-items:center; gap:4px; min-height:30px; padding:5px 7px; white-space:nowrap; font-size:11px; }
.department-card .task-row-actions [hidden] { display:none !important; }
.department-card [data-task-status-actor] { grid-column:1 / -1; }
@media (max-width:600px) {
    .department-card .task-row .quick-status-form { grid-column:1 / -1; }
    .department-card .task-row-actions { grid-column:1 / -1; grid-row:3; justify-content:flex-start; }
}
/* Project department section: compact controls and balanced card headers. */
#project-departments { padding:20px; border-radius:16px; border-color:#e3edf1; }
#project-departments > .data-card-header { gap:16px; margin-bottom:16px; align-items:center; }
#project-departments > .data-card-header h2 { font-size:20px; }
#project-departments > .data-card-header p { max-width:520px; font-size:12px; line-height:1.6; }
#project-departments .inline-add-form { display:flex; flex-wrap:wrap; align-items:center; gap:8px; width:auto; max-width:100%; }
#project-departments .inline-add-form .form-control { flex:1 1 155px; width:175px; min-width:0; min-height:40px; padding:8px 12px; font-size:12px; border-radius:10px; }
#project-departments .inline-add-form .button { flex:0 0 auto; min-width:108px; min-height:40px; padding:9px 15px; font-size:12px; border-radius:10px; white-space:nowrap; }
#project-departments .task-filter-bar { display:grid; grid-template-columns:minmax(0,2fr) repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:14px; padding:10px; background:#f7fafb; border:1px solid #edf2f5; border-radius:12px; }
#project-departments .task-filter-bar .form-control { min-width:0; min-height:40px; padding:8px 12px; border-radius:10px; font-size:12px; background:white; }
#project-departments .department-grid, #project-departments .department-column { gap:12px; }
#project-departments .department-card { border-radius:14px; border-color:#e0ebef; box-shadow:0 3px 12px rgba(15,23,42,.025); }
#project-departments .department-card-header { align-items:center; gap:12px; }
#project-departments .department-card-header h3 { font-size:15px; font-weight:700; }
#project-departments .department-card-header p { font-size:11px; margin-top:4px; }
#project-departments .department-progress { display:inline-flex; align-items:center; justify-content:center; min-width:52px; padding:5px 9px; border-radius:999px; background:#eef9fc; color:#0785a6; font-size:13px; font-weight:700; }
#project-departments .department-card[open] { border-color:#91d7e6; box-shadow:0 5px 20px rgba(7,133,166,.065); }
@media (max-width:767px) {
    #project-departments { padding:14px; }
    #project-departments .inline-add-form { width:100%; }
    #project-departments .inline-add-form .button { width:100%; }
    #project-departments .task-filter-bar { grid-template-columns:repeat(2,minmax(0,1fr)); }
    #project-departments .task-filter-bar input { grid-column:1 / -1; }
}
#project-departments .task-filter-bar { grid-template-columns:minmax(0,1fr) 155px 175px; gap:8px; padding:8px; }
#project-departments .task-filter-bar .form-control { min-height:34px; padding:6px 10px; font-size:11px; border-radius:8px; }
#project-departments .department-card[hidden] { display:none !important; }
@media (max-width:767px) { #project-departments .task-filter-bar { grid-template-columns:repeat(2,minmax(0,1fr)); } }
#project-departments .task-filter-bar { grid-template-columns:minmax(0,1.7fr) repeat(3,minmax(120px,1fr)); }
#add-department-dialog::backdrop { background:rgba(15,23,42,.4); }
@media (max-width:767px) { #project-departments .task-filter-bar { grid-template-columns:repeat(2,minmax(0,1fr)); } }
/* Compact project completion roadmap. */
.completion-flow-card { padding:12px 16px; border-radius:14px; background:#fff; }
.completion-flow-heading { gap:12px; }
.completion-flow-heading h2 { margin:0; font-size:15px; font-weight:700; }
.completion-flow-heading p { margin:3px 0 0; font-size:11px; line-height:1.4; }
.completion-flow-heading .button { min-height:32px; padding:6px 11px; font-size:11px; border-radius:9px; }
.completion-flow-card .completion-stepper { margin:12px 0 0; gap:10px; }
.completion-flow-card .completion-step { gap:8px; grid-template-columns:30px minmax(0,1fr); }
.completion-flow-card .completion-step-marker { width:30px; height:30px; min-width:30px; font-size:11px; }
.completion-flow-card .completion-step:not(:last-child)::after { top:15px; inset-inline-start:38px; }
.completion-flow-card .completion-step-copy strong { font-size:12px; line-height:1.4; }
.completion-flow-card .completion-step-state { margin-top:3px; padding:2px 6px; font-size:9px; }
@media (max-width:767px) { .completion-flow-heading { flex-direction:row; align-items:center; flex-wrap:wrap; } .completion-flow-heading .button { width:auto; } }
/* Compact milestone strip with clear state hierarchy. */
.completion-flow-card { padding:14px 16px; background:#fff; border:1px solid #e5edf1; box-shadow:0 4px 16px rgba(15,23,42,.035); }
.completion-flow-heading { gap:12px; }
.completion-flow-heading > div { display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 12px; }
.completion-flow-heading h2 { font-size:14px; font-weight:700; }
.completion-flow-heading p { margin:0; font-size:10px; color:#7a8e9a; }
.completion-flow-card .completion-stepper { margin-top:12px; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.completion-flow-card .completion-step { display:flex; align-items:center; padding:9px 10px; gap:8px; border:1px solid #e8eef2; border-radius:10px; background:#f8fafb; }
.completion-flow-card .completion-step:not(:last-child)::after { display:none; }
.completion-flow-card .completion-step-marker { flex:0 0 26px; width:26px; min-width:26px; height:26px; border:0; border-radius:8px; background:#eaf0f3; color:#84939c; font-size:10px; box-shadow:none; }
.completion-flow-card .completion-step-copy { display:flex; flex:1; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:4px; padding:0; min-width:0; }
.completion-flow-card .completion-step-copy strong { font-size:11px; color:#6b7e89; }
.completion-flow-card .completion-step-state { margin:0; padding:2px 5px; font-size:8px; background:transparent; color:#8c9aa3; }
.completion-flow-card .completion-step.is-done { background:#f5fbf8; border-color:#dfeee5; }
.completion-flow-card .completion-step.is-done .completion-step-marker { background:#dff3e8; color:#188653; }
.completion-flow-card .completion-step.is-done .completion-step-copy strong { color:#23744d; }
.completion-flow-card .completion-step.is-done .completion-step-state { color:#188653; background:transparent; }
.completion-flow-card .completion-step.is-current { background:#edf9fc; border-color:#91d7e6; box-shadow:inset 0 -2px #15accf; }
.completion-flow-card .completion-step.is-current .completion-step-marker { background:#078eae; color:white; box-shadow:none; border:0; }
.completion-flow-card .completion-step.is-current .completion-step-copy strong { color:#087f9c; }
.completion-flow-card .completion-step.is-current .completion-step-state { color:#087f9c; background:#daf2f8; }
@media (max-width:900px) { .completion-flow-card .completion-stepper { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:420px) { .completion-flow-card .completion-step-copy { align-items:flex-start; flex-direction:column; } }
/* One compact summary below the project progress bar. */
.project-overview-facts { display:grid; grid-template-columns:repeat(9,minmax(0,1fr)); gap:8px; margin-top:16px; padding-top:12px; }
.project-overview-facts > span { display:flex; flex-direction:column; justify-content:center; gap:5px; padding:7px 8px; min-width:0; border-radius:9px; background:#f7fafb; }
.project-overview-facts > span small { font-size:10px; line-height:1.4; }
.project-overview-facts > span strong { font-size:13px; line-height:1.3; font-variant-numeric:tabular-nums; }
.project-overview-facts .status-completed strong { color:#188653; }
.project-overview-facts .status-in_progress strong { color:#0785a6; }
.project-overview-facts .status-blocked strong { color:#c14e59; }
@media (max-width:1199px) { .project-overview-facts { grid-template-columns:repeat(5,minmax(0,1fr)); } }
@media (max-width:767px) { .project-overview-facts { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:399px) { .project-overview-facts { grid-template-columns:repeat(2,minmax(0,1fr)); } }
/* Clear edges for the compact project facts. */
.project-overview-facts > span { border:1px solid #d8e5eb; border-top:2px solid #c6dce5; border-radius:10px; background:#fff; box-shadow:0 2px 6px rgba(19,42,54,.035); transition:border-color .2s ease,box-shadow .2s ease; }
.project-overview-facts > span:hover { border-color:#8bcbdc; box-shadow:0 4px 10px rgba(7,133,166,.08); }
.project-overview-facts > .status-completed { border-top-color:#6bbf93; }
.project-overview-facts > .status-in_progress { border-top-color:#22afcd; }
.project-overview-facts > .status-blocked { border-top-color:#de939c; }
/* Inline facts: label followed by value in a single compact row. */
.project-overview-facts { grid-template-columns:repeat(2,minmax(0,1.5fr)) repeat(7,minmax(0,1fr)); gap:7px; }
.project-overview-facts > span { flex-direction:row; align-items:center; justify-content:space-between; gap:6px; padding:8px; min-height:36px; }
.project-overview-facts > span small { white-space:nowrap; font-size:9px; }
.project-overview-facts > span strong { white-space:nowrap; font-size:11px; }
@media (max-width:1399px) { .project-overview-facts { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:599px) { .project-overview-facts { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:359px) { .project-overview-facts { grid-template-columns:1fr; } }
/* Distinct task reminders in both notification surfaces. */
.screen-notifications article.task-reminder-notification,
.login-notifications-list article.task-reminder-notification { padding:12px 14px; margin:8px 0; border:1px solid #c9eaf3; border-inline-start:3px solid #0b9cbc; border-radius:10px; background:#effaff; }
.task-reminder-notification p { color:#14617a; font-weight:600; }
.task-reminder-notification a strong { color:#087f9c; }
.department-card .task-row-actions [data-task-remind] { color:#087f9c; background:#eaf8fc; border:1px solid #c5e6f0; border-radius:8px; }
.department-card .task-row-actions [data-task-remind]:hover { background:#d9f2f9; border-color:#82cede; }
/* Persistent desktop sidebar collapse, with an always available toggle. */
.sidebar-collapse-toggle { position:fixed; z-index:1050; top:12px; inset-inline-start:calc(var(--sidebar-width) - 42px); width:30px; height:30px; display:grid; place-items:center; padding:0; border:1px solid #b7dce6; border-radius:9px; background:#fff; color:#0785a6; box-shadow:0 3px 10px rgba(15,23,42,.12); cursor:pointer; transition:inset-inline-start .25s ease; }
.sidebar-collapse-toggle:focus-visible { outline:2px solid #22c1dc; outline-offset:3px; }
@media (min-width:768px) {
 .admin-sidebar { transition:transform .25s ease; }
 .admin-content { transition:margin-inline-start .25s ease; }
 body.sidebar-collapsed .admin-content { margin-inline-start:0; }
 html[dir="rtl"] body.sidebar-collapsed .admin-sidebar { transform:translateX(105%); }
 html[dir="ltr"] body.sidebar-collapsed .admin-sidebar { transform:translateX(-105%); }
 body.sidebar-collapsed .sidebar-collapse-toggle { inset-inline-start:10px; }
}
@media (max-width:767px) { .sidebar-collapse-toggle { inset-inline-start:10px; top:10px; } }
@media (prefers-reduced-motion:reduce) { .admin-sidebar,.admin-content,.sidebar-collapse-toggle { transition:none !important; } }
/* Polished floating sidebar control. */
.sidebar-collapse-toggle { width:36px; height:36px; inset-inline-start:calc(var(--sidebar-width) - 45px); top:12px; border:1px solid #c9e5ed; border-radius:12px; background:linear-gradient(145deg,#fff,#f0f9fc); color:#087f9c; box-shadow:0 4px 12px rgba(8,73,94,.13),inset 0 1px 0 #fff; transition:inset-inline-start .25s ease,background .2s ease,box-shadow .2s ease,transform .2s ease; }
.sidebar-collapse-toggle svg { width:20px; height:20px; transition:transform .25s ease; }
.sidebar-collapse-toggle:hover { background:linear-gradient(145deg,#eafaff,#d9f2f9); border-color:#87ccdc; box-shadow:0 6px 16px rgba(8,73,94,.18); transform:translateY(-1px); }
.sidebar-collapse-toggle:active { transform:translateY(0); }
.sidebar-collapse-toggle[aria-expanded="false"] svg { transform:rotate(180deg); }
html[dir="ltr"] .sidebar-collapse-toggle[aria-expanded="true"] svg { transform:rotate(180deg); }
html[dir="ltr"] .sidebar-collapse-toggle[aria-expanded="false"] svg { transform:none; }
body.sidebar-collapsed .sidebar-collapse-toggle { inset-inline-start:12px; }
@media (max-width:767px) { .sidebar-collapse-toggle { inset-inline-start:10px; } }
@media (prefers-reduced-motion:reduce) { .sidebar-collapse-toggle svg { transition:none; } .sidebar-collapse-toggle:hover { transform:none; } }
/* Edge-mounted sidebar handle, with a simple directional chevron. */
.sidebar-collapse-toggle { inset-inline-start:calc(var(--sidebar-width) - 18px); top:24px; width:34px; height:42px; border:1px solid #d5e7ed; border-radius:11px; background:#fff; color:#547c8d; box-shadow:0 3px 10px rgba(15,55,70,.11); }
.sidebar-collapse-toggle svg { width:16px; height:16px; }
.sidebar-collapse-toggle:hover { background:#edf9fc; color:#0785a6; border-color:#9ad4e1; box-shadow:0 5px 15px rgba(7,133,166,.16); transform:none; }
body.sidebar-collapsed .sidebar-collapse-toggle { inset-inline-start:8px; top:24px; }
@media (max-width:767px) { .sidebar-collapse-toggle { inset-inline-start:8px; top:12px; width:32px; height:36px; } }
/* One document scrollbar; desktop navigation participates in the page layout. */
@media(min-width:1101px){
 .admin-shell{display:flex;align-items:flex-start;min-height:100vh;min-height:100dvh;width:100%;}
 .admin-shell>.admin-sidebar{position:sticky;top:0;inset-inline-start:auto;inset-block-end:auto;flex:0 0 var(--sidebar-width);width:var(--sidebar-width);height:auto;min-height:100vh;min-height:100dvh;overflow:visible;}
 .admin-shell>.admin-content{flex:1 1 0;min-width:0;width:calc(100% - var(--sidebar-width));margin-inline-start:0;min-height:100vh;min-height:100dvh;}
 body.sidebar-collapsed .admin-shell>.admin-sidebar{position:fixed;inset-block:0;inset-inline-start:0;overflow-y:auto;}
 body.sidebar-collapsed .admin-shell>.admin-content{width:100%;}
}
/* Compact navigation and brand so every menu action stays within easy reach. */
.admin-sidebar{padding:8px 12px;}
.admin-sidebar .admin-brand{padding:7px 10px;margin-bottom:8px;}
.admin-sidebar .admin-brand-logo-frame{padding:0;}
.admin-sidebar .admin-brand-logo{width:96px;max-height:96px;object-fit:contain;}
.admin-sidebar .admin-brand-copy{padding-top:2px;}
.admin-sidebar .admin-brand-copy strong{font-size:13px;}
.admin-sidebar .admin-brand-copy small{font-size:10px;margin-top:2px;}
.admin-sidebar .language-switch{margin-top:7px;padding:3px;}
.admin-sidebar .language-switch a{padding:5px 10px;font-size:11px;}
.admin-sidebar .sidebar-caption{margin:9px 10px 6px;font-size:10px;}
.admin-sidebar .admin-nav{gap:3px;}
.admin-sidebar .admin-nav a,.admin-sidebar .admin-nav .nav-logout{padding:8px 12px;min-height:34px;font-size:12px;line-height:1.4;}
@media(max-height:760px){
 .admin-sidebar .admin-brand-logo{width:72px;max-height:72px;}
 .admin-sidebar .admin-brand-copy small{display:none;}
 .admin-sidebar .admin-nav{gap:2px;}
 .admin-sidebar .admin-nav a,.admin-sidebar .admin-nav .nav-logout{padding:6px 10px;min-height:29px;font-size:11px;}
}
@media(max-height:600px){
 .admin-sidebar .admin-brand{display:grid;grid-template-columns:54px minmax(0,1fr);align-items:center;gap:4px 8px;}
 .admin-sidebar .admin-brand-logo{width:52px;max-height:52px;}
 .admin-sidebar .admin-brand-copy{padding:0;}
 .admin-sidebar .language-switch{grid-column:1 / -1;margin:0;justify-self:center;}
 .admin-sidebar .admin-nav a,.admin-sidebar .admin-nav .nav-logout{padding:4px 9px;min-height:25px;}
}
/* Compact page heading and account controls. */
.admin-content > .page-header{min-height:52px;padding:5px 12px;border-radius:14px;gap:12px;}
.admin-content > .page-header h1{font-size:18px;line-height:1.25;margin:0;}
.admin-content > .page-header .page-subtitle{font-size:10px;line-height:1.3;margin:2px 0 0;}
.page-header .screen-header-actions{gap:9px;}
.page-header .user-chip{padding:3px 7px;gap:6px;border-radius:10px;}
.page-header .user-chip strong{font-size:11px;line-height:1.3;}
.page-header .user-chip small{font-size:8px;line-height:1.2;}
.page-header .user-chip .user-avatar{width:24px;height:24px;border-radius:9px;font-size:13px;}
.page-header .screen-notifications > summary{min-height:32px;height:32px;padding:4px 8px;gap:7px;border-radius:10px;}
.page-header .screen-notifications > summary svg{width:17px;height:17px;}
.page-header .project-notification-count{min-width:19px;padding:1px 5px;font-size:10px;}
@media(max-width:767px){.admin-content > .page-header{min-height:50px;padding:5px 9px;}.admin-content > .page-header h1{font-size:17px;}.page-header .screen-header-actions{gap:6px;}}
/* Compact filters on the home analytics screen. */
.analytics-page .projects-toolbar{gap:8px;align-items:center;}
.analytics-page .project-filter-form{gap:7px;align-items:center;}
.analytics-page .project-filter-form .form-control{height:33px;min-height:33px;min-width:120px;max-width:180px;padding:5px 9px;border-radius:9px;font-size:11px;line-height:1.4;}
.analytics-page .project-filter-form input[type=search]{max-width:230px;}
.analytics-page .project-status-multiselect{min-width:130px;}
.analytics-page .project-status-multiselect>summary{min-height:33px;height:33px;padding:5px 10px;border-radius:9px;font-size:11px;line-height:1.4;}
.analytics-page .projects-toolbar .button{border-radius:9px;}
@media(max-width:600px){.analytics-page .projects-toolbar{flex-wrap:wrap;}.analytics-page .project-filter-form .form-control{min-width:110px;max-width:100%;flex:1;}.analytics-page .project-filter-form input[type=search]{flex-basis:100%;}}
/* Keep the native details link usable across the entire project card. */
.branch-project-card { position:relative; }
.branch-project-card .branch-card-link { position:static; overflow:visible; transform:none; }
.branch-project-card .branch-card-link::after { content:""; position:absolute; inset:0; z-index:1; border-radius:inherit; cursor:pointer; }
.branch-project-card:focus-within { outline:2px solid var(--branch-accent,#0785a6); outline-offset:3px; }

/* Compact branch-template controls, scoped to this screen. */
.project-template-manager .button { min-height:32px; padding:5px 12px; font-size:11px; line-height:1.5; white-space:nowrap; }
.project-template-manager .template-setup-card { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:start; padding:18px; }
.project-template-manager .template-setup-card > .data-card-header { grid-column:1/-1; margin-bottom:0; }
.project-template-manager .template-setup-card > .inline-add-form { display:flex; align-items:center; gap:8px; margin:0; }
.project-template-manager .template-setup-card > .inline-add-form .form-control { flex:1; width:0; min-width:0; height:34px; min-height:34px; padding:5px 10px; font-size:12px; }
.project-template-manager .template-setup-card > .inline-add-form .button { flex:0 0 auto; width:auto; }
.project-template-manager .template-setup-card > details { margin:0; }
.project-template-manager .template-setup-card > details[open] { grid-column:1/-1; }
.project-template-manager .template-setup-card > details > summary { min-height:34px; }
@media(max-width:600px) {
 .project-template-manager .template-setup-card { grid-template-columns:minmax(0,1fr); padding:14px; gap:10px; }
}

.project-template-manager .template-setup-card > #template-department-picker, .project-template-manager #template-other-department { grid-column:1/-1; }
.project-template-manager #template-other-department[hidden], .project-template-manager #template-department-picker button[hidden] { display:none; }

/* Full-width compact personal account card. */
.account-edit-card { width:100%; max-width:none; box-sizing:border-box; padding:18px; }
.account-edit-card .data-card-header { margin-bottom:14px; }
.account-edit-card .data-card-header h2 { font-size:17px; }
.account-edit-card .data-card-header p { font-size:11px; margin-top:5px; }
.account-edit-card .account-edit-form { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.account-edit-card .form-field { gap:5px; min-width:0; }
.account-edit-card .form-field label { font-size:11px; margin:0; }
.account-edit-card .form-control { height:35px; min-height:35px; padding:6px 10px; font-size:12px; }
.account-edit-card .account-password-section { padding:12px; }
.account-edit-card .account-password-section h3 { font-size:13px; }
.account-edit-card .account-password-section > p { font-size:10px; margin:4px 0 10px; }
.account-edit-card .account-password-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.account-edit-card .account-edit-actions { gap:8px; }
.account-edit-card .account-edit-actions .button { min-height:32px; padding:5px 12px; font-size:11px; }
@media(max-width:900px) { .account-edit-card .account-edit-form { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) {
 .account-edit-card { padding:14px; }
 .account-edit-card .account-edit-form,.account-edit-card .account-password-grid { grid-template-columns:minmax(0,1fr); }
 .account-edit-card .account-password-section,.account-edit-card .account-edit-actions { grid-column:1/-1; }
}

.task-row-actions .button.task-action-icon { width:29px; height:29px; min-height:29px; padding:5px; display:inline-flex; align-items:center; justify-content:center; flex:none; }
.task-row-actions .task-action-icon svg { margin:0; width:15px; height:15px; }
.task-row-actions .button.task-action-icon[hidden] { display:none; }

/* Compact task details while retaining room to edit notes and attachments. */
.department-card .task-row { gap:6px 10px; padding:8px 0; }
.department-card .task-row-main { gap:2px; }
.department-card .task-row-main small { font-size:10px; line-height:1.5; }
.department-card .task-row > .task-status { min-height:23px; padding:3px 8px; font-size:10px; }
.department-card .task-row .quick-status-form .form-control { height:31px; min-height:31px; padding:4px 9px; font-size:11px; line-height:normal; }
.department-card .task-note-form { gap:3px; margin:0; }
.department-card .task-note-form label { font-size:10px; margin:0; }
.department-card .task-note-form textarea { height:42px; min-height:42px; padding:5px 9px; font-size:11px; line-height:1.5; }
.department-card .task-attachments { padding-top:7px; }
.department-card .task-attachments h4 { font-size:11px; margin:0 0 6px; }
.department-card .task-attachment-upload { gap:6px; }
.department-card .task-attachment-upload .form-control { min-height:32px; padding:3px 6px; font-size:11px; }
.department-card .task-attachment-upload input::file-selector-button { padding:4px 7px; font-size:11px; margin-inline-end:7px; }
.department-card .task-attachment-upload .button { min-height:32px; padding:5px 9px; font-size:10px; }
.department-card .task-attachments > small { font-size:10px; margin-block:4px; }
.department-card .task-attachment-list { gap:5px; margin-top:4px; }
.department-card .task-attachments .department-empty { padding:4px 0; margin:0; font-size:10px; }

/* Place the editable task status beside its title. */
.department-card .task-row { grid-template-columns:minmax(0,1fr) minmax(115px,145px); }
.department-card .task-row-main { grid-column:1; grid-row:1; }
.department-card .task-row .quick-status-form { grid-column:2; grid-row:1; width:100%; }
.department-card .task-row > .task-status { grid-column:1; grid-row:2; justify-self:start; }
.department-card .task-row .task-row-actions { grid-column:2; grid-row:2; justify-content:flex-end; }
@media(max-width:420px) {
 .department-card .task-row { grid-template-columns:minmax(0,1fr) 115px; gap:6px; }
}

.project-actions .button.project-header-icon { width:34px; height:34px; min-height:34px; padding:7px; flex:none; display:inline-flex; justify-content:center; align-items:center; }
.project-actions .project-header-icon svg,.project-actions .project-header-icon span { margin:0!important; }
.project-actions .project-header-icon svg { width:18px; height:18px; }
.project-actions { gap:7px; }
.project-share-menu { position:relative; }
.project-share-menu summary { list-style:none; cursor:pointer; }
.project-share-menu summary::-webkit-details-marker { display:none; }
.project-share-options { position:absolute; inset-inline-start:0; top:calc(100% + 6px); z-index:20; width:190px; padding:6px; border:1px solid #d7e7ed; border-radius:11px; background:var(--surface,#fff); box-shadow:0 8px 25px rgba(18,54,67,.12); }
.project-share-options a { display:block; padding:8px; border-radius:7px; text-decoration:none; font-size:11px; color:#0785a6; }
.project-share-options a:hover { background:#edf9fc; }

.project-creator-picker { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; align-items:center; }
.project-creator-picker > .form-control { min-width:0; width:100%; height:38px; min-height:38px; margin:0; font-size:12px; }
.project-creator-picker > small { grid-column:1/-1; }
.project-creator-picker > .owner-suggestions { grid-column:1/-1; }

.project-creator-picker { grid-template-columns:minmax(100px,.65fr) minmax(0,1.35fr); }
.project-creator-picker > input[data-owner-search] { height:34px; min-height:34px; font-size:11px; padding:5px 8px; }

.department-schedule .department-owner-picker { flex:1 1 270px; min-width:0; }
.department-schedule .department-owner-picker > .form-control { min-width:0; width:100%; }
.department-schedule .department-owner-picker + .button { flex:0 0 auto; min-height:38px; padding:6px 11px; font-size:11px; }

dialog[id^='delete-department-'] { position:fixed; inset:0; margin:auto; box-sizing:border-box; max-height:calc(100dvh - 32px); overflow-y:auto; }
dialog[id^='delete-department-'] h3 { font-size:19px; margin:0 0 12px; }
dialog[id^='delete-department-'] p { font-size:13px; line-height:1.8; margin:0 0 16px; }
dialog[id^='delete-department-'] form { display:flex; flex-wrap:wrap; gap:8px; }
dialog[id^='delete-department-']::backdrop { background:rgba(4,22,31,.45); }

/* Full-width branch form aligned with its page header. */
.admin-content>.project-form-card { width:100%; max-width:none; box-sizing:border-box; padding:20px; }
.project-form-card .data-card-header { margin-bottom:16px; }
.project-form-card .data-card-header h2 { margin:0; font-size:18px; }
.project-form-card .project-form { gap:13px 18px; align-items:start; }
.project-form-card .project-form .form-field { gap:5px; min-width:0; }
.project-form-card .project-form .form-field>label { font-size:12px; margin:0; }
.project-form-card .project-form input.form-control,.project-form-card .project-form select.form-control { min-height:38px; height:38px; padding:6px 10px; font-size:13px; }
.project-form-card .project-form textarea.form-control { min-height:80px; padding:8px 10px; font-size:13px; }
.project-form-card .project-creator-picker { grid-template-columns:minmax(110px,.65fr) minmax(0,1.35fr); align-items:center; }
.project-form-card .project-creator-picker>input[data-owner-search] { font-size:11px; }
.project-form-card .project-form-actions { padding-top:12px; border-top:1px solid #e3edf1; gap:8px; }
.project-form-card .project-form-actions .button { min-height:35px; padding:6px 15px; font-size:12px; }
@media(max-width:767px) { .admin-content>.project-form-card { padding:14px; } .project-form-card .project-form { gap:11px; } .project-form-card .project-form-actions .button { flex:1; } }

/* Compact project department overview. */
#project-departments{padding:16px;border-radius:16px;}
#project-departments>.data-card-header{gap:12px;margin-bottom:12px;}
#project-departments>.data-card-header h2{font-size:18px;margin-bottom:4px;}
#project-departments>.data-card-header p{font-size:11px;margin-bottom:0;}
#project-departments>.data-card-header .button{min-height:34px;padding:6px 12px;font-size:12px;border-radius:10px;}
#project-departments .task-filter-bar{padding:6px;gap:7px;margin-bottom:10px;}
#project-departments .task-filter-bar .form-control{height:32px;min-height:32px;padding:4px 9px;font-size:11px;}
#project-departments .department-grid,#project-departments .department-column{gap:9px;}
#project-departments .department-card>.department-card-header{padding:12px 14px;gap:8px;}
#project-departments .department-card-header h3{font-size:13px;line-height:1.5;}
#project-departments .department-card-header p{font-size:10px;line-height:1.5;margin-top:3px;}
#project-departments .department-progress{min-width:43px;padding:3px 7px;font-size:11px;}
#project-departments .department-header-track{height:5px;margin-bottom:9px;}
@media(max-width:767px){#project-departments{padding:12px;}#project-departments .department-card>.department-card-header{padding:11px 12px;}}
/* Project summary and completion steps share one compact card. */
.project-overview-card .project-overview-progress{margin-top:14px;}
.project-overview-card .project-progress-heading{margin-bottom:7px;}
.project-overview-card .project-progress-heading strong{font-size:23px;}
.project-overview-card .project-progress-heading span{font-size:11px;}
.project-overview-card .progress-track-large{height:7px;}
.project-overview-card .project-overview-facts{gap:7px;padding-top:11px;margin-top:12px;}
.project-overview-card .project-overview-facts>span{min-height:34px;padding:6px 8px;border-radius:9px;}
.project-overview-card .project-overview-facts small{font-size:10px;}
.project-overview-card .project-overview-facts strong{font-size:11px;}
.project-overview-card>.completion-flow-card{background:transparent;border:0;border-top:1px solid #e3edf1;border-radius:0;box-shadow:none;padding:12px 0 0;margin:12px 0 0;}
.project-overview-card .completion-flow-heading{margin-bottom:9px;gap:10px;}
.project-overview-card .completion-flow-heading>div{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;}
.project-overview-card .completion-flow-heading h2{font-size:14px;margin:0;}
.project-overview-card .completion-flow-heading p{font-size:10px;margin:0;}
.project-overview-card .completion-stepper{gap:8px;margin:0;}
.project-overview-card .completion-step{min-height:40px;padding:7px 10px;border-radius:10px;gap:8px;}
.project-overview-card .completion-step-marker{width:26px;height:26px;min-width:26px;font-size:11px;}
.project-overview-card .completion-step-copy strong{font-size:12px;}
.project-overview-card .completion-step-state{font-size:10px;padding:2px 6px;}
.project-page-title-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;}
.project-page-title-row h1{margin:0;}
.project-page-title-row .project-status{font-size:11px;padding:4px 9px;white-space:nowrap;}
.project-page-location{font-size:12px;color:var(--muted);line-height:1.5;}
.project-overview-heading:has(>.project-actions:only-child){justify-content:flex-end;}
/* Raise the header stacking context while its notification panel is open. */
.admin-content>.page-header:has(.screen-notifications[open]){position:relative;z-index:1100;overflow:visible;}
.page-header .screen-header-actions:has(.screen-notifications[open]){position:relative;z-index:1101;overflow:visible;}
.page-header .screen-notifications[open]{z-index:1102;}
.page-header .screen-notifications[open]>.project-notification-panel{z-index:1103;}
/* Shared status filter styling on project and analytics pages. */
.project-status-multiselect { position:relative; min-width:145px; width:190px; flex:0 1 190px; font-size:12px; }
.project-status-multiselect summary { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:40px; padding:8px 11px; border:1px solid #dce9ed; border-radius:10px; background:#fff; color:#527182; cursor:pointer; list-style:none; }
.project-status-multiselect summary::-webkit-details-marker { display:none; }
.project-status-multiselect [data-status-selection-label] { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.project-status-options { position:absolute; top:calc(100% + 6px); inset-inline-start:0; width:220px; z-index:60; padding:8px; border:1px solid #dce9ed; border-radius:12px; background:#fff; box-shadow:0 8px 24px rgba(23,55,70,.14); }
.project-status-options label { display:flex; align-items:center; gap:9px; padding:8px; border-radius:7px; cursor:pointer; color:#173746; }
.project-status-options label:hover { background:#edf8fb; }
.project-status-options input[type="checkbox"] { width:15px !important; height:15px; min-height:0 !important; flex:0 0 15px !important; accent-color:#0785a6; }
.project-status-options button { width:100%; padding:7px; border:0; border-top:1px solid #edf2f5; background:#fff; color:#0785a6; font:inherit; cursor:pointer; }
.project-status-multiselect[open] { z-index:101; }
.project-status-options { z-index:102; }

/* Keep status choices above project cards and usable during filtering. */
.projects-toolbar:has(.project-status-multiselect[open]),.pa-heading:has(.project-status-multiselect[open]){position:relative;z-index:200;overflow:visible;}
.project-filter-form .project-status-multiselect[open]{position:relative;z-index:201;}
.project-filter-form .project-status-options{z-index:202;pointer-events:auto;}
.premium-analytics.pa-loading .project-filter-form{pointer-events:auto;}