/*
 * FlexCore HR — layout.css
 * Sidebar, topbar, page shell
 */

/* ─────────────────────────────────────────────────
   APP SHELL
───────────────────────────────────────────────── */
.fx-app {
    display: flex;
    min-height: 100vh;
    background: var(--fx-bg);
}

/* ─────────────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────────────── */
.fx-sidebar {
    width: var(--fx-sidebar-width);
    min-height: 100vh;
    background: var(--fx-surface);
    border-right: 1px solid var(--fx-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    transition:
        width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.28s ease;
    overflow: hidden;
}

/* Collapsed state */
.fx-app.fx-sidebar-mini .fx-sidebar {
    width: var(--fx-sidebar-width-mini);
}
.fx-app.fx-sidebar-mini .fx-sidebar .fx-nav-label,
.fx-app.fx-sidebar-mini .fx-sidebar .fx-nav-section-title,
.fx-app.fx-sidebar-mini .fx-sidebar .fx-logo-text,
.fx-app.fx-sidebar-mini .fx-sidebar .fx-nav-badge,
.fx-app.fx-sidebar-mini .fx-sidebar .fx-nav-arrow,
.fx-app.fx-sidebar-mini .fx-sidebar .fx-sidebar-footer-text {
    opacity: 0;
    pointer-events: none;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
}
.fx-app.fx-sidebar-mini .fx-sidebar .fx-nav-item-inner {
    justify-content: center;
    padding: 10px 0;
}
.fx-app.fx-sidebar-mini .fx-sidebar .fx-nav-icon {
    margin: 0;
}
.fx-app.fx-sidebar-mini .fx-sidebar .fx-logo-wrap {
    justify-content: center;
    padding: 20px 0;
}
.fx-app.fx-sidebar-mini .fx-main {
    margin-left: var(--fx-sidebar-width-mini);
}

/* ── Logo ── */
.fx-logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--fx-border);
    flex-shrink: 0;
    transition: var(--fx-transition-slow);
}

.fx-logo-mark {
    width: 36px;
    height: 36px;
    background: var(--fx-brand);
    border-radius: var(--fx-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.fx-logo-mark::after {
    content: "";
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}
.fx-logo-mark svg {
    width: 20px;
    height: 20px;
    fill: #fff;
    position: relative;
    z-index: 1;
}

.fx-logo-text {
    transition: var(--fx-transition);
    overflow: hidden;
    white-space: nowrap;
}
.fx-logo-text .fx-logo-name {
    font-family: var(--fx-font-display);
    font-size: 20px;
    letter-spacing: 2px;
    color: var(--fx-text-primary);
    line-height: 1;
}
.fx-logo-text .fx-logo-sub {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--fx-text-faint);
    margin-top: 1px;
}

/* ── Nav ── */
.fx-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 0;
}

.fx-nav-section {
    margin-bottom: 4px;
}

.fx-nav-section-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--fx-text-faint);
    padding: 8px 20px 4px;
    transition: var(--fx-transition);
    white-space: nowrap;
    overflow: hidden;
}

.fx-nav-item {
    position: relative;
}

.fx-nav-item-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    border-radius: 0;
    cursor: pointer;
    transition: var(--fx-transition);
    position: relative;
    white-space: nowrap;
}

.fx-nav-item-inner::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: var(--fx-brand);
    border-radius: 0 3px 3px 0;
    opacity: 0;
    transform: scaleY(0.4);
    transition: var(--fx-transition);
}

.fx-nav-item-inner:hover {
    background: var(--fx-surface-3);
}
.fx-nav-item-inner:hover .fx-nav-icon {
    color: var(--fx-brand);
}

.fx-nav-item.fx-active > .fx-nav-item-inner {
    background: var(--fx-brand-soft);
}
.fx-nav-item.fx-active > .fx-nav-item-inner::before {
    opacity: 1;
    transform: scaleY(1);
}
.fx-nav-item.fx-active > .fx-nav-item-inner .fx-nav-icon {
    color: var(--fx-brand);
}
.fx-nav-item.fx-active > .fx-nav-item-inner .fx-nav-label {
    color: var(--fx-brand);
    font-weight: 600;
}

