/* =============================================================================
   HARMONI ERP — Main Design System
   A professional HR-module interface inspired by Odoo, BUK, and SAP SuccessFactors
   ============================================================================= */

/* =============================================================================
   0. GOOGLE FONTS
   ============================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* =============================================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================================= */
:root {
    /* Layout */
    --sidebar-width: 260px;
    --topbar-height: 60px;

    /* Sidebar palette — Teal Harmoni */
    --sidebar-bg: #0d2b27;
    --sidebar-text: #7fb3ae;
    --sidebar-text-hover: #e0f7f5;
    --sidebar-active-bg: #134e4a;
    --sidebar-active-text: #ffffff;
    --sidebar-active-accent: #5eead4;
    --sidebar-section-title: #4a8c86;

    /* Surfaces */
    --content-bg: #f0fafa;
    --topbar-bg: #ffffff;

    /* Brand / semantic */
    --primary: #0f766e;
    --primary-hover: #0d6660;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #14b8a6;

    /* Typography */
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    /* Borders & shadows */
    --border-color: #e2e8f0;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* =============================================================================
   2. RESET & BASE
   ============================================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    color-scheme: light;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--content-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--primary-hover);
}

::selection {
    background-color: rgba(15, 118, 110, 0.15);
    color: var(--text-primary);
}

/* =============================================================================
   3. LAYOUT — .harmoni-wrapper
   ============================================================================= */
.harmoni-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* =============================================================================
   4. SIDEBAR — .harmoni-sidebar
   ============================================================================= */
.harmoni-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    z-index: 1050;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* ---- Sidebar header (brand) ---- */
.sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.sidebar-header a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.sidebar-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar-brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.sidebar-brand-subtitle {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 1px;
}

/* ---- Sidebar body (scrollable nav) ---- */
.sidebar-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem 0;
}

/* Custom scrollbar for sidebar */
.sidebar-body::-webkit-scrollbar {
    width: 4px;
}

.sidebar-body::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.sidebar-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Firefox scrollbar */
.sidebar-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* ---- Navigation sections ---- */
/* ════════════════════════════════════════════
   SIDEBAR CATEGORY TABS
   ════════════════════════════════════════════ */
.sidebar-tabs {
    display: flex;
    flex-shrink: 0;
    padding: 0 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    gap: 2px;
    background: rgba(0, 0, 0, 0.12);
}

.sidebar-tab {
    flex: 1;
    padding: 0.52rem 0.15rem 0.48rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--sidebar-section-title);
    font-size: 0.57rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.22rem;
    transition: color 0.15s ease, border-color 0.15s ease;
    line-height: 1;
    margin-bottom: -1px;
    white-space: nowrap;
}

.sidebar-tab i {
    font-size: 0.9rem;
    opacity: 0.75;
    transition: opacity 0.15s;
}

.sidebar-tab:hover {
    color: var(--sidebar-text-hover);
}

.sidebar-tab:hover i {
    opacity: 1;
}

.sidebar-tab.active {
    color: var(--sidebar-accent);
    border-bottom-color: var(--sidebar-accent);
}

.sidebar-tab.active i {
    opacity: 1;
}

/* Hide sections not in active group */
.nav-section[data-group] {
    display: none;
}

.nav-section[data-group].group-visible {
    display: block;
}

/* ════════════════════════════════════════════ */
.nav-section {
    margin-bottom: 0.25rem;
}

/* ---- Section toggle (collapsible header) ---- */
.nav-section-toggle {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.65rem 1.25rem 0.35rem;
    background: none;
    border: none;
    color: var(--sidebar-section-title);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.15s ease;
    line-height: 1;
    user-select: none;
}

.nav-section-toggle:hover {
    color: var(--sidebar-accent);
}

.nav-section-toggle .section-icon {
    font-size: 0.72rem;
    opacity: 0.65;
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}

.nav-section-toggle .toggle-chevron {
    font-size: 0.52rem;
    margin-left: auto;
    flex-shrink: 0;
    opacity: 0.5;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-section-toggle.is-open .toggle-chevron {
    transform: rotate(90deg);
}

/* ---- Section body (collapsible items container) ---- */
.nav-section-body {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-section-body.is-open {
    max-height: 1200px;
}

/* Legacy: keep nav-section-title for non-collapsible use */
.nav-section-title {
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--sidebar-section-title);
    padding: 0.75rem 1.5rem 0.4rem;
    line-height: 1;
    user-select: none;
    display: block;
}

/* ---- Nav items ---- */
.nav-item {
    display: flex;
    align-items: center;
    padding: 0.55rem 1.5rem;
    font-size: 0.875rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background-color 0.15s ease,
                color 0.15s ease,
                border-color 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--sidebar-text-hover);
    text-decoration: none;
}

