:root {
    --sidebar-width: 268px;
    --poms-primary: #2563eb;
    --poms-primary-dark: #1d4ed8;
    --poms-accent: #0ea5e9;
    --poms-success: #10b981;
    --poms-warning: #f59e0b;
    --poms-danger: #ef4444;
    --poms-bg: #f1f5f9;
    --poms-surface: #ffffff;
    --poms-sidebar: #0f172a;
    --poms-sidebar-hover: #1e293b;
    --poms-text: #0f172a;
    --poms-muted: #64748b;
    --poms-border: #e2e8f0;
    --poms-radius: 12px;
    --poms-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
    --poms-shadow-lg: 0 8px 30px rgba(15, 23, 42, 0.1);
}

* { box-sizing: border-box; }

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--poms-bg);
    color: var(--poms-text);
    font-size: 0.9375rem;
}

/* Sidebar */
#sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--poms-sidebar) 0%, #020617 100%);
    border-right: 1px solid rgba(255,255,255,0.06);
}

.sidebar-brand {
    padding: 1.25rem 1rem !important;
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--poms-primary), var(--poms-accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
}

#sidebar .nav-link {
    border-radius: 8px;
    padding: 0.55rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #94a3b8 !important;
    margin-bottom: 2px;
    transition: all 0.2s ease;
}

#sidebar .nav-link i {
    width: 1.25rem;
    opacity: 0.85;
}

#sidebar .nav-link:hover {
    background: var(--poms-sidebar-hover);
    color: #f1f5f9 !important;
}

#sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.35), rgba(14, 165, 233, 0.15));
    color: #fff !important;
    border-left: 3px solid var(--poms-accent);
}

#sidebar .nav-header {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #475569 !important;
    padding-top: 1rem !important;
}

/* Topbar */
.app-topbar {
    background: var(--poms-surface);
    border-bottom: 1px solid var(--poms-border);
    box-shadow: var(--poms-shadow);
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.search-pill .form-control {
    border-radius: 50px;
    background: var(--poms-bg);
    border: 1px solid var(--poms-border);
    padding-left: 2.5rem;
}

.search-pill .search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--poms-muted);
}

/* Page header */
.page-header-modern {
    margin-bottom: 1.5rem;
}

.page-header-modern h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-header-modern .breadcrumb-text {
    color: var(--poms-muted);
    font-size: 0.875rem;
}

/* Cards */
.card-modern {
    background: var(--poms-surface);
    border: 1px solid var(--poms-border);
    border-radius: var(--poms-radius);
    box-shadow: var(--poms-shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}

.card-modern:hover {
    box-shadow: var(--poms-shadow-lg);
}

.card-modern .card-header {
    background: transparent;
    border-bottom: 1px solid var(--poms-border);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-modern .card-body {
    padding: 1.25rem;
}

/* Stat cards */
.stat-card-modern {
    border: none;
    border-radius: var(--poms-radius);
    overflow: hidden;
    position: relative;
}

.stat-card-modern .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-card-modern .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.stat-card-modern .stat-label {
    font-size: 0.75rem;
    color: var(--poms-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Step cards */
.steps-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.step-card {
    border-radius: var(--poms-radius);
    transition: transform 0.15s, opacity 0.15s;
}

.step-card-inner {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--poms-surface);
    border: 1px solid var(--poms-border);
    border-radius: var(--poms-radius);
    padding: 1rem 1.15rem;
    box-shadow: var(--poms-shadow);
}

.step-card:hover .step-card-inner {
    border-color: #cbd5e1;
}

.step-card.completed .step-card-inner {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.step-card.completed .step-number {
    background: var(--poms-success);
}

.step-card.completed .step-label {
    text-decoration: line-through;
    color: var(--poms-muted);
}

.step-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--poms-primary), var(--poms-accent));
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-body { flex: 1; min-width: 0; }

.step-check .form-check-input {
    width: 1.15em;
    height: 1.15em;
    margin-top: 0.2em;
    cursor: pointer;
}

.step-check .form-check-input:checked {
    background-color: var(--poms-success);
    border-color: var(--poms-success);
}

.step-label {
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
}

/* Info cards (troubleshooting) */
.info-card {
    display: flex;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    border-radius: var(--poms-radius);
    border: 1px solid var(--poms-border);
    background: var(--poms-surface);
    margin-bottom: 1rem;
    box-shadow: var(--poms-shadow);
}

.info-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.info-card-primary .info-card-icon { background: #dbeafe; color: var(--poms-primary); }
.info-card-warning .info-card-icon { background: #fef3c7; color: #d97706; }
.info-card-danger .info-card-icon { background: #fee2e2; color: var(--poms-danger); }
.info-card-success .info-card-icon { background: #d1fae5; color: var(--poms-success); }

.info-card-title {
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--poms-muted);
}

.info-card-body {
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Install guide cards on index */
.guide-card {
    height: 100%;
    border: 1px solid var(--poms-border);
    border-radius: var(--poms-radius);
    background: var(--poms-surface);
    overflow: hidden;
    transition: all 0.2s;
}

.guide-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--poms-shadow-lg);
    border-color: #cbd5e1;
}

.guide-card-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--poms-primary), var(--poms-accent));
}

.guide-card-body { padding: 1.25rem; }

.guide-card h5 a {
    color: var(--poms-text);
    text-decoration: none;
    font-weight: 600;
}

.guide-card h5 a:hover { color: var(--poms-primary); }

.guide-meta {
    font-size: 0.8rem;
    color: var(--poms-muted);
}

.step-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.75rem;
}

