/* ============================================================
   SWA Employee Portal — Architect_OS Design System
   Brutalist-minimal, monochrome, zero-radius
   ============================================================ */

:root {
    --swa-bg: #F9F9F9;
    --swa-surface: #FFFFFF;
    --swa-surface-alt: #EEEEEE;
    --swa-text: #1B1B1B;
    --swa-text-secondary: #777777;
    --swa-text-muted: #9CA3AF;
    --swa-border: #E5E5E5;
    --swa-primary: #000000;
    --swa-primary-hover: #303030;
    --swa-danger: #BA1A1A;
    --swa-success: #16A34A;
    --swa-warning: #D97706;
    --swa-sidebar-w: 256px;
    --swa-header-h: 64px;
}

/* ---- Base ---- */

*, *::before, *::after { box-sizing: border-box; }

html, body { overflow-x: hidden; }

body {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif !important;
    background-color: var(--swa-bg) !important;
    color: var(--swa-text);
    margin: 0;
    line-height: 1.5;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

/* Prevent flex children from forcing parent wider than viewport */
.container-fluid > .row > .col { min-width: 0; }

.font-space {
    font-family: 'Space Grotesk', sans-serif !important;
}

h1, h2, h3, h4, h5, h6 { color: var(--swa-text); margin: 0; }

p, span, div, td, th, li, a,
input, textarea, select, button, label {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif !important;
}

a { color: var(--swa-text); text-decoration: none; }
a:hover { color: var(--swa-primary); }

/* ---- Utility classes ---- */

.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.05em; }
.tracking-wider { letter-spacing: 0.1em; }
.tracking-widest { letter-spacing: 0.15em; }

/* ---- Sidebar ---- */

.swa-sidebar {
    width: var(--swa-sidebar-w);
    background: #FAFAFA;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 8px;
}

.swa-sidebar-logo {
    padding: 16px 16px 32px;
}

.swa-sidebar-logo img {
    height: 16px;
    object-fit: contain;
}

.swa-sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.swa-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--swa-text-muted);
    cursor: pointer;
    text-decoration: none !important;
    transition: all 200ms ease;
}

.swa-nav-item:hover {
    background: #E5E5E5;
    color: var(--swa-primary);
    transform: translateX(2px);
}

.swa-nav-item.active {
    background: var(--swa-primary);
    color: #FFFFFF;
    font-weight: 700;
}
.swa-nav-item.active i {
    color: #FFFFFF !important;
}

.swa-nav-item i.fa-solid {
    font-size: 14px;
    width: 20px;
    text-align: center;
}

/* Sidebar icon fallback (SVG from MenuService) */
.swa-nav-item .swa-nav-icon {
    width: 20px;
    height: 20px;
    display: none; /* hidden — using Material Symbols instead */
}

.swa-nav-arrow {
    margin-left: auto;
    font-size: 12px;
    color: var(--swa-text-muted);
    transition: transform 150ms ease;
}

.swa-nav-group.open > .swa-nav-item .swa-nav-arrow { transform: rotate(90deg); }

.swa-nav-section-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 16px 8px;
    cursor: pointer;
}

.swa-nav-section-label span {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--swa-text-muted);
}

.swa-nav-children { display: none; padding-left: 16px; }
.swa-nav-group.open > .swa-nav-children { display: flex; flex-direction: column; gap: 2px; }

.swa-nav-child {
    display: block;
    padding: 8px 16px;
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--swa-text-muted);
    text-decoration: none !important;
    transition: color 150ms ease;
}
.swa-nav-child:hover { color: var(--swa-primary); }
.swa-nav-child.active { color: var(--swa-primary); font-weight: 700; }

.swa-sidebar-footer {
    margin-top: auto;
    border-top: 1px solid var(--swa-border);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ---- Main area ---- */

.col { margin-left: var(--swa-sidebar-w); }

/* ---- Header ---- */

.swa-header {
    height: var(--swa-header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: fixed;
    top: 0;
    left: var(--swa-sidebar-w);
    right: 0;
    z-index: 50;
    background: var(--swa-bg);
    border-bottom: 1px solid transparent;
    transition: box-shadow 220ms ease, border-color 220ms ease;
    will-change: box-shadow;
}

.swa-header.scrolled {
    border-bottom-color: var(--swa-border);
    box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.08);
}

.swa-header-title {
    font-family: 'Space Grotesk', sans-serif !important;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: var(--swa-primary);
}

.swa-header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.swa-header-right .material-icons-outlined {
    font-size: 22px;
    color: var(--swa-text-muted);
    cursor: pointer;
    transition: color 150ms ease;
}
.swa-header-right .material-icons-outlined:hover { color: var(--swa-primary); }

.swa-header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 16px;
    border-left: 1px solid var(--swa-border);
    cursor: pointer;
    border-top: none;
    border-right: none;
    border-bottom: none;
    background: none;
}

.swa-header-user-info {
    text-align: right;
}

.swa-header-user-name {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--swa-text);
    display: block;
}

.swa-header-user-role {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--swa-text-muted);
    display: block;
}

.swa-avatar {
    width: 32px;
    height: 32px;
    background: var(--swa-surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--swa-text);
    overflow: hidden;
    /* Square — no border-radius */
}
.swa-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Page title (in header now) ---- */

.swa-toolbar { display: none; } /* Title moved to header */

/* ---- Content ---- */

.swa-content {
    padding: var(--swa-header-h) 40px 40px;
    min-height: calc(100vh - 60px);
    max-width: 100%;
    overflow-x: hidden;
}

/* Force Bootstrap grid to work inside swa-content */
.swa-content .row {
    display: flex !important;
    flex-wrap: wrap !important;
}

@media (min-width: 992px) {
    .swa-content .col-lg-8 { flex: 0 0 auto !important; width: 66.666667% !important; }
    .swa-content .col-lg-4 { flex: 0 0 auto !important; width: 33.333333% !important; }
}

/* ---- Footer ---- */

.swa-footer {
    padding: 20px 40px;
    border-top: 1px solid var(--swa-border);
    font-size: 12px;
    color: var(--swa-text-muted);
}

/* ============================================================
   DASHBOARD COMPONENTS
   ============================================================ */

/* Welcome section */
.swa-welcome h2 {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--swa-primary);
    margin-bottom: 8px;
}

.swa-welcome-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--swa-text-secondary);
}

.swa-welcome-meta .dot {
    width: 4px;
    height: 4px;
    background: #D1D5DB;
    display: inline-block;
}

/* Metric cards */
.swa-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin: 48px 0;
}

.swa-metric-card {
    background: var(--swa-surface);
    padding: 24px 28px;
    border-right: 1px solid #F3F4F6;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    min-height: 160px;
}

.swa-metric-card:last-child {
    border-right: none;
    background: var(--swa-primary);
    color: #FFFFFF;
}

.swa-metric-card:last-child .swa-metric-label { color: var(--swa-text-muted); }
.swa-metric-card:last-child .swa-metric-sub { color: var(--swa-text-muted); }

.swa-metric-label {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--swa-text-muted);
}

.swa-metric-value {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 2.75rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 4px;
}

.swa-metric-sub {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--swa-text-muted);
}

.swa-metric-bar {
    width: 100%;
    height: 4px;
    background: #404040;
    margin-top: 8px;
}

.swa-metric-bar-fill {
    height: 100%;
    background: #FFFFFF;
}

/* Section headers */
.swa-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
}

.swa-section-title {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.swa-section-subtitle {
    font-size: 14px;
    color: var(--swa-text-muted);
}

.swa-section-link {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.15em;
    border-bottom: 1px solid var(--swa-primary);
    padding-bottom: 4px;
    color: var(--swa-primary);
    text-decoration: none !important;
    transition: opacity 150ms ease;
}
.swa-section-link:hover { opacity: 0.5; }

/* Panel — fixed height card with scrollable body */
.swa-panel {
    background: var(--swa-surface);
    border: 1px solid var(--swa-border);
    display: flex;
    flex-direction: column;
    height: 420px;
}

.swa-panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--swa-border);
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.swa-panel-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
    font-size: 14px;
    color: var(--swa-text-secondary);
    line-height: 1.7;
}

.swa-panel-match {
    height: 420px;
}

/* Inline spinner (next to header) */
.swa-spinner-inline {
    display: inline-flex;
    align-items: center;
}