.nav-item.active {
    color: var(--sidebar-active-text);
    background-color: var(--sidebar-active-bg);
    border-left-color: var(--sidebar-active-accent);
    font-weight: 500;
}

.nav-item i {
    width: 20px;
    margin-right: 0.75rem;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
    opacity: 0.8;
}

.nav-item.active i {
    opacity: 1;
}

.nav-item .badge {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 0.2em 0.55em;
    border-radius: 6px;
    font-weight: 500;
    line-height: 1;
}

/* ---- Sidebar footer (user card) ---- */
.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.75rem 1rem;
    flex-shrink: 0;
}

.user-card-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--sidebar-text);
    transition: background-color 0.15s ease;
}

.user-card-link:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--sidebar-text);
    text-decoration: none;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--sidebar-text-hover);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* =============================================================================
   5. MAIN AREA — .harmoni-main
   ============================================================================= */
.harmoni-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

/* =============================================================================
   6. TOPBAR — .harmoni-topbar
   ============================================================================= */
.harmoni-topbar {
    height: var(--topbar-height);
    background-color: var(--topbar-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1040;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-primary);
    padding: 0.25rem 0.5rem;
    margin-right: 0.75rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.15s ease;
    line-height: 1;
}

.sidebar-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.topbar-title {
    flex: 1;
    min-width: 0;
}

.topbar-title h1 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-title p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.3;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.topbar-actions .btn {
    font-size: 0.85rem;
}

.topbar-notification {
    position: relative;
    display: inline-flex;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--danger);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid var(--topbar-bg);
}

/* --- Global Search --- */
.global-search {
    position: relative;
    max-width: 360px;
    width: 100%;
    margin: 0 1rem;
}

.global-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.global-search-icon {
    position: absolute;
    left: 10px;
    font-size: .8rem;
    color: var(--text-secondary);
    pointer-events: none;
    z-index: 2;
}

.global-search-input {
    width: 100%;
    padding: 6px 60px 6px 32px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: .82rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.global-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, .12);
    background: #fff;
}

.global-search-input::placeholder {
    color: #9ca3af;
    font-size: .78rem;
}

.global-search-kbd {
    position: absolute;
    right: 8px;
    font-size: .6rem;
    padding: 1px 5px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #f9fafb;
    color: #6b7280;
    font-family: inherit;
    pointer-events: none;
}

.global-search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1060;
}

.gs-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    text-decoration: none;
    color: var(--text-primary);
    border-bottom: 1px solid #f3f4f6;
    transition: background .1s;
}

.gs-item:hover, .gs-item.gs-active {
    background: #f0fdf9;
    color: var(--text-primary);
    text-decoration: none;
}

.gs-item:last-child { border-bottom: none; }

.gs-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    color: #fff;
    flex-shrink: 0;
}

.gs-info { flex: 1; min-width: 0; }
.gs-title { font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-detail { font-size: .7rem; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.gs-empty {
    padding: 20px 14px;
    text-align: center;
    color: #9ca3af;
    font-size: .82rem;
}

.gs-hint {
    padding: 6px 14px;
    font-size: .68rem;
    color: #9ca3af;
    border-top: 1px solid #f3f4f6;
    text-align: center;
}

.gs-ver-todos {
    padding: 8px 14px;
    text-align: center;
}
.gs-ver-todos a {
    font-size: .75rem;
    color: #6b7280;
    text-decoration: none;
    transition: color .15s;
}
.gs-ver-todos a:hover {
    color: #0f766e;
    text-decoration: underline;
}

/* --- User Menu (topbar) --- */
.topbar-user-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 4px 8px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    color: var(--text-primary);
}

.topbar-user-btn:hover {
    background: rgba(0,0,0,.04);
    border-color: var(--border-color);
}

.topbar-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
}

.topbar-username {
    font-size: .82rem;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =============================================================================
   7. CONTENT AREA — .harmoni-content
   ============================================================================= */
.harmoni-content {
    flex: 1;
    padding: 1.5rem;
    background-color: var(--content-bg);
}

/* =============================================================================
   8. SIDEBAR OVERLAY (mobile)
   ============================================================================= */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1045;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* =============================================================================
   9. STAT CARDS
   ============================================================================= */
.stat-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    line-height: 1.3;
}