.step-pill {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    background: var(--poms-bg);
    border-radius: 6px;
    color: var(--poms-muted);
    border: 1px solid var(--poms-border);
}

/* Timer */
.timer-card {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: var(--poms-radius);
}

.timer-card .timer-display {
    font-family: ui-monospace, monospace;
    font-size: 2rem;
    font-weight: 700;
}

/* Journal timeline */
.timeline-modern {
    position: relative;
    padding-left: 1.5rem;
}

.timeline-modern::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--poms-primary), var(--poms-accent));
    border-radius: 2px;
}

.timeline-entry {
    position: relative;
    padding-bottom: 1.25rem;
}

.timeline-entry::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 6px;
    width: 12px;
    height: 12px;
    background: var(--poms-surface);
    border: 3px solid var(--poms-primary);
    border-radius: 50%;
    margin-left: -1px;
}

.timeline-time {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--poms-primary);
}

/* Tables */
.table-modern {
    margin-bottom: 0;
}

.table-modern thead th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--poms-muted);
    font-weight: 600;
    border-bottom-width: 1px;
    background: var(--poms-bg);
}

.table-modern tbody tr:hover {
    background: #f8fafc;
}

/* Forms */
.form-modern .form-control,
.form-modern .form-select {
    border-radius: 8px;
    border-color: var(--poms-border);
    padding: 0.55rem 0.85rem;
}

.form-modern .form-control:focus,
.form-modern .form-select:focus {
    border-color: var(--poms-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-modern .form-label {
    font-weight: 500;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--poms-primary);
    border-color: var(--poms-primary);
    border-radius: 8px;
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--poms-primary-dark);
    border-color: var(--poms-primary-dark);
}

/* Task board */
.kanban-column {
    background: var(--poms-bg);
    border-radius: var(--poms-radius);
    min-height: 200px;
}

.kanban-column-header {
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--poms-radius) var(--poms-radius) 0 0;
}

.kanban-card {
    background: var(--poms-surface);
    border: 1px solid var(--poms-border);
    border-radius: 10px;
    padding: 0.85rem;
    margin-bottom: 0.5rem;
    box-shadow: var(--poms-shadow);
}

/* Empty state */
.empty-state-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto;
    background: var(--poms-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--poms-muted);
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
}

/* Detail hero */
.detail-hero {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    border: 1px solid #bfdbfe;
    border-radius: var(--poms-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.detail-hero h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tag-chip {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    background: #fff;
    border: 1px solid var(--poms-border);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.35rem;
    margin-bottom: 0.35rem;
}

.pulse-dot { animation: pulse 1.5s infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
}

@media (max-width: 991.98px) {
    #sidebar {
        position: fixed;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    #sidebar.show { transform: translateX(0); }
    .sidebar-overlay.show { display: block; }
}

/* Page enter animation */
main.container-fluid > * {
    animation: fadeSlideIn 0.35s ease-out;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scrollbar */
#sidebar::-webkit-scrollbar { width: 6px; }
#sidebar::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }

/* Modern UI enhancements */
body {
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 24%),
                radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.10), transparent 18%),
                linear-gradient(180deg, #eef2ff 0%, #f8fafc 58%, #ffffff 100%);
}

#sidebar {
    background: linear-gradient(180deg, #090f22 0%, #111827 100%);
    border-right: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 8px 0 40px rgba(15, 23, 42, 0.16);
}

.sidebar-brand {
    padding: 1.75rem 1.4rem !important;
    border-bottom: none;
}

.sidebar-logo {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--poms-primary), var(--poms-accent));
    border-radius: 14px;
}