.swa-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--swa-border);
    border-top-color: var(--swa-primary);
    border-radius: 50%;
    animation: swa-spin 0.6s linear infinite;
}

@keyframes swa-spin {
    to { transform: rotate(360deg); }
}

/* Skeleton loading */
.swa-skeleton-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--swa-border);
}

.swa-skeleton-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
    background-size: 200% 100%;
    animation: swa-shimmer 1.5s infinite;
    flex-shrink: 0;
}

.swa-skeleton-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 4px;
}

.swa-skeleton-line {
    height: 10px;
    background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
    background-size: 200% 100%;
    animation: swa-shimmer 1.5s infinite;
}

@keyframes swa-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---- Reusable avatar circle ---- */

.swa-avatar-circle {
    border-radius: 50% !important;
    overflow: hidden;
    flex-shrink: 0;
    background: #F3E8FF;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.swa-avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50% !important;
}

.swa-avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.swa-avatar-initial {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: #7C3AED;
    line-height: 1;
}

.swa-avatar-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50% !important;
    border: 2px solid var(--swa-surface) !important;
}

/* ---- Team status grid ---- */

.swa-team-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
}

.swa-team-member {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.swa-team-member .swa-avatar-circle {
    margin: 0 auto;
}

.swa-team-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--swa-text);
    line-height: 1.3;
}

.swa-team-status {
    font-size: 11px;
    color: var(--swa-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.swa-status-dot-inline {
    width: 8px;
    height: 8px;
    border-radius: 50% !important;
    display: inline-block;
    flex-shrink: 0;
}

@media (max-width: 1200px) {
    .swa-team-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    .swa-team-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Office update rows */
.swa-update-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--swa-border);
}

.swa-update-row:last-of-type {
    border-bottom: none;
}

.swa-update-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #F3E8FF;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swa-update-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.swa-update-avatar-initial {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #7C3AED;
}

.swa-update-info {
    flex: 1;
    min-width: 0;
}

.swa-update-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--swa-text);
}

.swa-update-status {
    font-size: 13px;
    font-weight: 700;
}

.swa-update-remarks {
    font-size: 12px;
    color: var(--swa-text-muted);
    font-style: italic;
    margin-top: 2px;
}

.swa-update-time {
    font-size: 11px;
    color: var(--swa-text-muted);
    margin-top: 2px;
}

/* Feed cards (standalone) */
.swa-feed-card {
    background: var(--swa-surface);
    padding: 24px;
    margin-bottom: 24px;
}

.swa-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.swa-feed-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.swa-feed-user-avatar {
    width: 40px;
    height: 40px;
    background: #F3F4F6;
    overflow: hidden;
}
.swa-feed-user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.swa-feed-user-name {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.swa-feed-user-role {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--swa-text-muted);
}

.swa-feed-time {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--swa-text-muted);
}

.swa-feed-body {
    font-size: 14px;
    color: var(--swa-text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.swa-tag {
    display: inline-block;
    padding: 4px 8px;
    background: #F3F4F6;
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-right: 8px;
}

/* Sidebar widgets */
.swa-widget-title {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.swa-widget-title .dot {
    width: 8px;
    height: 8px;
    background: var(--swa-primary);
    display: inline-block;
}

.swa-announcement {
    background: var(--swa-surface-alt);
    padding: 32px;
}

.swa-announcement-label {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--swa-text-muted);
    margin-bottom: 8px;
}

.swa-announcement h4 {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
}

.swa-announcement p {
    font-size: 12px;
    color: var(--swa-text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.swa-announcement .btn-block {
    width: 100%;
    background: var(--swa-primary);
    color: #FFFFFF;
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.15em;
    padding: 12px !important;
    border: none !important;
    cursor: pointer;
    transition: background 150ms ease;
}
.swa-announcement .btn-block:hover { background: var(--swa-primary-hover); }

/* Birthday / cultural pulse items */
.swa-person-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    cursor: pointer;
}
.swa-person-row:hover .swa-person-avatar { filter: grayscale(0); }

.swa-person-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.swa-person-avatar {
    width: 48px;
    height: 48px;
    background: #F3F4F6;
    overflow: hidden;
    filter: grayscale(1);
    transition: filter 200ms ease;
}
.swa-person-avatar img { width: 100%; height: 100%; object-fit: cover; }

.swa-person-name {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.swa-person-meta {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--swa-text-muted);
}

/* Event card */
.swa-event-label {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--swa-text-muted);
    margin-bottom: 16px;
}

.swa-event {
    display: flex;
    gap: 16px;
}

.swa-event-date {
    width: 48px;
    height: 48px;
    background: var(--swa-primary);
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif !important;
    flex-shrink: 0;
}

.swa-event-date .day {
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
}

.swa-event-date .month {
    font-size: 8px;
    text-transform: uppercase;
    font-weight: 700;
}

.swa-event-title {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.swa-event-meta {
    font-size: 10px;
    color: var(--swa-text-muted);
}

/* ============================================================
   GLOBAL COMPONENTS (cards, buttons, forms, tables)
   ============================================================ */

/* Cards */
.card {
    background: var(--swa-surface) !important;
    border: 1px solid var(--swa-border) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden;
    margin-bottom: 24px;
}

.card .card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--swa-border) !important;
    padding: 16px 24px !important;
    min-height: auto !important;
}

.card .card-header .card-title,
.card .card-header h3,
.card .card-header h4,
.card .card-header h5 {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--swa-text) !important;
    margin: 0 !important;
}

.card .card-body { padding: 24px !important; }

/* Buttons */
.btn {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 10px 20px !important;
    border-radius: 0 !important;
    cursor: pointer;
    transition: all 150ms ease;
    text-decoration: none !important;
    border: 1px solid transparent !important;
    line-height: 1.5 !important;
}

.btn-small, .btn-sm {
    font-size: 10px !important;
    padding: 6px 14px !important;
    border-radius: 0 !important;
}

.btn.btn-primary, .btn-small.btn-primary {
    background: var(--swa-primary) !important;
    color: #fff !important;
    border-color: var(--swa-primary) !important;
}
.btn.btn-primary:hover { background: var(--swa-primary-hover) !important; }

.btn.btn-danger, .btn-small.btn-danger {
    background: var(--swa-danger) !important;
    color: #fff !important;
    border-color: var(--swa-danger) !important;
}