.fx-nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--fx-text-muted);
    transition: color 0.18s;
}

.fx-nav-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--fx-text-body);
    flex: 1;
    transition: var(--fx-transition);
    overflow: hidden;
    white-space: nowrap;
}

.fx-nav-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--fx-radius-pill);
    background: var(--fx-danger-soft);
    color: var(--fx-danger-text);
    transition: var(--fx-transition);
    white-space: nowrap;
    overflow: hidden;
}
.fx-nav-badge.fx-brand {
    background: var(--fx-brand-soft);
    color: var(--fx-brand);
}
.fx-nav-badge.fx-success {
    background: var(--fx-success-soft);
    color: var(--fx-success-text);
}

.fx-nav-arrow {
    width: 14px;
    height: 14px;
    color: var(--fx-text-faint);
    transition: transform 0.2s;
    flex-shrink: 0;
}
.fx-nav-item.fx-open > .fx-nav-item-inner .fx-nav-arrow {
    transform: rotate(90deg);
}

/* Submenu */
.fx-nav-sub {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.fx-nav-item.fx-open > .fx-nav-sub {
    max-height: 400px;
}
.fx-nav-sub .fx-nav-item-inner {
    padding: 7px 20px 7px 48px;
}
.fx-nav-sub .fx-nav-label {
    font-size: 13px;
    font-weight: 400;
}

/* ── Sidebar Footer ── */
.fx-sidebar-footer {
    border-top: 1px solid var(--fx-border);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    overflow: hidden;
}

.fx-sidebar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--fx-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fx-font-display);
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.fx-sidebar-footer-text {
    flex: 1;
    overflow: hidden;
    transition: var(--fx-transition);
    white-space: nowrap;
}
.fx-sidebar-footer-text .fx-uname {
    font-size: 13px;
    font-weight: 600;
    color: var(--fx-text-primary);
    line-height: 1.3;
}
.fx-sidebar-footer-text .fx-urole {
    font-size: 11px;
    color: var(--fx-text-muted);
}

.fx-sidebar-footer-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--fx-radius-sm);
    background: transparent;
    border: 1px solid var(--fx-border);
    color: var(--fx-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--fx-transition);
    flex-shrink: 0;
}
.fx-sidebar-footer-btn:hover {
    background: var(--fx-surface-3);
    color: var(--fx-text-primary);
}

/* ─────────────────────────────────────────────────
   MAIN AREA
───────────────────────────────────────────────── */
.fx-main {
    flex: 1;
    margin-left: var(--fx-sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─────────────────────────────────────────────────
   TOPBAR
───────────────────────────────────────────────── */
.fx-topbar {
    height: var(--fx-topbar-height);
    background: var(--fx-surface);
    border-bottom: 1px solid var(--fx-border);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--fx-shadow-xs);
}

.fx-topbar-toggle {
    width: 34px;
    height: 34px;
    border-radius: var(--fx-radius-sm);
    background: transparent;
    border: 1px solid var(--fx-border);
    color: var(--fx-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--fx-transition);
    flex-shrink: 0;
}
.fx-topbar-toggle:hover {
    background: var(--fx-surface-3);
    color: var(--fx-text-primary);
    border-color: var(--fx-border-strong);
}

/* Breadcrumb */
.fx-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}
.fx-breadcrumb-item {
    font-size: 13px;
    color: var(--fx-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.fx-breadcrumb-item a:hover {
    color: var(--fx-brand);
}
.fx-breadcrumb-item.fx-active {
    color: var(--fx-text-primary);
    font-weight: 500;
}
.fx-breadcrumb-sep {
    color: var(--fx-text-faint);
    font-size: 12px;
}

.fx-topbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

/* Search */
.fx-topbar-search {
    position: relative;
    display: flex;
    align-items: center;
}
.fx-topbar-search input {
    height: 34px;
    background: var(--fx-surface-3);
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius-sm);
    padding: 0 12px 0 34px;
    font-size: 13px;
    color: var(--fx-text-body);
    width: 220px;
    outline: none;
    transition: var(--fx-transition);
}
.fx-topbar-search input::placeholder {
    color: var(--fx-text-faint);
}
.fx-topbar-search input:focus {
    border-color: var(--fx-brand);
    background: var(--fx-surface);
    box-shadow: 0 0 0 3px var(--fx-brand-soft);
    width: 260px;
}
.fx-topbar-search .fx-search-icon {
    position: absolute;
    left: 10px;
    width: 14px;
    height: 14px;
    color: var(--fx-text-faint);
    pointer-events: none;
}

/* Icon buttons in topbar */
.fx-topbar-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--fx-radius-sm);
    background: transparent;
    border: 1px solid var(--fx-border);
    color: var(--fx-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--fx-transition);
    position: relative;
}
.fx-topbar-btn:hover {
    background: var(--fx-surface-3);
    color: var(--fx-text-primary);
    border-color: var(--fx-border-strong);
}
.fx-topbar-btn svg {
    width: 16px;
    height: 16px;
}