.sidebar-user-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    padding: 1rem 1.15rem;
    margin: 1rem 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    backdrop-filter: blur(10px);
}

.sidebar-user-card .avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--poms-primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.sidebar-user-card .user-info {
    min-width: 0;
}

.sidebar-user-card .user-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.15rem;
}

.sidebar-user-card .user-role {
    font-size: 0.75rem;
    color: #94a3b8;
}

#sidebar .nav-link {
    padding: 0.7rem 1rem;
    color: #cbd5e1 !important;
    border-radius: 14px;
}

#sidebar .nav-link:hover,
#sidebar .nav-link.active {
    background: rgba(255,255,255,0.08);
    color: #fff !important;
}

#sidebar .nav-link.active {
    border-left: none;
    box-shadow: inset 4px 0 0 rgba(56, 189, 248, 0.88);
}

#sidebar .nav-header {
    color: #94a3b8 !important;
    padding-top: 1.25rem !important;
}

.app-topbar {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

#page-content-wrapper {
    min-height: 100vh;
}

main.container-fluid {
    max-width: 1340px;
    margin: 0 auto;
}

.search-pill .form-control {
    background: #f8faff;
    border-color: rgba(148, 163, 184, 0.18);
}

.search-pill .form-control:focus {
    background: #ffffff;
}

.card-modern {
    background: rgba(255,255,255,0.86);
    border: 1px solid rgba(148, 163, 184, 0.16);
    backdrop-filter: blur(10px);
}

.card-modern:hover {
    transform: translateY(-2px);
}

.card-modern .card-header {
    padding: 1.15rem 1.35rem;
    border-bottom: none;
}

.card-modern .card-body {
    padding: 1.35rem;
}

.stat-card-modern {
    background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(236, 245, 255, 0.9) 100%);
    border: none;
    padding: 1rem 1.15rem;
}

.stat-card-modern .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.14);
    color: var(--poms-primary);
}

.stat-card-modern .stat-value {
    font-size: 1.65rem;
}

.page-header-modern {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    padding: 1.5rem 1.8rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.06);
}

.page-header-modern h1 {
    font-size: 2rem;
}

.page-header-modern .breadcrumb-text {
    color: #64748b;
}

.timer-card {
    background: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
    color: #fff;
    border-radius: 24px;
}

.timer-card .timer-display {
    font-size: 2.6rem;
}

.timeline-modern {
    padding-left: 1.35rem;
}

.timeline-modern::before {
    left: 0.4rem;
}

.timeline-entry::before {
    left: -1.35rem;
}

.table-modern thead th {
    background: transparent;
}

.table-modern tbody tr:hover {
    background: rgba(37, 99, 235, 0.05);
}

.btn-primary {
    border-radius: 14px;
}

.btn-light.border {
    border-radius: 14px;
}

@media (max-width: 991.98px) {
    .app-topbar { padding: 0.85rem 1rem; }
}

/* Quick action FAB on mobile */
@media (max-width: 767.98px) {
    .app-topbar .btn-primary { font-size: 0; padding: 0.4rem 0.6rem; }
    .app-topbar .btn-primary i { font-size: 1rem; margin: 0 !important; }
}

/* Link hover */
a.fw-medium:hover, .guide-card h5 a:hover { color: var(--poms-primary) !important; }