.btn.btn-secondary, .btn-small.btn-secondary {
    background: var(--swa-surface) !important;
    color: var(--swa-text) !important;
    border-color: var(--swa-border) !important;
}
.btn.btn-secondary:hover { background: #F3F4F6 !important; }

button.btn-delete-icon { padding: 0 !important; border: none !important; background: transparent !important; }

/* Tables */
.table { border-collapse: collapse; }
.table, .table tr { border: 1px solid var(--swa-border) !important; }
.table th, .table td { padding: 10px 16px !important; font-size: 13px; vertical-align: middle; }
.table thead { background: var(--swa-bg) !important; }
.table thead th {
    font-family: 'Space Grotesk', sans-serif !important;
    font-weight: 600 !important;
    font-size: 10px !important;
    color: var(--swa-text-muted) !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.table tbody tr { transition: background 120ms ease; }
.table tbody tr:hover { background: #FAFAFA; }

table img.profile-photo { width: 24px; height: 24px; object-fit: cover; }
img.profile-photo { max-width: 100%; object-fit: cover; }
.symbol img { object-fit: cover; }

/* Forms */
.form-control {
    background: var(--swa-surface) !important;
    border: 1px solid var(--swa-border) !important;
    border-radius: 0 !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    color: var(--swa-text) !important;
    transition: border-color 120ms ease;
}
.form-control:focus {
    border-color: var(--swa-primary) !important;
    box-shadow: none !important;
    outline: none;
}
.form-control[readonly]:not(.flatpickr-input) {
    background: #F3F4F6 !important;
    border-color: var(--swa-border) !important;
}

.form-label, label { font-size: 13px; font-weight: 500; color: var(--swa-text); }

.select2-selection {
    height: calc(1.5em + 1.5em) !important;
    border-color: var(--swa-border) !important;
    border-radius: 0 !important;
}

/* Dropdowns */
.dropdown-menu {
    display: none;
    position: absolute;
    z-index: 1000;
    background: var(--swa-surface) !important;
    border: 1px solid var(--swa-border) !important;
    border-radius: 0 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08) !important;
    padding: 4px !important;
    list-style: none !important;
    min-width: 220px;
}
.dropdown-menu.show { display: block; }
.dropdown-menu li { list-style: none !important; }

.dropdown-item {
    display: block !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    color: var(--swa-text) !important;
    cursor: pointer;
    text-decoration: none !important;
    background: none !important;
    border: none !important;
    width: 100% !important;
}
.dropdown-item:hover { background: #F3F4F6 !important; }
.dropdown-divider { border-color: var(--swa-border) !important; margin: 4px 0 !important; }

/* Pagination */
.page-link { color: var(--swa-text); border: 1px solid var(--swa-border); font-size: 13px; border-radius: 0 !important; }
.page-link:hover { background: #F3F4F6; color: var(--swa-text); }
.page-item.active .page-link { background: var(--swa-primary); border-color: var(--swa-primary); color: #fff; }

/* Modals */
.modal-content { border: 1px solid var(--swa-border) !important; border-radius: 0 !important; box-shadow: 0 20px 40px rgba(0,0,0,0.12) !important; }
.modal-header { border-bottom: 1px solid var(--swa-border) !important; padding: 16px 24px !important; }
.modal-body { padding: 24px !important; }
.modal-footer { border-top: 1px solid var(--swa-border) !important; padding: 12px 24px !important; }

/* Badges */
.badge { font-weight: 600; font-size: 10px; border-radius: 0 !important; padding: 3px 8px; text-transform: uppercase; letter-spacing: 0.05em; }

/* Alerts */
.alert { border-radius: 0 !important; font-size: 13px; padding: 12px 16px; }

.alert-danger {
    background: #FEF2F2 !important;
    border: 1px solid #FECACA !important;
    color: #991B1B !important;
    border-left: 4px solid #DC2626 !important;
}

.alert-warning {
    background: #FFFBEB !important;
    border: 1px solid #FDE68A !important;
    color: #92400E !important;
    border-left: 4px solid #D97706 !important;
}

.alert-success {
    background: #F0FDF4 !important;
    border: 1px solid #BBF7D0 !important;
    color: #166534 !important;
    border-left: 4px solid #16A34A !important;
}

.alert ul { margin: 0; padding-left: 16px; }
.alert li { margin-bottom: 2px; }

/* Status Colors */
.bg-danger { background-color: var(--swa-danger) !important; }
.bg-success { background-color: var(--swa-success) !important; }
.bg-warning { background-color: var(--swa-warning) !important; }
.bg-primary { background-color: var(--swa-primary) !important; }

.text-primary { color: var(--swa-primary) !important; }
.text-danger { color: var(--swa-danger) !important; }
.text-success { color: var(--swa-success) !important; }
.text-dark { color: var(--swa-text) !important; }
.text-muted { color: var(--swa-text-muted) !important; }

.border-primary { border-color: var(--swa-primary) !important; }
.border-danger { border-color: var(--swa-danger) !important; }

/* Employee status dot */
.employee-status {
    width: 12px; height: 12px;
    border-radius: 50% !important;
    position: absolute; bottom: 0; right: 0;
    border: 2px solid var(--swa-surface);
}

/* Separators */
.separator, .seperator { border-color: var(--swa-border) !important; }

/* Loading */
.loading-div { width: 100%; height: 100%; position: relative; background: var(--swa-surface); z-index: 999; margin: auto; }
.lds-eclipse { width: 25px !important; height: 25px !important; position: absolute; left: 50%; top: 50%; transform: translateY(-50%) translateX(-50%) !important; }
.lds-eclipse div { animation: lds-eclipse 1s linear infinite; width: 100%; height: 100%; border-radius: 100%; box-shadow: 0 2px 0 0 var(--swa-primary); transform-origin: 12.5px 12.5px; }
#fullpage-loader.loading-div { width: 100vw; height: 100vh; position: fixed; background: var(--swa-surface); z-index: 9999; }
#fullpage-loader .lds-eclipse { width: 200px !important; height: 200px !important; }
#fullpage-loader .lds-eclipse div { box-shadow: 0 4px 0 0 var(--swa-primary); transform-origin: 100px 100px; }
@keyframes lds-eclipse { 0% { transform: rotate(0deg) } 50% { transform: rotate(180deg) } 100% { transform: rotate(360deg) } }

/* Scrolltop */
.scrolltop { background-color: var(--swa-primary) !important; border-radius: 0 !important; }

/* DataTables */
.datatable th { text-align: left !important; }
.dt-container .dt-length label { margin-left: 5px; }

/* Key Results */
.key-result.card-body .edit-key-result { display: none; }
.key-result.card-body:hover .edit-key-result { display: block; }

/* Utility */
.w-25px { width: 25px !important; }
.h-25px { height: 25px !important; }
.projects-input { display: none; }
.welcome .welcome-col .card-body { max-height: 350px; overflow-y: auto; }
.box-shadow { box-shadow: none; }
.font-size-h1 { font-size: 2rem !important; }
.svg-icon.delete svg [fill]:not(.permanent):not(g) { fill: var(--swa-danger); }
.symbol.symbol-light-danger .symbol-label { background-color: #FEE2E2; color: var(--swa-danger); }

/* Auth Pages */
.logo_img_full { height: 150px !important; width: 250px !important; object-fit: contain; }
.background-img-auth { background: url(../img/swa-header-back-min.jpg); background-size: cover; }
.crimson-bg { background: rgba(0,0,0,0.6); overflow: hidden !important; }
.bg-none { background: transparent !important; }
.border-none { border: none !important; }
.vertical-line { position: absolute; height: 100%; width: 1px; background: rgba(255,255,255,0.15); }
.moving-block { position: relative; height: 20px; width: 1px; background: #fff; opacity: 0.5; }
.pos1 { left: 50%; } .pos2 { left: 60%; } .pos3 { left: 89%; }
.s1-down { animation: infinite_down 8s infinite } .s2-down { animation: infinite_down 5s infinite }
.s3-down { animation: infinite_down 4s infinite } .s1-up { animation: infinite_up 7s infinite }
.s2-up { animation: infinite_up 5s infinite } .s3-up { animation: infinite_up 3s infinite }
@keyframes infinite_down { 0% { top: -10% } 100% { top: 110% } }
@keyframes infinite_up { 0% { top: 110% } 100% { top: -10% } }

/* Mobile */
.swa-mobile-toggle { display: none; background: none; border: none; padding: 6px; cursor: pointer; color: var(--swa-text); }

@media (max-width: 991.98px) {
    .swa-sidebar { transform: translateX(-100%); transition: transform 200ms ease; }
    .swa-sidebar.open { transform: translateX(0); box-shadow: 0 25px 50px rgba(0,0,0,0.2); }
    .col { margin-left: 0 !important; }
    .swa-mobile-toggle { display: flex; align-items: center; }
    .swa-header { padding: 0 16px; left: 0; }
    .swa-content { padding: var(--swa-header-h) 16px 24px; }
    .swa-metrics { grid-template-columns: repeat(2, 1fr); }
    .swa-metric-card { padding: 20px; min-height: 140px; }
    .swa-sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.25); z-index: 99; display: none; }
    .swa-sidebar-overlay.open { display: block; }
}

/* Fix modals — ensure they are hidden by default */
.modal {
    display: none;
}

.modal.fade {
    opacity: 0;
    transition: opacity 0.15s linear;
}

.modal.fade.show {
    opacity: 1;
    display: block;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

.modal-backdrop.fade { opacity: 0; }
.modal-backdrop.show { opacity: 0.5; }

.modal.show {
    display: block !important;
}

.modal-dialog {
    position: relative;
    margin: 1.75rem auto;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
}

/* ---- Filter row ---- */

.swa-filter-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 32px;
}

.swa-filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.swa-filter-group > .form-control,
.swa-filter-group > select.form-control {
    width: auto;
    flex: 0 1 auto;
}

.swa-filter-select {
    max-width: 180px;
    font-size: 13px !important;
    padding: 8px 12px !important;
}

.swa-filter-date {
    max-width: 140px;
    font-size: 13px !important;
    padding: 8px 12px !important;
}

/* ---- Outline Danger Button ---- */

.swa-btn-outline-danger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--swa-danger);
    background: transparent;
    border: 1px solid var(--swa-danger);
    cursor: pointer;
    transition: all 120ms ease;
}

.swa-btn-outline-danger:hover {
    background: var(--swa-danger);
    color: #fff;
}

/* ---- Confirmation Modal ---- */

.swa-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 600;
    display: none;
    opacity: 0;
    transition: opacity 150ms ease;
}

.swa-confirm-overlay.open {
    display: block;
    opacity: 1;
}

.swa-confirm-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--swa-surface);
    z-index: 601;
    width: 400px;
    max-width: 90vw;
    padding: 32px;
    text-align: center;
    display: none;
    opacity: 0;
    transition: all 150ms ease;
    border: 1px solid var(--swa-border);
}