.stat-card .stat-change {
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.stat-card .stat-change.up {
    color: var(--success);
}

.stat-card .stat-change.down {
    color: var(--danger);
}

/* Stat card color variants */
.stat-card--primary .stat-icon {
    background-color: rgba(15, 118, 110, 0.1);
    color: var(--primary);
}

.stat-card--success .stat-icon {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-card--warning .stat-icon {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-card--danger .stat-icon {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.stat-card--info .stat-icon {
    background-color: rgba(6, 182, 212, 0.1);
    color: var(--info);
}

/* =============================================================================
   10. DASHBOARD CARDS
   ============================================================================= */
.dash-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    border: 1px solid var(--border-color);
    height: 100%;
}

.dash-card-header {
    padding: 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-primary);
    background-color: #ffffff;
}

.dash-card-header .btn-sm {
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
}

.dash-card-body {
    padding: 1.25rem;
}

.dash-card-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background-color: #fafbfc;
    font-size: 0.85rem;
}

/* =============================================================================
   11. ACTION BUTTONS
   ============================================================================= */
.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border-radius: 12px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
    color: var(--text-primary);
    cursor: pointer;
    border: none;
    background: transparent;
}

.action-btn:hover {
    background-color: #f1f5f9;
    transform: translateY(-2px);
    color: var(--text-primary);
    text-decoration: none;
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn .action-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    transition: transform 0.2s ease;
}

.action-btn:hover .action-icon {
    transform: scale(1.05);
}

.action-btn .action-text {
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
}

/* Action button color variants */
.action-btn--primary .action-icon {
    background-color: rgba(15, 118, 110, 0.1);
    color: var(--primary);
}

.action-btn--success .action-icon {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.action-btn--warning .action-icon {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.action-btn--danger .action-icon {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.action-btn--info .action-icon {
    background-color: rgba(6, 182, 212, 0.1);
    color: var(--info);
}

/* =============================================================================
   12. LOGIN / AUTH PAGE
   ============================================================================= */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ccfbf1 0%, #d1fae5 50%, #e0f7f5 100%);
    padding: 1rem;
}

.auth-card {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
    padding: 2.5rem;
    max-width: 420px;
    width: 100%;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo .logo-mark {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background-color: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto;
}

.auth-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 1rem 0 0;
}

.auth-logo p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0;
}

/* Auth form */
.auth-form .form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.auth-form .form-control {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
    outline: none;
}

.auth-form .form-control::placeholder {
    color: var(--text-muted);
}

.auth-form .btn-primary {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    background-color: var(--primary);
    color: #ffffff;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-form .btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}

.auth-form .btn-primary:active {
    transform: scale(0.99);
}

.auth-form .form-check-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.auth-form .input-group-text {
    background-color: #f8fafc;
    border-color: var(--border-color);
    color: var(--text-muted);
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
}

.auth-links a {
    color: var(--primary);
    font-weight: 500;
}

.auth-links a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--border-color);
}

.auth-divider::before {
    margin-right: 0.75rem;
}

.auth-divider::after {
    margin-left: 0.75rem;
}

/* =============================================================================
   13. BOOTSTRAP OVERRIDES — Cards
   ============================================================================= */
.card {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.2s ease;
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background-color: #fafbfc;
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 1.25rem;
}

/* =============================================================================
   14. BOOTSTRAP OVERRIDES — Buttons
   ============================================================================= */
.btn {
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    transition: all 0.15s ease;
    line-height: 1.5;
}

.btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.25);
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #ffffff;
}

.btn-primary:active {
    background-color: #0a5c56;
    border-color: #0a5c56;
}

.btn-success {
    background-color: var(--success);
    border-color: var(--success);
    color: #ffffff;
}

.btn-success:hover,
.btn-success:focus {
    background-color: #059669;
    border-color: #059669;
    color: #ffffff;
}

.btn-danger {
    background-color: var(--danger);
    border-color: var(--danger);
    color: #ffffff;
}

.btn-danger:hover,
.btn-danger:focus {
    background-color: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
}

.btn-warning {
    background-color: var(--warning);
    border-color: var(--warning);
    color: #ffffff;
}