.fx-topbar-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    background: var(--fx-danger);
    border: 2px solid var(--fx-surface);
    border-radius: 50%;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* User menu */
.fx-topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: var(--fx-radius-sm);
    cursor: pointer;
    transition: var(--fx-transition);
    border: 1px solid transparent;
}
.fx-topbar-user:hover {
    background: var(--fx-surface-3);
    border-color: var(--fx-border);
}
.fx-topbar-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--fx-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fx-font-display);
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
}
.fx-topbar-user-info {
    line-height: 1.3;
}
.fx-topbar-user-info .fx-uname {
    font-size: 13px;
    font-weight: 600;
    color: var(--fx-text-primary);
}
.fx-topbar-user-info .fx-urole {
    font-size: 11px;
    color: var(--fx-text-muted);
}
.fx-topbar-user-chevron {
    width: 14px;
    height: 14px;
    color: var(--fx-text-faint);
}

/* ─────────────────────────────────────────────────
   PAGE CONTENT AREA
───────────────────────────────────────────────── */
.fx-content {
    flex: 1;
    padding: 24px;
    animation: fxFadeUp 0.25s ease;
}

/* Page header */
.fx-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.fx-page-title {
    font-family: var(--fx-font-display);
    font-size: 26px;
    letter-spacing: 1.5px;
    color: var(--fx-text-primary);
    line-height: 1;
    margin-bottom: 4px;
}
.fx-page-subtitle {
    font-size: 13px;
    color: var(--fx-text-muted);
}
.fx-page-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ─────────────────────────────────────────────────
   DROPDOWN
───────────────────────────────────────────────── */
.fx-dropdown {
    position: relative;
    display: inline-block;
}
.fx-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--fx-surface);
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius);
    box-shadow: var(--fx-shadow-md);
    min-width: 200px;
    z-index: 300;
    overflow: hidden;
    display: none;
    animation: fxFadeUp 0.15s ease;
}
.fx-dropdown-menu.fx-open {
    display: block;
}

.fx-dropdown-header {
    padding: 12px 16px 8px;
    border-bottom: 1px solid var(--fx-border);
}
.fx-dropdown-header .fx-uname {
    font-size: 13px;
    font-weight: 600;
    color: var(--fx-text-primary);
}
.fx-dropdown-header .fx-uemail {
    font-size: 11px;
    color: var(--fx-text-muted);
}

.fx-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    font-size: 13px;
    color: var(--fx-text-body);
    cursor: pointer;
    transition: background 0.15s;
}
.fx-dropdown-item:hover {
    background: var(--fx-surface-3);
}
.fx-dropdown-item svg {
    width: 15px;
    height: 15px;
    color: var(--fx-text-muted);
    flex-shrink: 0;
}
.fx-dropdown-item.fx-danger {
    color: var(--fx-danger-text);
}
.fx-dropdown-item.fx-danger svg {
    color: var(--fx-danger);
}
.fx-dropdown-divider {
    height: 1px;
    background: var(--fx-border);
    margin: 4px 0;
}