.swa-confirm-modal.open {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.swa-confirm-icon {
    font-size: 28px;
    color: var(--swa-danger);
    margin-bottom: 16px;
}

.swa-confirm-title {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.swa-confirm-text {
    font-size: 14px;
    color: var(--swa-text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.swa-confirm-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* ---- Slide-out Panel ---- */

.swa-slide-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 500;
    display: none;
    opacity: 0;
    transition: opacity 200ms ease;
}

.swa-slide-overlay.open {
    display: block;
    opacity: 1;
}

.swa-slide-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 620px;
    max-width: 90vw;
    background: var(--swa-surface);
    z-index: 501;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 250ms ease;
    box-shadow: -8px 0 24px rgba(0,0,0,0.1);
}

.swa-slide-panel.open {
    transform: translateX(0);
}

.swa-slide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--swa-border);
    flex-shrink: 0;
}

.swa-slide-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.swa-slide-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--swa-border);
    flex-shrink: 0;
}

.swa-form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.swa-form-group .form-label {
    margin-bottom: 0;
}

.swa-create-project-entry {
    padding: 16px;
    border: 1px solid var(--swa-border);
    margin-bottom: 12px;
    background: #FAFAFA;
}

.swa-create-project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.swa-remove-project {
    background: none;
    border: none;
    color: var(--swa-danger);
    cursor: pointer;
    padding: 4px;
    transition: opacity 120ms ease;
}

.swa-remove-project:hover {
    opacity: 0.7;
}

/* ---- Searchable Single Select ---- */

.swa-searchable-select {
    position: relative;
}

.swa-ss-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--swa-border);
    background: var(--swa-surface);
    cursor: pointer;
    font-size: 13px;
    min-height: 40px;
    transition: border-color 120ms ease;
}

.swa-ss-trigger:hover,
.swa-searchable-select.open .swa-ss-trigger {
    border-color: var(--swa-primary);
}

.swa-ss-value {
    color: var(--swa-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.swa-ss-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 300;
    background: var(--swa-surface);
    border: 1px solid var(--swa-border);
    border-top: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.swa-searchable-select.open .swa-ss-dropdown {
    display: block;
}

.swa-ss-search {
    width: 100%;
    border: none !important;
    border-bottom: 1px solid var(--swa-border) !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    outline: none;
    background: var(--swa-surface) !important;
    border-radius: 0 !important;
}

.swa-ss-options {
    max-height: 220px;
    overflow-y: auto;
}

.swa-ss-group-label {
    padding: 8px 12px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--swa-text-muted);
    font-family: 'Space Grotesk', sans-serif;
}

.swa-ss-option {
    padding: 8px 12px 8px 20px;
    font-size: 13px;
    cursor: pointer;
    transition: background 80ms ease;
    color: var(--swa-text);
}

.swa-ss-option:hover {
    background: #F3F4F6;
}

/* ---- Custom Multiselect ---- */

.swa-multiselect {
    position: relative;
    min-width: 180px;
}

.swa-ms-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--swa-border);
    background: var(--swa-surface);
    cursor: pointer;
    font-size: 13px;
    min-height: 40px;
    transition: border-color 120ms ease;
    user-select: none;
}

.swa-ms-trigger:hover,
.swa-multiselect.open .swa-ms-trigger {
    border-color: var(--swa-primary);
}

.swa-ms-placeholder {
    color: var(--swa-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.swa-ms-arrow {
    font-size: 10px;
    color: var(--swa-text-muted);
    transition: transform 150ms ease;
    flex-shrink: 0;
}

.swa-multiselect.open .swa-ms-arrow {
    transform: rotate(180deg);
}

.swa-ms-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--swa-surface);
    border: 1px solid var(--swa-border);
    border-top: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    min-width: 240px;
}

.swa-multiselect.open .swa-ms-dropdown {
    display: block;
}

.swa-ms-search {
    width: 100%;
    border: none !important;
    border-bottom: 1px solid var(--swa-border) !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    outline: none;
    background: var(--swa-surface) !important;
    border-radius: 0 !important;
}

.swa-ms-options {
    max-height: 200px;
    overflow-y: auto;
}

.swa-ms-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background 80ms ease;
    color: var(--swa-text);
    margin: 0;
    font-weight: 400;
}

.swa-ms-option:hover {
    background: #F3F4F6;
}

.swa-ms-option input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--swa-primary);
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
}

/* Active filter chips */
.swa-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    align-items: center;
}

.swa-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #F3F4F6;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--swa-text);
}

.swa-filter-chip-x {
    cursor: pointer;
    color: var(--swa-text-muted);
    font-size: 10px;
    transition: color 120ms ease;
}

.swa-filter-chip-x:hover {
    color: var(--swa-danger);
}

.swa-filter-clear-all {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--swa-danger);
    cursor: pointer;
    padding: 4px 10px;
    transition: opacity 120ms ease;
}

.swa-filter-clear-all:hover {
    opacity: 0.7;
}

@media (max-width: 991.98px) {
    .swa-filter-row { flex-direction: column; }
    .swa-filter-group { flex-direction: column; }
    .swa-filter-select, .swa-filter-date { max-width: 100%; }
    .select2-container { width: 100% !important; }
}

/* ---- Daily log cards ---- */

.swa-log-card {
    background: var(--swa-surface);
    border: 1px solid var(--swa-border);
    margin-bottom: 16px;
}

.swa-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--swa-border);
}

.swa-log-employee {
    font-weight: 600;
    font-size: 14px;
    color: var(--swa-text);
}

.swa-log-date {
    font-size: 12px;
    color: var(--swa-text-muted);
}

.swa-log-body {
    padding: 16px 24px;
}

.swa-log-no-tasks {
    font-size: 14px;
    color: var(--swa-text-muted);
    font-style: italic;
}

.swa-log-project {
    padding: 10px 0;
    border-bottom: 1px solid #F3F4F6;
}

.swa-log-project:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.swa-log-project:first-child {
    padding-top: 0;
}

.swa-log-project-highlight {
    border-left: 3px solid var(--swa-primary);
    padding-left: 12px;
    background: #FAFAFA;
    margin-left: -1px;
}

.swa-log-project-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.swa-log-project-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--swa-text);
}

.swa-log-project-client {
    font-size: 12px;
    color: var(--swa-text-muted);
}

.swa-log-project-duration {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--swa-text);
    background: #F3F4F6;
    padding: 2px 8px;
    margin-left: auto;
}

.swa-log-project-desc {
    font-size: 13px;
    color: var(--swa-text-secondary);
    line-height: 1.5;
}

/* ---- Vertical Pagination Rail ---- */

.swa-vpag {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    width: 40px;
    z-index: 40;
}

.swa-vpag-btn {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 600;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--swa-border);
    background: var(--swa-surface);
    color: var(--swa-text);
    cursor: pointer;
    transition: all 120ms ease;
    padding: 0;
}

.swa-vpag-btn:hover:not([disabled]) {
    background: #F3F4F6;
    border-color: #C4C4C4;
}

.swa-vpag-btn.active {
    background: var(--swa-primary);
    color: #fff;
    border-color: var(--swa-primary);
}

.swa-vpag-btn[disabled] {
    opacity: 0.3;
    cursor: not-allowed;
}

.swa-vpag-btn i {
    font-size: 10px;
}

.swa-vpag-dots {
    font-size: 11px;
    color: var(--swa-text-muted);
    height: 20px;
    display: flex;
    align-items: center;
}

.swa-vpag-info {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--swa-text-muted);
    margin-top: 8px;
    text-align: center;
    line-height: 1.2;
}

@media (max-width: 991.98px) {
    .swa-vpag {
        position: static;
        flex-direction: row;
        width: auto;
        margin-left: 0;
        margin-top: 16px;
        justify-content: center;
    }
    .swa-vpag-info { margin-top: 0; margin-left: 12px; }
}

/* ---- Entity card grid (clients, projects, etc.) ---- */

