/** * Copyright since 2025 Mifos Initiative * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ @use 'sass:color'; $navy: #0d1b2a; $blue: #1e88e5; $blue-d: #1e40af; $green: #10b981; $amber: #f59e0b; $red: #ef4444; $purple: #7c3aed; .usr-container { padding: 20px 24px; max-width: 1440px; margin: 0 auto; background: #f0f2f5; min-height: 100vh; } // ─── Header ─── .usr-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; &__left { display: flex; align-items: center; gap: 12px; } &__icon { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: linear-gradient(135deg, $blue 0%, $purple 100%); color: #fff; font-size: 18px; box-shadow: 0 2px 8px rgb(29 78 216 / 25%); } &__title { margin: 0; font-size: 20px; font-weight: 800; color: $navy; line-height: 1.1; } &__sub { margin-top: 2px; font-size: 12.5px; color: #64748b; } &__right { display: flex; gap: 10px; flex-wrap: wrap; } } .usr-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s; white-space: nowrap; border: 1px solid transparent; fa-icon { font-size: 12px; } &.ghost { background: #fff; border-color: #d0d5dd; color: #475569; &:hover { background: #f8fafc; border-color: #94a3b8; color: $navy; } } &.primary { background: linear-gradient(135deg, $blue 0%, $blue-d 100%); border-color: $blue-d; color: #fff; box-shadow: 0 2px 6px -2px rgb(30 64 175 / 35%); &:hover { box-shadow: 0 4px 12px -3px rgb(30 64 175 / 45%); transform: translateY(-1px); } } &.small { padding: 6px 12px; font-size: 12px; } } // ─── KPI strip ─── .usr-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; } .usr-stat { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 16px; box-shadow: 0 1px 3px rgb(15 23 42 / 4%); &__ic { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 15px; color: #fff; flex-shrink: 0; } &__val { font-size: 22px; font-weight: 800; color: $navy; line-height: 1; } &__lbl { margin-top: 4px; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; font-weight: 600; } &.total .usr-stat__ic { background: linear-gradient(135deg, $blue 0%, $blue-d 100%); } &.staff .usr-stat__ic { background: linear-gradient(135deg, $purple 0%, #4338ca 100%); } &.self .usr-stat__ic { background: linear-gradient(135deg, $green 0%, #047857 100%); } &.office .usr-stat__ic { background: linear-gradient(135deg, $amber 0%, #c2410c 100%); } } // ─── Toolbar ─── .usr-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; &__search { position: relative; flex: 1; min-width: 260px; max-width: 520px; input { width: 100%; padding: 9px 36px; border: 1px solid #d0d5dd; border-radius: 9px; font-size: 13px; background: #fff; color: $navy; transition: all 0.15s; &:focus { outline: none; border-color: $blue; box-shadow: 0 0 0 3px rgb(30 136 229 / 12%); } } &-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 12px; pointer-events: none; } } &__clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; border: 1px solid #e2e8f0; background: #fff; color: #94a3b8; font-size: 10px; cursor: pointer; &:hover { background: #fef2f2; color: $red; border-color: #fecaca; } } &__filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } } .usr-select { padding: 8px 12px; border: 1px solid #d0d5dd; border-radius: 9px; background: #fff; color: $navy; font-size: 12.5px; cursor: pointer; transition: all 0.15s; &:focus { outline: none; border-color: $blue; box-shadow: 0 0 0 3px rgb(30 136 229 / 12%); } } // ─── Card wrapper ─── .usr-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 1px 3px rgb(15 23 42 / 6%); overflow: hidden; &__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid #e2e8f0; background: linear-gradient(180deg, #f8fafc 0%, #fff 100%); } &__title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: $navy; &-ic { color: $blue; } } &__count { margin-left: 8px; padding: 2px 10px; background: #eff6ff; color: $blue-d; border-radius: 999px; font-size: 11px; font-weight: 700; } } // ─── Table ─── .usr-table-wrap { overflow: auto; max-height: 620px; } .usr-table { width: 100%; border-collapse: collapse; font-size: 13px; thead th { position: sticky; top: 0; z-index: 1; background: #f1f5f9; color: #475569; text-align: left; padding: 11px 14px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid #e2e8f0; &.num { width: 48px; text-align: center; } &.actions { width: 150px; text-align: center; } } tbody td { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; color: $navy; &.num { text-align: center; color: #94a3b8; font-weight: 600; } &.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: #475569; } &.actions { text-align: center; white-space: nowrap; } } tbody tr { transition: background 0.12s; &:hover { background: #f8fafc; } } } .usr-id { display: inline-flex; align-items: center; gap: 10px; &__txt { line-height: 1.15; } &__name { font-weight: 600; color: $navy; } &__staff { font-size: 10.5px; color: #64748b; margin-top: 1px; } } .usr-avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, $blue 0%, $purple 100%); color: #fff; font-weight: 700; font-size: 11px; flex-shrink: 0; box-shadow: 0 2px 4px -1px rgb(29 78 216 / 30%); &.self { background: linear-gradient(135deg, $green 0%, #047857 100%); box-shadow: 0 2px 4px -1px rgb(16 185 129 / 30%); } } .usr-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; &.staff { background: #ede9fe; color: $purple; } &.self { background: #ecfdf5; color: $green; } } .usr-act { width: 30px; height: 30px; margin: 0 2px; border: 1px solid #e2e8f0; background: #fff; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: #64748b; font-size: 12px; transition: all 0.12s; &:hover:not(:disabled) { transform: translateY(-1px); } &.view:hover:not(:disabled) { background: #f0f9ff; border-color: #bae6fd; color: $blue; } &.edit:hover:not(:disabled) { background: #eff6ff; border-color: #bfdbfe; color: $blue-d; } &.more:hover:not(:disabled) { background: #f5f3ff; border-color: #ddd6fe; color: $purple; } &:disabled { opacity: 0.4; cursor: not-allowed; } } .usr-menu__ic { width: 18px; margin-right: 10px; color: #64748b; font-size: 13px; text-align: center; &.warn { color: $red; } } .usr-empty { text-align: center; padding: 32px 16px; color: #94a3b8; font-size: 13px; } // ─── Responsive ─── @media (width <= 900px) { .usr-stats { grid-template-columns: repeat(2, 1fr); } .usr-header { flex-direction: column; align-items: flex-start; } .usr-toolbar { flex-direction: column; align-items: stretch; &__search { max-width: none; } } } @media (width <= 600px) { .usr-stats { grid-template-columns: 1fr; } .usr-table thead th { font-size: 9.5px; padding: 8px 10px; } .usr-table tbody td { padding: 8px 10px; } }