/* ─────────────────────────────────────────────────
   NOTIFICATION PANEL
───────────────────────────────────────────────── */
.fx-notif-menu {
    min-width: 340px;
    right: 0;
}
.fx-notif-header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--fx-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.fx-notif-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--fx-text-primary);
}
.fx-notif-mark {
    font-size: 11px;
    color: var(--fx-brand);
    cursor: pointer;
}
.fx-notif-mark:hover {
    text-decoration: underline;
}

.fx-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--fx-border);
    cursor: pointer;
    transition: background 0.15s;
}
.fx-notif-item:hover {
    background: var(--fx-surface-3);
}
.fx-notif-item.fx-unread {
    background: var(--fx-brand-soft);
}
.fx-notif-item.fx-unread:hover {
    background: var(--fx-brand-mid);
}

.fx-notif-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--fx-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fx-font-display);
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
}

.fx-notif-body {
    flex: 1;
}
.fx-notif-body .fx-notif-text {
    font-size: 12px;
    color: var(--fx-text-body);
    line-height: 1.4;
}
.fx-notif-body .fx-notif-text strong {
    color: var(--fx-text-primary);
    font-weight: 600;
}
.fx-notif-body .fx-notif-time {
    font-size: 11px;
    color: var(--fx-text-faint);
    margin-top: 3px;
}
.fx-notif-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--fx-brand);
    flex-shrink: 0;
    margin-top: 5px;
}

.fx-notif-footer {
    padding: 10px 16px;
    text-align: center;
    font-size: 12px;
    color: var(--fx-brand);
    cursor: pointer;
    font-weight: 500;
}
.fx-notif-footer:hover {
    background: var(--fx-surface-3);
}

/* ─────────────────────────────────────────────────
   MOBILE OVERLAY
───────────────────────────────────────────────── */
.fx-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 199;
    backdrop-filter: blur(2px);
}

.fx-profile-hero {
    background: var(--fx-surface);
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius-lg);
    box-shadow: var(--fx-shadow-sm);
    overflow: hidden;
    margin-bottom: 6px;
    position: relative;
}
.fx-profile-hero-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--fx-brand), var(--fx-brand-light));
}
.fx-profile-hero-body {
    padding: 24px 28px;
    display: flex;
    align-items: flex-start;
    gap: 22px;
}

/* Avatar with badge */
.fx-profile-av-wrap {
    position: relative;
    flex-shrink: 0;
}
.fx-profile-av {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--fx-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fx-font-display);
    font-size: 30px;
    color: #fff;
    border: 3px solid var(--fx-surface);
    box-shadow:
        0 0 0 2px var(--fx-brand-border),
        var(--fx-shadow-md);
}
.fx-profile-av-status {
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--fx-success);
    border: 2.5px solid var(--fx-surface);
    display: flex;
    align-items: center;
    justify-content: center;
}
.fx-profile-av-status svg {
    width: 9px;
    height: 9px;
    color: #fff;
}

/* Name block */
.fx-profile-info {
    flex: 1;
    min-width: 0;
}
.fx-profile-name {
    font-family: var(--fx-font-display);
    font-size: 36px;
    letter-spacing: 2px;
    color: var(--fx-text-primary);
    line-height: 1;
    margin-bottom: 6px;
}
.fx-profile-name span {
    color: var(--fx-brand);
}
.fx-profile-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--fx-text-muted);
    margin-bottom: 12px;
    font-family: var(--fx-font-mono);
}
.fx-profile-meta-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--fx-border-strong);
    flex-shrink: 0;
}
.fx-profile-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Stats row */
.fx-profile-stats {
    display: flex;
    gap: 0;
}
.fx-profile-stat {
    padding-right: 28px;
    margin-right: 28px;
    border-right: 1px solid var(--fx-border);
}
.fx-profile-stat:last-child {
    border-right: none;
    margin-right: 0;
    padding-right: 0;
}
.fx-profile-stat-val {
    font-family: var(--fx-font-mono);
    font-size: 24px;
    font-weight: 700;
    color: var(--fx-brand);
    line-height: 1;
}
.fx-profile-stat-lbl {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--fx-text-faint);
    margin-top: 4px;
}