.swa-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.swa-entity-card {
    background: var(--swa-surface);
    border: 1px solid var(--swa-border);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: border-color 150ms ease;
}

.swa-entity-card:hover {
    border-color: #C4C4C4;
}

.swa-entity-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--swa-text);
    margin-bottom: 4px;
}

.swa-entity-meta {
    font-size: 12px;
    color: var(--swa-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.swa-entity-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

@media (max-width: 991.98px) {
    .swa-card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575.98px) {
    .swa-card-grid { grid-template-columns: 1fr; }
}

/* ---- Employee Profile Details ---- */

.swa-profile-detail {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--swa-text-secondary);
    padding: 6px 0;
}

.swa-profile-detail i {
    color: var(--swa-text-muted);
    width: 14px;
    text-align: center;
    font-size: 12px;
    margin-top: 2px;
}

.swa-profile-detail a {
    color: var(--swa-text-secondary);
    word-break: break-all;
}

.swa-profile-action {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--swa-text-secondary);
    padding: 6px 0;
    text-decoration: none !important;
    transition: color 120ms ease;
}

.swa-profile-action:hover {
    color: var(--swa-primary);
}

.swa-profile-action i {
    width: 14px;
    text-align: center;
    font-size: 12px;
}

/* ---- GitHub-style Profile Layout ---- */

.swa-profile-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.swa-profile-sidebar {
    width: 296px;
    flex-shrink: 0;
}

.swa-profile-main {
    flex: 1;
    min-width: 0;
}

.swa-profile-avatar-wrap {
    margin-bottom: 16px;
}

.swa-profile-avatar-wrap .swa-avatar-circle {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1;
    font-size: 80px !important;
    border: 1px solid var(--swa-border);
}

.swa-profile-name {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2px;
}

.swa-profile-role {
    font-size: 14px;
    color: var(--swa-text-muted);
    margin-bottom: 8px;
    font-weight: 400;
}

.swa-profile-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--swa-text-muted);
    margin-bottom: 16px;
}

.swa-profile-actions {
    margin-bottom: 16px;
}

.swa-profile-details {
    border-top: 1px solid var(--swa-border);
    padding-top: 16px;
    margin-bottom: 16px;
}

.swa-profile-section {
    border-top: 1px solid var(--swa-border);
    padding-top: 16px;
}

.swa-profile-section-title {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.swa-profile-skillset {
    font-size: 13px;
    color: var(--swa-text-secondary);
    line-height: 1.6;
}

.swa-profile-skillset ul { padding-left: 18px; margin: 0; }
.swa-profile-skillset li { margin-bottom: 2px; }

/* Heatmap wrapper */
.swa-heatmap-header {
    margin-bottom: 12px;
}

.swa-heatmap-contributions {
    font-size: 14px;
    font-weight: 400;
    color: var(--swa-text-secondary);
}

.swa-heatmap-wrapper {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    min-width: 0;
}

.swa-heatmap-card {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--swa-border);
    background: var(--swa-surface);
    padding: 16px;
    overflow-x: auto;
    position: relative;
}

.swa-heatmap-years {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.swa-year-btn {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border: 1px solid var(--swa-border);
    background: var(--swa-surface);
    color: var(--swa-text-muted);
    cursor: pointer;
    text-align: right;
    transition: all 120ms ease;
}

.swa-year-btn:hover {
    color: var(--swa-text);
    border-color: #C4C4C4;
}

.swa-year-btn.active {
    background: var(--swa-primary);
    color: #fff;
    border-color: var(--swa-primary);
}

/* GitHub-style Heatmap grid */

.swa-hm-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.swa-hm-row {
    display: flex;
    gap: 4px;
    align-items: center;
}

.swa-hm-label {
    width: 32px;
    font-size: 11px;
    color: var(--swa-text-muted);
    text-align: right;
    padding-right: 6px;
    flex-shrink: 0;
}

.swa-hm-months .swa-hm-month {
    width: 15px;
    font-size: 11px;
    color: var(--swa-text-muted);
    min-width: 15px;
    overflow: visible;
    white-space: nowrap;
}

.swa-hm-cell {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    outline: 1px solid rgba(27, 31, 35, 0.06);
    outline-offset: -1px;
    border-radius: 2px !important;
}

.swa-hm-empty { background: transparent; outline: none; }
.swa-hm-level-0 { background: #EBEDF0; }
.swa-hm-level-1 { background: #9BE9A8; }
.swa-hm-level-2 { background: #40C463; }
.swa-hm-level-3 { background: #30A14E; }
.swa-hm-level-4 { background: #216E39; }
.swa-hm-level-leave { background: #FCA5A5; }

.swa-hm-cell[data-date]:hover {
    outline: 2px solid var(--swa-primary);
    outline-offset: -1px;
}

.swa-hm-legend {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
    margin-top: 12px;
    font-size: 11px;
    color: var(--swa-text-muted);
}

.swa-hm-legend .swa-hm-cell {
    cursor: default;
}

/* Heatmap tooltip */
.swa-heatmap-tooltip {
    display: none;
    position: fixed;
    z-index: 1000;
    background: #FFFFFF;
    color: #1B1B1B;
    font-size: 13px;
    padding: 14px 18px;
    line-height: 1.7;
    max-width: 450px;
    pointer-events: none;
    border-radius: 6px !important;
    border: 1px solid #E5E5E5;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.swa-heatmap-tooltip strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #1B1B1B;
}

@media (max-width: 991.98px) {
    .swa-profile-layout { flex-direction: column; }
    .swa-profile-sidebar { width: 100%; }
    .swa-profile-avatar-wrap .swa-avatar-circle { max-width: 200px; }
    .swa-heatmap-wrapper { flex-direction: column; }
}

/* ---- Leaves Calendar ---- */

.swa-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.swa-cal-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.swa-cal-nav-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--swa-border);
    background: var(--swa-surface);
    cursor: pointer;
    font-size: 14px;
    color: var(--swa-text);
    transition: all 120ms ease;
}

.swa-cal-nav-btn:hover {
    background: #F3F4F6;
}

.swa-cal-month-title {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 20px;
    font-weight: 700;
    min-width: 200px;
    text-align: center;
}

.swa-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    border-bottom: 2px solid var(--swa-border);
    margin-bottom: 0;
}

.swa-cal-weekdays > div {
    padding: 10px 0;
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--swa-text-muted);
}

.swa-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
}

.swa-cal-day {
    min-height: 100px;
    border: 1px solid #F3F4F6;
    border-top: none;
    padding: 8px;
    background: var(--swa-surface);
    position: relative;
    transition: background 100ms ease;
}

.swa-cal-day:hover {
    background: #FAFAFA;
}

.swa-cal-empty {
    background: transparent;
    border-color: transparent;
}

.swa-cal-empty:hover {
    background: transparent;
}

.swa-cal-weekend {
    background: #FAFAFA;
}

.swa-cal-weekend:hover {
    background: #F3F4F6;
}

.swa-cal-today {
    background: #FFFBEB;
    border-color: #FDE68A;
}

.swa-cal-today:hover {
    background: #FEF3C7;
}

.swa-cal-day-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--swa-text-muted);
    display: block;
    margin-bottom: 6px;
}

.swa-cal-today .swa-cal-day-num {
    color: var(--swa-primary);
    font-weight: 800;
}

.swa-cal-weekend .swa-cal-day-num {
    color: #D1D5DB;
}

.swa-cal-leaves {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.swa-cal-leave-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    cursor: pointer;
    transition: background 100ms ease;
    border-left: 3px solid;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.swa-cal-leave-bar:hover {
    background: rgba(0,0,0,0.04);
}

.swa-cal-leave-bar.status-approved {
    border-left-color: #16A34A;
    background: #F0FDF4;
}

.swa-cal-leave-bar.status-pending {
    border-left-color: #D97706;
    background: #FFFBEB;
}

.swa-cal-leave-bar.status-rejected {
    border-left-color: #DC2626;
    background: #FEF2F2;
}

.swa-cal-leave-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50% !important;
    overflow: hidden;
    background: #F3E8FF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.swa-cal-leave-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50% !important;
}

.swa-cal-leave-avatar-initial {
    font-size: 9px;
    font-weight: 700;
    color: #7C3AED;
}

.swa-cal-leave-name {
    font-weight: 600;
    color: var(--swa-text);
    overflow: hidden;
    text-overflow: ellipsis;
}