.btn-warning:hover,
.btn-warning:focus {
    background-color: #d97706;
    border-color: #d97706;
    color: #ffffff;
}

.btn-info {
    background-color: var(--info);
    border-color: var(--info);
    color: #ffffff;
}

.btn-info:hover,
.btn-info:focus {
    background-color: #0891b2;
    border-color: #0891b2;
    color: #ffffff;
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.btn-outline-secondary {
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-outline-secondary:hover {
    background-color: #f1f5f9;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-light {
    background-color: #f1f5f9;
    border-color: #f1f5f9;
    color: var(--text-primary);
}

.btn-light:hover {
    background-color: #e2e8f0;
    border-color: #e2e8f0;
    color: var(--text-primary);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-lg {
    padding: 0.65rem 1.5rem;
    font-size: 1rem;
    border-radius: 10px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
}

.btn-icon.btn-sm {
    width: 30px;
    height: 30px;
    border-radius: 6px;
}

/* =============================================================================
   15. BOOTSTRAP OVERRIDES — Badges
   ============================================================================= */
.badge {
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.3em 0.65em;
    letter-spacing: 0.01em;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.35rem;
    vertical-align: middle;
}

.badge-dot--success {
    background-color: var(--success);
}

.badge-dot--danger {
    background-color: var(--danger);
}

.badge-dot--warning {
    background-color: var(--warning);
}

.badge-dot--primary {
    background-color: var(--primary);
}

/* =============================================================================
   16. BOOTSTRAP OVERRIDES — Tables
   ============================================================================= */
.table {
    margin-bottom: 0;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.table thead th {
    background-color: #f8fafc;
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.02);
}

.table-responsive {
    border-radius: 12px;
    overflow: hidden;
}

/* =============================================================================
   17. BOOTSTRAP OVERRIDES — Forms
   ============================================================================= */
.form-control,
.form-select {
    border-radius: 8px;
    border-color: var(--border-color);
    font-size: 0.9rem;
    padding: 0.5rem 0.875rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    color: var(--text-primary);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.form-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.input-group-text {
    border-radius: 8px;
    border-color: var(--border-color);
    background-color: #f8fafc;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    border-color: var(--primary);
}

.form-switch .form-check-input {
    border-radius: 999px;
}

/* =============================================================================
   18. BOOTSTRAP OVERRIDES — Alerts
   ============================================================================= */
.alert {
    border-radius: 10px;
    border: none;
    border-left: 4px solid transparent;
    font-size: 0.875rem;
    padding: 1rem 1.25rem;
}

.alert-primary {
    background-color: rgba(59, 130, 246, 0.08);
    color: #1e40af;
    border-left-color: var(--primary);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.08);
    color: #065f46;
    border-left-color: var(--success);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.08);
    color: #92400e;
    border-left-color: var(--warning);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.08);
    color: #991b1b;
    border-left-color: var(--danger);
}

.alert-info {
    background-color: rgba(6, 182, 212, 0.08);
    color: #155e75;
    border-left-color: var(--info);
}

/* =============================================================================
   19. BOOTSTRAP OVERRIDES — Modals
   ============================================================================= */
.modal-content {
    border-radius: 14px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    font-size: 1.05rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

/* =============================================================================
   20. BOOTSTRAP OVERRIDES — Dropdowns
   ============================================================================= */
.dropdown-menu {
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 0.35rem;
    font-size: 0.875rem;
}

.dropdown-item {
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: background-color 0.1s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #f1f5f9;
    color: var(--text-primary);
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: rgba(59, 130, 246, 0.08);
    color: var(--primary);
}

.dropdown-divider {
    border-color: var(--border-color);
    margin: 0.25rem 0;
}

/* =============================================================================
   21. BOOTSTRAP OVERRIDES — Pagination
   ============================================================================= */
.pagination {
    gap: 0.25rem;
}

.page-link {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    transition: all 0.15s ease;
}

.page-link:hover {
    background-color: #f1f5f9;
    border-color: var(--border-color);
    color: var(--primary);
}

.page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.page-item.disabled .page-link {
    color: var(--text-muted);
    background-color: transparent;
}

/* =============================================================================
   22. BOOTSTRAP OVERRIDES — Breadcrumb
   ============================================================================= */
.breadcrumb {
    font-size: 0.85rem;
    margin-bottom: 1rem;
    padding: 0;
    background: transparent;
}

.breadcrumb-item a {
    color: var(--text-secondary);
}

.breadcrumb-item a:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
}

/* =============================================================================
   23. BOOTSTRAP OVERRIDES — Navs / Tabs
   ============================================================================= */
.nav-tabs {
    border-bottom: 2px solid var(--border-color);
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.65rem 1rem;
    margin-bottom: -2px;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-tabs .nav-link:hover {
    color: var(--text-primary);
    border-bottom-color: #cbd5e1;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: transparent;
}

.nav-pills .nav-link {
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
}

.nav-pills .nav-link.active {
    background-color: var(--primary);
    color: #ffffff;
}

/* =============================================================================
   24. UTILITY — Activity / Timeline
   ============================================================================= */
.activity-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-text {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* =============================================================================
   25. UTILITY — Employee List Items
   ============================================================================= */
.employee-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border-color);
}

.employee-item:last-child {
    border-bottom: none;
}

.employee-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.employee-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.employee-info {
    flex: 1;
    min-width: 0;
}

.employee-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employee-position {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* =============================================================================
   26. UTILITY — Status badges
   ============================================================================= */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25em 0.65em;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
}

.status-badge--active {
    background-color: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.status-badge--inactive {
    background-color: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.status-badge--pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.status-badge--draft {
    background-color: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
}

.status-badge--info {
    background-color: rgba(6, 182, 212, 0.1);
    color: #0891b2;
}

/* =============================================================================
   27. UTILITY — Empty states
   ============================================================================= */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    max-width: 360px;
    margin: 0 auto 1.5rem;
}

/* =============================================================================
   28. UTILITY — Data labels (key-value pairs)
   ============================================================================= */
.data-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.15rem;
}

.data-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 400;
}