/* Actions */
.fx-profile-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

/* ── Profile Tabs Nav ── */
.fx-profile-tabs-wrap {
    background: var(--fx-surface);
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius-lg);
    box-shadow: var(--fx-shadow-sm);
    overflow: hidden;
}
.fx-profile-tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--fx-border);
    padding: 0 24px;
    background: var(--fx-surface);
    gap: 2px;
}
.fx-profile-tab-btn {
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--fx-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.18s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 7px;
}
.fx-profile-tab-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.fx-profile-tab-btn::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--fx-brand);
    border-radius: 2px 2px 0 0;
    opacity: 0;
    transform: scaleX(0.4);
    transition: all 0.2s;
}
.fx-profile-tab-btn:hover {
    color: var(--fx-text-body);
}
.fx-profile-tab-btn.fx-active {
    color: var(--fx-brand);
    font-weight: 600;
}
.fx-profile-tab-btn.fx-active::after {
    opacity: 1;
    transform: scaleX(1);
}
.fx-profile-tab-badge {
    background: var(--fx-danger-soft);
    color: var(--fx-danger-text);
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 99px;
    line-height: 1.5;
}
.fx-profile-tab-badge.brand {
    background: var(--fx-brand-soft);
    color: var(--fx-brand);
}

/* Tab panes */
.fx-profile-pane {
    display: none;
    padding: 28px;
    animation: fxFadeUp 0.2s ease;
}
.fx-profile-pane.fx-active {
    display: block;
}

/* ── Section cards inside profile ── */
.fx-profile-section {
    background: var(--fx-surface);
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
}
.fx-profile-section:last-child {
    margin-bottom: 0;
}
.fx-profile-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--fx-border);
    background: var(--fx-surface-2);
}
.fx-profile-section-title {
    font-family: var(--fx-font-display);
    font-size: 13px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--fx-text-primary);
}

/* Field rows */
.fx-field-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--fx-border);
    gap: 16px;
}
.fx-field-row:last-child {
    border-bottom: none;
}
.fx-field-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: var(--fx-text-faint);
}
.fx-field-value {
    font-size: 14px;
    color: var(--fx-text-body);
}
.fx-field-value strong {
    color: var(--fx-text-primary);
    font-weight: 600;
}

/* Specialization tags */
.fx-spec-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 18px 20px;
}
.fx-spec-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--fx-radius-pill);
    border: 1px solid var(--fx-brand-border);
    background: var(--fx-brand-soft);
    color: var(--fx-brand);
    font-size: 13px;
    font-weight: 500;
    cursor: default;
}
.fx-spec-tag-remove {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--fx-brand-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}
.fx-spec-tag-remove:hover {
    background: var(--fx-brand);
    color: #fff;
}
.fx-spec-tag-remove svg {
    width: 8px;
    height: 8px;
}
.fx-spec-tag-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--fx-radius-pill);
    border: 1px dashed var(--fx-border-strong);
    background: transparent;
    color: var(--fx-brand);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.fx-spec-tag-add:hover {
    background: var(--fx-brand-soft);
    border-color: var(--fx-brand-border);
}
.fx-spec-tag-add svg {
    width: 12px;
    height: 12px;
}

/* Payroll breakdown */
.fx-pay-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
.fx-pay-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--fx-border);
    border-right: 1px solid var(--fx-border);
}
.fx-pay-item:nth-child(even) {
    border-right: none;
}
.fx-pay-item:nth-last-child(-n + 2) {
    border-bottom: none;
}
.fx-pay-item-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--fx-text-faint);
    font-weight: 600;
    margin-bottom: 5px;
}
.fx-pay-item-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--fx-text-primary);
    font-family: var(--fx-font-mono);
}
.fx-pay-item-val.fx-positive {
    color: var(--fx-success-text);
}
.fx-pay-item-val.fx-deduct {
    color: var(--fx-danger-text);
}