.swa-cal-more {
    font-size: 10px;
    font-weight: 600;
    color: var(--swa-text-muted);
    padding: 2px 0;
    cursor: pointer;
}

.swa-cal-more:hover {
    color: var(--swa-primary);
}

/* Leave detail panel rows */
.swa-leave-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #F3F4F6;
    font-size: 13px;
}

.swa-leave-detail-row:last-child {
    border-bottom: none;
}

.swa-leave-detail-label {
    font-weight: 600;
    color: var(--swa-text-muted);
    min-width: 80px;
}

/* Search leave result cards */
.swa-search-leave-card {
    border: 1px solid var(--swa-border);
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: border-color 120ms ease;
}

.swa-search-leave-card:hover {
    border-color: #C4C4C4;
}

.swa-cal-has-leaves .swa-cal-day-num {
    color: var(--swa-text);
}

/* Calendar skeleton */
.swa-cal-skeleton .swa-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
}

.swa-cal-skeleton .swa-cal-day {
    min-height: 100px;
    border: 1px solid #F3F4F6;
    padding: 8px;
    background: var(--swa-surface);
}

/* ---- Toast Notification ---- */

.swa-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    min-width: 320px;
    max-width: 480px;
    border: 1px solid var(--swa-border);
    border-left: 4px solid;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transition: all 300ms ease;
    animation: swa-toast-in 300ms ease;
}

@keyframes swa-toast-in {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ---- Bar Chart ---- */

.swa-bar-item {
    margin-bottom: 16px;
}

.swa-bar-label {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}

.swa-bar-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--swa-text);
}

.swa-bar-client {
    font-size: 11px;
    color: var(--swa-text-muted);
}

.swa-bar-track {
    height: 24px;
    background: #F3F4F6;
    width: 100%;
    margin-bottom: 4px;
}

.swa-bar-fill {
    height: 100%;
    transition: width 600ms ease;
    min-width: 4px;
}

.swa-bar-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--swa-text);
}

/* ---- Monthly Breakdown ---- */

.swa-monthly-group {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--swa-border);
}

.swa-monthly-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.swa-monthly-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.swa-monthly-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--swa-text);
}

.swa-monthly-total {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--swa-text-muted);
    background: #F3F4F6;
    padding: 2px 10px;
}

.swa-monthly-projects {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.swa-monthly-project {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 4px 0;
}

.swa-monthly-pname {
    color: var(--swa-text);
}

.swa-monthly-phours {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--swa-text);
    flex-shrink: 0;
    margin-left: 12px;
}

/* ---- OLD Heatmap (deprecated) ---- */

.swa-heatmap-months {
    display: flex;
    gap: 0;
    margin-bottom: 4px;
    font-size: 10px;
    color: var(--swa-text-muted);
    padding-left: 30px;
}

.swa-heatmap-month-label {
    min-width: 40px;
}

.swa-heatmap-grid {
    display: flex;
    gap: 0;
}

.swa-heatmap-days {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-right: 6px;
    width: 24px;
}

.swa-heatmap-day-label {
    height: 13px;
    font-size: 9px;
    color: var(--swa-text-muted);
    display: flex;
    align-items: center;
}

.swa-heatmap-weeks {
    display: flex;
    gap: 3px;
}

.swa-heatmap-week {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.swa-heatmap-cell {
    width: 13px;
    height: 13px;
    outline: 1px solid rgba(27, 31, 35, 0.04);
    outline-offset: -1px;
}

.swa-heatmap-level-0 { background: #EBEDF0; }
.swa-heatmap-level-1 { background: #9BE9A8; }
.swa-heatmap-level-2 { background: #40C463; }
.swa-heatmap-level-3 { background: #30A14E; }
.swa-heatmap-level-4 { background: #216E39; }

.swa-heatmap-legend {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
    margin-top: 12px;
    font-size: 10px;
    color: var(--swa-text-muted);
}

.swa-heatmap-legend .swa-heatmap-cell {
    cursor: default;
}

/* ---- Employee cards ---- */

.swa-emp-card {
    background: var(--swa-surface);
    border: 1px solid var(--swa-border);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: border-color 150ms ease;
}

.swa-emp-card:hover {
    border-color: #C4C4C4;
}

.swa-emp-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.swa-emp-info {
    flex: 1;
    min-width: 0;
}

.swa-emp-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--swa-text);
    margin-bottom: 2px;
}

.swa-emp-designation {
    font-size: 12px;
    color: var(--swa-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.swa-emp-status-line {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--swa-text-muted);
}

.swa-emp-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    padding-top: 16px;
    border-top: 1px solid #F3F4F6;
}

.swa-emp-detail {
    font-size: 13px;
    color: var(--swa-text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.swa-emp-detail i {
    color: var(--swa-text-muted);
    width: 14px;
    text-align: center;
    font-size: 12px;
}

.swa-emp-detail a {
    color: var(--swa-text-secondary);
}

.swa-emp-detail a:hover {
    color: var(--swa-primary);
}

.swa-emp-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

/* Neutralize Metronic wrapper classes inside views */
.menu-sub-dropdown { display: none !important; }
.post { display: block !important; }
#kt_content_container { max-width: 100% !important; padding: 0 !important; }
.container-xxl { max-width: 100% !important; padding: 0 !important; }
.card-xl-stretch { height: auto !important; }
.svg-icon svg { width: 18px; height: 18px; }
.svg-icon.svg-icon-2x svg { width: 24px; height: 24px; }
.symbol-label { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: #F3F4F6; font-weight: 600; }
.symbol { position: relative; display: inline-block; }
.symbol.symbol-50px { width: 50px; height: 50px; }
.symbol.symbol-lg-35 { width: 35px; height: 35px; }
.symbol.symbol-25 { width: 25px; height: 25px; }
.menu-link { display: block; padding: 8px 16px; color: var(--swa-text) !important; text-decoration: none !important; }
.menu-link:hover { background: #F3F4F6; }

/* ---- Hours Tracker ---- */

.swa-ht-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--swa-border);
}

.swa-ht-tab {
    padding: 12px 24px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: none;
    border: none;
    color: var(--swa-text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 120ms ease;
}

.swa-ht-tab:hover {
    color: var(--swa-text);
}

.swa-ht-tab.active {
    color: var(--swa-text);
    border-bottom-color: var(--swa-primary);
}

.swa-ht-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-bottom: 32px;
}

.swa-ht-metric {
    background: var(--swa-surface);
    border: 1px solid var(--swa-border);
    padding: 20px 24px;
    margin-left: -1px;
}

.swa-ht-metric:first-child {
    margin-left: 0;
}

.swa-ht-metric-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--swa-text-muted);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    margin-bottom: 6px;
}

.swa-ht-metric-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--swa-text);
    line-height: 1;
}

.swa-ht-change {
    font-size: 11px;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    margin-top: 6px;
}

.swa-ht-change.up { color: #16A34A; }
.swa-ht-change.down { color: #DC2626; }
.swa-ht-change.neutral { color: var(--swa-text-muted); }

.swa-ht-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.swa-ht-nav-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    min-width: 180px;
    text-align: center;
}

.swa-ht-project-card {
    background: var(--swa-surface);
    border: 1px solid var(--swa-border);
    padding: 24px;
    margin-bottom: 20px;
}

.swa-ht-project-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--swa-border);
}

.swa-ht-project-name {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: var(--swa-text);
}

.swa-ht-project-client {
    font-size: 12px;
    color: var(--swa-text-muted);
    margin-left: 8px;
}

.swa-ht-project-hours {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: var(--swa-text);
    flex-shrink: 0;
}

.swa-ht-tab-content {
    display: none;
}

.swa-ht-tab-content.active {
    display: block;
}

.swa-ht-section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--swa-text-muted);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--swa-border);
}

/* Vertical bar chart */
.swa-vbar-container {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    min-height: 280px;
    padding: 0 0 0 0;
    border-bottom: 2px solid var(--swa-border);
    overflow-x: auto;
    padding-bottom: 0;
}

.swa-vbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 0;
    min-width: 48px;
    max-width: 80px;
    cursor: default;
}

.swa-vbar-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--swa-text);
    margin-bottom: 4px;
    white-space: nowrap;
}

.swa-vbar-fill {
    width: 100%;
    min-height: 4px;
    transition: height 500ms ease;
}

.swa-vbar-labels {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-top: 10px;
}

.swa-vbar-label {
    flex: 1 1 0;
    min-width: 48px;
    max-width: 80px;
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--swa-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.2;
    word-break: break-word;
    padding: 0 2px;
}