/* Page header icon */
.page-header-icon {
    width: 48px; height: 48px; flex-shrink: 0;
    background: linear-gradient(135deg, #dbeafe, #e0f2fe);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: var(--poms-primary); font-size: 1.35rem;
}

/* Search hero */
.search-hero {
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    border: 1px solid var(--poms-border);
    border-radius: var(--poms-radius);
    padding: 1.5rem;
    box-shadow: var(--poms-shadow);
    margin-bottom: 1.5rem;
}
.search-hero .form-control {
    border-radius: 50px;
    padding: 0.75rem 1.25rem 0.75rem 3rem;
    font-size: 1rem;
}
.search-hero .search-icon-wrap {
    position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
    color: var(--poms-muted); font-size: 1.1rem;
}

/* Report tiles */
.report-tile {
    display: block; text-decoration: none; color: inherit;
    background: var(--poms-surface);
    border: 1px solid var(--poms-border);
    border-radius: var(--poms-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.25s ease;
    height: 100%;
    box-shadow: var(--poms-shadow);
}
.report-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--poms-shadow-lg);
    border-color: #cbd5e1;
    color: inherit;
}
.report-tile-icon {
    width: 64px; height: 64px; margin: 0 auto 1rem;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.75rem;
}

/* Search / list results */
.result-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--poms-muted);
    margin: 1.5rem 0 0.75rem;
}
.result-item {
    display: block;
    padding: 1rem 1.15rem;
    background: var(--poms-surface);
    border: 1px solid var(--poms-border);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}
.result-item:hover {
    border-color: var(--poms-primary);
    box-shadow: var(--poms-shadow);
    color: inherit;
    transform: translateX(4px);
}
.result-item-type {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: var(--poms-bg);
    color: var(--poms-muted);
}

/* Form sections */
.form-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--poms-muted);
    margin: 1.25rem 0 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--poms-border);
}
.form-section-title:first-child { margin-top: 0; }

/* Data table wrapper */
.data-table-card { overflow: hidden; }
.data-table-card .table { margin: 0; }

/* Profile / settings */
.settings-tile {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--poms-border);
    margin-bottom: 0.5rem;
    background: var(--poms-bg);
}
.note-card {
    border-left: 4px solid var(--poms-warning);
    transition: transform 0.2s;
}
.note-card:hover { transform: translateX(4px); }
.note-card.lesson { border-left-color: var(--poms-success); }
.note-card.procedure { border-left-color: var(--poms-primary); }