/* Payroll total bar */
.fx-pay-total {
    padding: 18px 20px;
    background: var(--fx-brand);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 0 0 var(--fx-radius-lg) var(--fx-radius-lg);
}
.fx-pay-total-lbl {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.75);
}
.fx-pay-total-val {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    font-family: var(--fx-font-mono);
}

/* Timeline */
.fx-hist-timeline {
    padding: 20px;
}

/* Certs grid */
.fx-cert-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.fx-cert-card {
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius);
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--fx-surface);
    transition: box-shadow 0.15s;
}
.fx-cert-card:hover {
    box-shadow: var(--fx-shadow);
}
.fx-cert-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--fx-radius-sm);
    background: var(--fx-brand-soft);
    color: var(--fx-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.fx-cert-icon svg {
    width: 18px;
    height: 18px;
}
.fx-cert-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--fx-text-primary);
    line-height: 1.3;
    margin-bottom: 3px;
}
.fx-cert-sub {
    font-size: 11px;
    color: var(--fx-text-muted);
}
.fx-cert-expiry {
    margin-top: 6px;
    font-size: 11px;
}

/* Emergency / contact card */
.fx-contact-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--fx-border);
}
.fx-contact-row:last-child {
    border-bottom: none;
}
.fx-contact-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--fx-surface-3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fx-text-muted);
    flex-shrink: 0;
}
.fx-contact-icon svg {
    width: 15px;
    height: 15px;
}

/* Performance tab */
.fx-perf-stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-bottom: 1px solid var(--fx-border);
}
.fx-perf-stat {
    padding: 20px;
    text-align: center;
    border-right: 1px solid var(--fx-border);
}
.fx-perf-stat:last-child {
    border-right: none;
}
.fx-perf-stat-val {
    font-family: var(--fx-font-mono);
    font-size: 28px;
    font-weight: 700;
    color: var(--fx-brand);
}
.fx-perf-stat-lbl {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--fx-text-faint);
    font-weight: 600;
    margin-top: 4px;
}

/* Leave balance bars */
.fx-leave-row {
    padding: 14px 20px;
    border-bottom: 1px solid var(--fx-border);
}
.fx-leave-row:last-child {
    border-bottom: none;
}
.fx-leave-row-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 7px;
}
.fx-leave-row-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--fx-text-body);
}
.fx-leave-row-count {
    font-size: 12px;
    font-family: var(--fx-font-mono);
    font-weight: 600;
    color: var(--fx-text-muted);
}



/* Password tab */
.fx-password-wrap {
    max-width: 440px;
}

/* Responsive */
@media (max-width: 900px) {
    .fx-profile-hero-body {
        flex-wrap: wrap;
    }
    .fx-profile-actions {
        flex-direction: row;
    }
    .fx-pay-grid {
        grid-template-columns: 1fr;
    }
    .fx-pay-item {
        border-right: none !important;
    }
    .fx-cert-grid {
        grid-template-columns: 1fr;
    }
    .fx-perf-stat-row {
        grid-template-columns: 1fr;
    }
    .fx-perf-stat {
        border-right: none;
        border-bottom: 1px solid var(--fx-border);
    }
}

/* ─────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .fx-topbar-search input {
        width: 160px;
    }
    .fx-topbar-search input:focus {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .fx-sidebar {
        transform: translateX(-100%);
    }
    .fx-app.fx-sidebar-open .fx-sidebar {
        transform: translateX(0);
    }
    .fx-app.fx-sidebar-open .fx-sidebar-overlay {
        display: block;
    }
    .fx-main {
        margin-left: 0 !important;
    }
    .fx-content {
        padding: 16px;
    }
    .fx-topbar-search {
        display: none;
    }
    .fx-topbar-user-info {
        display: none;
    }
}