.swa-vbar-wrapper {
    overflow-x: auto;
    margin-bottom: 32px;
}

.swa-vbar-wrapper::-webkit-scrollbar {
    height: 6px;
}

.swa-vbar-wrapper::-webkit-scrollbar-thumb {
    background: var(--swa-border);
}

/* ---- Activity Report Heatmap ---- */

.swa-activity-grid {
    overflow: auto;
    max-height: calc(100vh - 180px);
    border: 1px solid var(--swa-border);
    background: var(--swa-surface);
    padding-left: 8px;
}

.swa-activity-table {
    border-collapse: collapse;
    width: 100%;
    min-width: max-content;
}

.swa-activity-table th {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--swa-text-muted);
    padding: 6px 4px;
    text-align: center;
    white-space: nowrap;
    position: sticky;
    top: 0;
    background: var(--swa-surface);
    z-index: 1;
}

.swa-activity-table th:first-child {
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 3;
    background: var(--swa-surface);
    min-width: 160px;
    padding-left: 8px;
}

.swa-activity-table td {
    padding: 3px;
    vertical-align: middle;
}

.swa-activity-table td:first-child {
    position: sticky;
    left: 0;
    background: var(--swa-surface);
    z-index: 1;
    padding-right: 12px;
    padding-left: 8px;
}

.swa-activity-emp {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.swa-activity-emp-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--swa-text);
}

.swa-activity-cell {
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: outline 100ms ease;
    position: relative;
}

.swa-activity-cell:hover {
    outline: 2px solid var(--swa-primary);
    outline-offset: -1px;
    z-index: 1;
}

.swa-activity-cell.logged {
    background: #216E39;
}

.swa-activity-cell.missed {
    background: #FCA5A5;
}

.swa-activity-cell.no-tasks {
    background: #9BE9A8;
}

.swa-activity-cell.weekend {
    background: #F3F4F6;
    cursor: default;
}

.swa-activity-cell.weekend:hover {
    outline: none;
}

.swa-activity-cell.future {
    background: transparent;
    border: 1px dashed var(--swa-border);
    cursor: default;
}

.swa-activity-cell.future:hover {
    outline: none;
}

/* Summary columns */
.swa-activity-summary {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    padding: 6px 8px !important;
    white-space: nowrap;
}

.swa-activity-summary.submitted {
    color: #216E39;
}

.swa-activity-summary.missed {
    color: #DC2626;
}

/* Detail panel (tooltip-like popup on click) */
.swa-activity-detail {
    position: fixed;
    z-index: 1000;
    background: var(--swa-surface);
    border: 1px solid var(--swa-border);
    padding: 16px 20px;
    min-width: 280px;
    max-width: 380px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.swa-activity-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--swa-border);
}

.swa-activity-detail-date {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 700;
}

.swa-activity-detail-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--swa-text-muted);
    font-size: 14px;
    padding: 0;
}

.swa-activity-detail-close:hover {
    color: var(--swa-text);
}

.swa-activity-detail-item {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--swa-border);
}

.swa-activity-detail-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.swa-activity-detail-project {
    font-weight: 700;
    font-size: 13px;
    color: var(--swa-text);
    margin-bottom: 2px;
}

.swa-activity-detail-client {
    font-size: 11px;
    color: var(--swa-text-muted);
    margin-bottom: 6px;
}

.swa-activity-detail-duration {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--swa-text);
    margin-bottom: 4px;
}

.swa-activity-detail-desc {
    font-size: 12px;
    color: var(--swa-text-muted);
    line-height: 1.4;
}

/* Legend */
.swa-activity-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--swa-border);
}

.swa-activity-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--swa-text-muted);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
}

.swa-activity-legend-swatch {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ============================================================
   Auth pages (login, register, password reset)
   ============================================================ */

.swa-auth-body {
    background: var(--swa-bg) !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background-image:
        linear-gradient(var(--swa-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--swa-border) 1px, transparent 1px);
    background-size: 48px 48px;
    background-position: -1px -1px;
}

.swa-auth-shell {
    width: 100%;
    max-width: 440px;
}

.swa-auth-shell-wide {
    max-width: 720px;
}

.swa-auth-card {
    background: var(--swa-surface);
    border: 1px solid var(--swa-border);
    padding: 48px 40px;
    box-shadow: 0 1px 0 var(--swa-border), 0 24px 48px -24px rgba(0,0,0,0.12);
}

.swa-auth-brand {
    display: inline-flex;
    align-items: center;
    margin-bottom: 32px;
    text-decoration: none !important;
}

.swa-auth-brand-logo {
    height: 20px;
    object-fit: contain;
}

.swa-auth-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    color: var(--swa-text);
}

.swa-auth-subheading {
    font-size: 13px;
    color: var(--swa-text-muted);
    margin-bottom: 28px;
}

.swa-auth-field {
    margin-bottom: 16px;
}

.swa-auth-label {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--swa-text-muted);
    margin-bottom: 6px;
}

.swa-auth-input {
    width: 100%;
    background: var(--swa-surface) !important;
    border: 1px solid var(--swa-border) !important;
    border-radius: 0 !important;
    padding: 12px 14px !important;
    font-size: 14px !important;
    color: var(--swa-text) !important;
    transition: border-color 120ms ease;
}

.swa-auth-input:focus {
    border-color: var(--swa-primary) !important;
    box-shadow: none !important;
    outline: none;
}

.swa-auth-input.is-invalid {
    border-color: var(--swa-danger) !important;
}

.swa-auth-error {
    display: block;
    font-size: 12px;
    color: var(--swa-danger);
    margin-top: 6px;
}

.swa-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
}

.swa-auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--swa-text-secondary);
    cursor: pointer;
}

.swa-auth-check input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--swa-primary);
    cursor: pointer;
}

.swa-auth-link {
    font-size: 13px;
    color: var(--swa-text);
    text-decoration: none !important;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 120ms ease;
}

.swa-auth-link:hover {
    border-bottom-color: var(--swa-primary);
    color: var(--swa-primary);
}

.swa-auth-submit {
    width: 100%;
    background: var(--swa-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 14px 16px !important;
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: background 120ms ease;
}

.swa-auth-submit:hover {
    background: var(--swa-primary-hover) !important;
}

.swa-auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.swa-auth-alert {
    background: #FEF2F2;
    border-left: 3px solid var(--swa-danger);
    color: var(--swa-danger);
    font-size: 13px;
    padding: 10px 14px;
    margin-bottom: 20px;
}

.swa-auth-alert-success {
    background: #F0FDF4;
    border-left: 3px solid var(--swa-success);
    color: #166534;
    font-size: 13px;
    padding: 10px 14px;
    margin-bottom: 20px;
}

.swa-auth-actions {
    display: flex;
    gap: 10px;
}

.swa-auth-submit-secondary {
    flex: 1;
    background: var(--swa-surface) !important;
    color: var(--swa-text) !important;
    border: 1px solid var(--swa-border) !important;
    border-radius: 0 !important;
    padding: 14px 16px !important;
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none !important;
    text-align: center;
    cursor: pointer;
    transition: background 120ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swa-auth-submit-secondary:hover {
    background: #F3F4F6 !important;
    color: var(--swa-text) !important;
}

.swa-auth-hint {
    font-size: 12px;
    color: var(--swa-text-muted);
    margin-top: -8px;
    margin-bottom: 16px;
}

.swa-auth-meta {
    text-align: center;
    font-size: 13px;
    color: var(--swa-text-secondary);
    margin-top: 20px;
}

.swa-auth-meta a {
    color: var(--swa-text);
    font-weight: 500;
    border-bottom: 1px solid transparent;
}
.swa-auth-meta a:hover {
    border-bottom-color: var(--swa-primary);
}

.swa-auth-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--swa-border);
    font-size: 11px;
    color: var(--swa-text-muted);
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 0.05em;
}

@media (max-width: 480px) {
    .swa-auth-card {
        padding: 32px 24px;
    }
}

/* ============================================================
   Desktop notifications toggle (header dropdown)
   ============================================================ */