/* Company color system */
.company-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--poms-text);
    text-decoration: none;
    background: color-mix(in srgb, var(--chip-color, #94a3b8) 12%, white);
    border: 1px solid color-mix(in srgb, var(--chip-color, #94a3b8) 35%, white);
    border-radius: 999px;
    padding: 0.2rem 0.6rem 0.2rem 0.35rem;
    white-space: nowrap;
    line-height: 1.2;
    flex-shrink: 0;
}
a.company-chip:hover {
    background: color-mix(in srgb, var(--chip-color, #94a3b8) 20%, white);
    color: var(--poms-text);
}
.company-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--chip-color, #94a3b8);
    flex-shrink: 0;
}
.company-chip-logo {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    min-height: 18px;
    max-width: 18px !important;
    max-height: 18px !important;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}
.company-chip-name {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
}
.company-chip-tag {
    font-size: 0.65rem;
    opacity: 0.85;
    margin-left: 0.1rem;
}
.company-color-guide .card-body {
    padding: 0.55rem 0.85rem !important;
}
.company-color-guide-inner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2rem;
}
.company-color-guide-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--poms-muted);
    white-space: nowrap;
    flex-shrink: 0;
}
.company-color-guide-chips {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 1px;
    scrollbar-width: thin;
}
.company-color-guide-chips::-webkit-scrollbar {
    height: 4px;
}
.company-color-guide-chips::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.company-color-guide .company-chip-guide {
    font-size: 0.72rem;
}
.company-color-guide-hint {
    font-size: 0.7rem;
    color: var(--poms-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Company dock styles live in company-dock.css */
.company-tinted {
    border-left: 3px solid var(--company-color, #94a3b8) !important;
}
.company-tinted-row {
    box-shadow: inset 3px 0 0 var(--company-color, transparent);
}
.company-tinted-row:hover {
    background: color-mix(in srgb, var(--company-color, #94a3b8) 6%, white);
}
.guide-card-accent.company-accent {
    background: var(--company-color, var(--poms-primary)) !important;
}
.note-card.company-tinted,
.card-modern.company-tinted {
    border-left-width: 3px;
    border-left-style: solid;
}

/* Company cards — fixed sizes (override Bootstrap img { max-width: 100% }) */
.company-logo,
.company-logo-lg,
.company-chip-logo {
    max-width: none;
}
.company-logo-preview {
    width: 72px;
    height: 72px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid var(--poms-border);
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.company-logo-preview .company-logo-lg {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover;
    border: none;
    border-radius: 0;
}
.company-logo-preview .company-logo-placeholder-lg {
    width: 100%;
    height: 100%;
    border-radius: 0;
    margin: 0;
}
.company-logo {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px;
    min-height: 56px;
    max-width: 56px !important;
    max-height: 56px !important;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid var(--poms-border);
    display: block;
}
.company-logo-lg {
    width: 72px !important;
    height: 72px !important;
    min-width: 72px;
    min-height: 72px;
    max-width: 72px !important;
    max-height: 72px !important;
    object-fit: cover;
    border-radius: 14px;
    border: 2px solid var(--poms-border);
    display: block;
}
.company-logo-placeholder,
.company-logo-placeholder-lg {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.company-logo-placeholder-lg {
    width: 72px;
    height: 72px;
    border-radius: 14px;
}
.company-stat-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
}
.company-stat {
    font-size: 0.75rem;
    color: var(--poms-muted);
    background: #f8fafc;
    border: 1px solid var(--poms-border);
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    white-space: nowrap;
}
.company-stat i { margin-right: 0.2rem; opacity: 0.85; }
.company-card:hover { box-shadow: var(--poms-shadow-md); }
.company-stat-card { transition: transform 0.15s; }
.company-stat-card:hover { transform: translateY(-2px); }

/* FullCalendar skin */
#calendar.fc { --fc-border-color: var(--poms-border); }
#calendar .fc-toolbar-title { font-size: 1.15rem; font-weight: 700; }
#calendar .fc-button-primary {
    background: var(--poms-primary) !important;
    border-color: var(--poms-primary) !important;
}
#calendar .fc-day-past {
    background-color: #f1f5f9 !important;
}
#calendar .fc-day-past .fc-daygrid-day-number,
#calendar .fc-day-past .fc-col-header-cell-cushion {
    color: #94a3b8 !important;
}
#calendar .fc-day-past .fc-daygrid-day-frame {
    cursor: not-allowed;
}
#calendar .fc-event-locked {
    opacity: 0.65;
    filter: grayscale(0.35);
    cursor: default !important;
}
#calendar .fc-event-conflict {
    box-shadow: inset 0 0 0 2px #dc3545 !important;
    outline: 1px dashed #dc3545;
}

/* Auth pages */
.auth-card-wrap .card {
    border-radius: 16px;
    border: none;
    box-shadow: var(--poms-shadow-lg);
}

@media print {
    #sidebar, .app-topbar, .btn { display: none !important; }
    main.container-fluid > * { animation: none; }
}


/* Partial navigation loading state */
.poms-partial-loading {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

/* Draggable project progress */
.project-progress-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.project-progress-wrap-lg {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

.project-progress-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--poms-muted);
    min-width: 2.5rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.project-progress-value-lg {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--progress-color, var(--poms-primary));
    text-align: right;
    min-width: 0;
    line-height: 1;
}

.project-progress-slider {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(
        to right,
        var(--progress-color, #2563eb) var(--progress-pct, 0%),
        #e2e8f0 var(--progress-pct, 0%)
    );
    outline: none;
    cursor: pointer;
}

.project-progress-wrap-lg .project-progress-slider {
    height: 12px;
}

.project-progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--progress-color, #2563eb);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2);
    cursor: grab;
}

.project-progress-slider:active::-webkit-slider-thumb {
    cursor: grabbing;
    transform: scale(1.08);
}

.project-progress-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--progress-color, #2563eb);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2);
    cursor: grab;
    border: none;
}

.project-progress-slider::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
}

.project-progress-wrap.is-saving .project-progress-value {
    color: var(--poms-success);
}

.project-progress-readonly .project-progress-bar {
    flex: 1;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(
        to right,
        var(--progress-color, #2563eb) var(--progress-pct, 0%),
        #e2e8f0 var(--progress-pct, 0%)
    );
}

.project-progress-wrap-lg.project-progress-readonly .project-progress-bar {
    height: 12px;
}

.time-duration-badge {
    border: 1px solid color-mix(in srgb, currentColor 25%, white);
}

/* POMS 2.0 Enhancement Layer */
.card-modern,.stat-card-modern{border-radius:24px!important}
.card-modern:hover,.stat-card-modern:hover{transform:translateY(-4px);box-shadow:0 20px 50px rgba(15,23,42,.12)!important}
.app-topbar{backdrop-filter:blur(14px)}