/* =============================================================================
   29. UTILITY — Quick-access shortcut grid
   ============================================================================= */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
}

/* =============================================================================
   30. UTILITY — Progress bars
   ============================================================================= */
.progress {
    height: 6px;
    border-radius: 999px;
    background-color: #e2e8f0;
    overflow: hidden;
}

.progress-bar {
    border-radius: 999px;
    transition: width 0.4s ease;
}

.progress-sm {
    height: 4px;
}

.progress-lg {
    height: 10px;
}

/* =============================================================================
   31. UTILITY — Tooltip & Popover refinements
   ============================================================================= */
.tooltip-inner {
    border-radius: 6px;
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
}

.popover {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* =============================================================================
   32. UTILITY — Section headers inside content
   ============================================================================= */
.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.section-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* =============================================================================
   33. UTILITY — Text helpers
   ============================================================================= */
.text-primary-custom {
    color: var(--primary) !important;
}

.text-success-custom {
    color: var(--success) !important;
}

.text-warning-custom {
    color: var(--warning) !important;
}

.text-danger-custom {
    color: var(--danger) !important;
}

.text-info-custom {
    color: var(--info) !important;
}

.text-muted-custom {
    color: var(--text-muted) !important;
}

.fw-500 {
    font-weight: 500 !important;
}

.fs-sm {
    font-size: 0.85rem !important;
}

.fs-xs {
    font-size: 0.75rem !important;
}

/* =============================================================================
   34. UTILITY — Background helpers
   ============================================================================= */
.bg-primary-soft {
    background-color: rgba(59, 130, 246, 0.08) !important;
}

.bg-success-soft {
    background-color: rgba(16, 185, 129, 0.08) !important;
}

.bg-warning-soft {
    background-color: rgba(245, 158, 11, 0.08) !important;
}

.bg-danger-soft {
    background-color: rgba(239, 68, 68, 0.08) !important;
}

.bg-info-soft {
    background-color: rgba(6, 182, 212, 0.08) !important;
}

/* =============================================================================
   35. ANIMATIONS & TRANSITIONS
   ============================================================================= */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-16px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.35s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.3s ease-out;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.loading-spinner--lg {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

/* =============================================================================
   36. RESPONSIVE — Tablet & below (max-width: 991.98px)
   ============================================================================= */
@media (max-width: 991.98px) {
    .harmoni-sidebar {
        transform: translateX(-100%);
    }

    .harmoni-sidebar.show {
        transform: translateX(0);
    }

    .harmoni-main {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .harmoni-content {
        padding: 1.25rem;
    }

    .topbar-title h1 {
        font-size: 1rem;
    }
}

/* =============================================================================
   37. RESPONSIVE — Mobile (max-width: 767.98px)
   ============================================================================= */
@media (max-width: 767.98px) {
    .harmoni-content {
        padding: 1rem;
    }

    .harmoni-topbar {
        padding: 0 1rem;
    }

    .global-search {
        max-width: 200px;
        margin: 0 .5rem;
    }

    .global-search-input {
        padding: 5px 8px 5px 28px;
        font-size: .76rem;
    }

    .global-search-kbd { display: none !important; }

    /* Force stat cards into a 2-column grid */
    .stat-cards-row > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card .stat-value {
        font-size: 1.35rem;
    }

    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* Auth card adapts to smaller screens */
    .auth-card {
        padding: 1.75rem 1.5rem;
        border-radius: 12px;
    }

    .auth-logo .logo-mark {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .auth-logo h1 {
        font-size: 1.25rem;
    }

    /* Quick actions grid on mobile */
    .quick-actions-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Dash card adjustments */
    .dash-card-header {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .dash-card-body {
        padding: 1rem;
    }

    /* Table responsiveness */
    .table thead th {
        font-size: 0.65rem;
        padding: 0.5rem 0.65rem;
    }

    .table tbody td {
        font-size: 0.8rem;
        padding: 0.5rem 0.65rem;
    }

    /* Modal on mobile */
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-content {
        border-radius: 12px;
    }
}

/* =============================================================================
   38. RESPONSIVE — Small mobile (max-width: 575.98px)
   ============================================================================= */
@media (max-width: 575.98px) {
    .harmoni-content {
        padding: 0.75rem;
    }

    .topbar-title h1 {
        font-size: 0.9rem;
    }

    .topbar-actions .btn span.d-sm-inline {
        display: none;
    }

    .stat-card .stat-value {
        font-size: 1.15rem;
    }

    .stat-card .stat-label {
        font-size: 0.7rem;
    }

    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =============================================================================
   39. PRINT STYLES
   ============================================================================= */
@media print {
    .harmoni-sidebar,
    .sidebar-overlay,
    .harmoni-topbar,
    .sidebar-toggle,
    .topbar-actions,
    .btn,
    .action-btn {
        display: none !important;
    }

    .harmoni-main {
        margin-left: 0 !important;
    }

    .harmoni-content {
        padding: 0 !important;
        background-color: #ffffff !important;
    }

    .card,
    .stat-card,
    .dash-card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
        break-inside: avoid;
    }

    body {
        font-size: 12pt;
        color: #000000;
        background: #ffffff;
    }

    a {
        color: #000000;
        text-decoration: underline;
    }

    .table thead th {
        background-color: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* =============================================================================
   40. MISCELLANEOUS
   ============================================================================= */

/* Focus-visible for accessibility */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Remove outline for mouse clicks */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Smooth transitions on interactive elements */
button,
a,
input,
select,
textarea,
.btn,
.nav-item,
.card,
.stat-card,
.action-btn {
    transition-property: background-color, color, border-color, box-shadow, transform, opacity;
    transition-duration: 0.15s;
    transition-timing-function: ease;
}

/* Disabled state */
.btn:disabled,
.btn.disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

/* Truncation helper */
.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Divider */
.divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 1rem 0;
}

/* Avatar sizes */
.avatar-xs { width: 24px; height: 24px; font-size: 0.65rem; }
.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-md { width: 40px; height: 40px; font-size: 0.85rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; }
.avatar-xl { width: 72px; height: 72px; font-size: 1.5rem; }

.avatar-xs,
.avatar-sm,
.avatar-md,
.avatar-lg,
.avatar-xl {
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
    object-fit: cover;
}

/* Scroll to top button (optional) */
.scroll-top-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease;
    z-index: 1030;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* =============================================================================
   PATCHES — Clases adicionales usadas en templates
   ============================================================================= */

/* Main sin sidebar (páginas de auth) */
.harmoni-main--no-sidebar {
    margin-left: 0 !important;
}

/* Título en topbar */
.topbar-h1 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
}

/* Data label grid (key-value pairs) */
.data-label-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.data-label-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.data-label-row dt {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 110px;
    flex-shrink: 0;
    padding-top: 0.1rem;
}

.data-label-row dd {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin: 0;
}

/* Status badge variante primary (admin) */
.status-badge--primary {
    background-color: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
}

/* Sidebar brand link */
.sidebar-brand-link {
    text-decoration: none;
    color: inherit;
}