.swa-push-status {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 2px 8px;
    background: var(--swa-surface-alt);
    color: var(--swa-text-muted);
    border-radius: 0;
}
.swa-push-status.on { background: var(--swa-success); color: #fff; }
.swa-push-status.blocked { background: var(--swa-danger); color: #fff; }
.swa-push-status.unsupported { background: var(--swa-text-muted); color: #fff; }

#swa-push-toggle { cursor: pointer; }
#swa-push-toggle:disabled { cursor: not-allowed; opacity: 0.6; }

/* ============================================================
   Announcements module
   ============================================================ */

/* Auto-show modal — large 80% × 80% viewer */
.swa-announcement-modal-dialog {
    max-width: 80vw;
    margin: 10vh auto;
}
.swa-announcement-modal-dialog .modal-content {
    height: 80vh;
    border-radius: 0;
    border: 1px solid var(--swa-border);
    display: flex;
    flex-direction: column;
}
.swa-announcement-modal-dialog .modal-header {
    padding: 20px 32px;
    flex-shrink: 0;
}
.swa-announcement-modal-dialog .modal-body {
    overflow-y: auto;
    padding: 32px 40px;
    line-height: 1.7;
    flex: 1;
}
.swa-announcement-modal-dialog .modal-body h1,
.swa-announcement-modal-dialog .modal-body h2,
.swa-announcement-modal-dialog .modal-body h3,
.swa-announcement-modal-dialog .modal-body h4 {
    font-family: 'Space Grotesk', sans-serif !important;
    margin: 20px 0 10px;
    letter-spacing: -0.01em;
}
.swa-announcement-modal-dialog .modal-body h1 { font-size: 28px; }
.swa-announcement-modal-dialog .modal-body h2 { font-size: 22px; }
.swa-announcement-modal-dialog .modal-body h3 { font-size: 18px; }
.swa-announcement-modal-dialog .modal-body p { margin: 0 0 12px; }
.swa-announcement-modal-dialog .modal-body ul,
.swa-announcement-modal-dialog .modal-body ol { margin: 0 0 12px 20px; }
.swa-announcement-modal-dialog .modal-body img { max-width: 100%; height: auto; }
.swa-announcement-modal-dialog .modal-body a { color: var(--swa-primary); text-decoration: underline; }
.swa-announcement-modal-dialog .modal-body table {
    border-collapse: collapse;
    margin: 12px 0;
    width: 100%;
}
.swa-announcement-modal-dialog .modal-body th,
.swa-announcement-modal-dialog .modal-body td {
    border: 1px solid var(--swa-border);
    padding: 8px 12px;
}
.swa-announcement-modal-dialog .modal-body blockquote {
    border-left: 4px solid var(--swa-border);
    padding: 4px 16px;
    margin: 12px 0;
    color: var(--swa-text-secondary);
}
.swa-announcement-modal-dialog .modal-footer {
    padding: 16px 32px;
    flex-shrink: 0;
}

/* Index list status pills */
.swa-ann-status {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 3px 10px;
}
.swa-ann-status.draft { background: var(--swa-surface-alt); color: var(--swa-text-muted); }
.swa-ann-status.published { background: var(--swa-success); color: #fff; }

/* CKEditor — match SWA brutalist aesthetic */
.ck-editor__editable_inline {
    min-height: 320px !important;
    border-radius: 0 !important;
}
.ck.ck-editor { border-radius: 0; }
.ck.ck-toolbar { border-radius: 0 !important; }

/* ============================================================
   Mobile responsive — Header + Daily Logs page
   Breakpoint: phones only (max-width: 768px)
   ============================================================ */

/* --- Compact header on phones --- */
@media (max-width: 768px) {
    .swa-header {
        padding: 0 12px;
        gap: 8px;
        z-index: 60;
    }
    .swa-header-title {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
        min-width: 0;
    }
    .swa-header-user {
        padding-left: 0;
        border-left: none;
        gap: 0;
    }
    .swa-header-user-info { display: none !important; }
    .swa-header-right { gap: 0; }
}

/* --- Daily Logs: desktop content reserves space for the fixed vpag rail --- */
.swa-dl-content-wrap { padding-right: 56px; }

/* --- Daily Logs: filter row hides toggle on desktop --- */
.swa-filter-mobile-toggle { display: none; }
.swa-filter-mobile-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--swa-primary);
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
}

/* --- Phones: collapsible filter panel + stacked layout --- */
@media (max-width: 768px) {
    /* Remove desktop right-padding for vpag rail */
    .swa-dl-content-wrap { padding-right: 0 !important; }

    /* Filter row: stack as a column */
    .swa-filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 20px;
    }

    /* Show the mobile filter toggle */
    .swa-filter-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 12px 16px;
        background: var(--swa-surface);
        border: 1px solid var(--swa-border);
        font-family: 'Space Grotesk', sans-serif;
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--swa-text);
        cursor: pointer;
        border-radius: 0;
    }
    .swa-filter-mobile-toggle:hover { border-color: var(--swa-primary); }

    /* Filter group hidden by default; shown when row has .open */
    .swa-filter-group {
        display: none !important;
        flex-direction: column !important;
        gap: 10px;
        padding: 14px;
        background: var(--swa-surface);
        border: 1px solid var(--swa-border);
        border-top: none;
        margin-top: -10px;
    }
    .swa-filter-row.open .swa-filter-group { display: flex !important; }

    /* All filter inputs full-width inside the panel */
    .swa-filter-group .swa-multiselect,
    .swa-filter-group .swa-filter-date {
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    .swa-filter-group .swa-ms-trigger { width: 100%; }
    .swa-filter-group .swa-ms-dropdown { left: 0; right: 0; min-width: 0; }

    /* New Log button full-width on phones */
    .swa-filter-row-cta {
        width: 100%;
        justify-content: center;
        padding: 12px 16px !important;
    }

    /* --- Daily log cards: stack header + project rows --- */
    .swa-log-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px 16px;
    }
    .swa-log-header > * { width: 100%; }
    .swa-log-body { padding: 14px 16px; }

    /* Project row: name on top, client+duration on row 2, desc below */
    .swa-log-project-header {
        flex-wrap: wrap;
        gap: 6px 12px;
    }
    .swa-log-project-name {
        flex: 1 1 100%;
        word-break: break-word;
    }
    .swa-log-project-client { font-size: 11px; }
    .swa-log-project-duration {
        margin-left: auto;
        font-size: 11px;
    }

    /* Active filter chips wrap better */
    .swa-active-filters { flex-wrap: wrap; gap: 6px; }
}

/* ============================================================
   Leaves — Mobile agenda list view
   ============================================================ */

/* Mobile agenda + its skeleton + empty state are all hidden by default */
.swa-cal-agenda,
.swa-cal-agenda-empty,
.swa-cal-agenda-skeleton { display: none; }

.swa-cal-agenda-day {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    background: var(--swa-surface);
    border: 1px solid var(--swa-border);
    margin-bottom: 10px;
    align-items: stretch;
}

.swa-cal-agenda-date {
    flex-shrink: 0;
    width: 56px;
    text-align: center;
    border-right: 1px solid var(--swa-border);
    padding-right: 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.swa-cal-agenda-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    color: var(--swa-text);
}

.swa-cal-agenda-meta { margin-top: 4px; }

.swa-cal-agenda-weekday {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--swa-text-muted);
}

.swa-cal-agenda-month {
    font-size: 10px;
    color: var(--swa-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 1px;
}

.swa-cal-agenda-leaves {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.swa-cal-agenda-leaves .swa-cal-leave-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
}

.swa-cal-agenda-status {
    margin-left: auto;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--swa-text-muted);
    white-space: nowrap;
}

.swa-cal-agenda-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--swa-text-muted);
}
.swa-cal-agenda-empty i {
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
}
.swa-cal-agenda-empty p { font-size: 14px; margin: 0; }

/* --- Below 768px: swap calendar grid → agenda list --- */
@media (max-width: 768px) {
    /* Always hide the desktop grid + skeleton on phones */
    #cal-container,
    #cal-skeleton { display: none !important; }

    /* Show the mobile skeleton while loading */
    #cal-agenda-skeleton.is-loading { display: block; }

    /* Show the agenda once loaded (whether populated or not) */
    #cal-agenda.is-loaded { display: block; }

    /* Show the empty-state placeholder only when there's no data */
    #cal-agenda-empty.is-empty { display: block; }

    /* Header: stack nav + actions on two rows */
    .swa-cal-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .swa-cal-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    .swa-cal-month-title { font-size: 18px; }
    .swa-cal-header > div:last-child {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .swa-cal-header .btn {
        width: 100%;
        justify-content: center;
    }
}
