@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../vendor/fonts/inter-var.woff2') format('woff2');
}

:root {
    --px-primary: #4f46e5;
    --px-primary-2: #7c3aed;
    --px-primary-dark: #4338ca;
    --px-primary-soft: #eef2ff;
    --px-gradient: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    --px-bg: #f6f7fb;
    --px-sidebar-bg: #ffffff;
    --px-border: #e6e8f0;
    --px-text-soft: #6b7280;
    --px-radius: 0.85rem;
    --px-radius-sm: 0.6rem;
    --px-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
    --px-shadow-md: 0 4px 10px rgba(30, 27, 75, 0.06), 0 2px 4px rgba(30, 27, 75, 0.05);
    --px-shadow-lg: 0 12px 28px rgba(30, 27, 75, 0.12), 0 4px 10px rgba(30, 27, 75, 0.06);
}

body {
    background: var(--px-bg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1b1f2e;
    font-size: 0.925rem;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }
h1, h2, h3, h4, h5, h6 { letter-spacing: -0.01em; }

/* --- Buttons / brand color overrides --- */
.btn { transition: all 0.15s ease; font-weight: 500; }
.btn-primary {
    background: var(--px-gradient);
    border-color: transparent;
    box-shadow: 0 1px 2px rgba(79, 70, 229, 0.25);
}
.btn-primary:hover, .btn-primary:focus {
    filter: brightness(1.06);
    background: var(--px-gradient);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.32);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-outline-primary {
    color: var(--px-primary);
    border-color: var(--px-primary);
}
.btn-outline-primary:hover {
    background-color: var(--px-primary);
    border-color: var(--px-primary);
}
.text-primary { color: var(--px-primary) !important; }
.link-primary { color: var(--px-primary) !important; }

.btn, .form-control, .form-select, .card, .badge, .modal-content {
    border-radius: var(--px-radius-sm);
}
.form-control:focus, .form-select:focus {
    border-color: #a5b4fc;
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.15);
}

/* --- Brand mark --- */
.px-logo-mark { border-radius: 9px; box-shadow: 0 2px 6px rgba(79, 70, 229, 0.35); flex-shrink: 0; }

/* --- App shell --- */
.px-shell {
    display: flex;
    min-height: 100vh;
}

.px-sidebar {
    width: 252px;
    flex-shrink: 0;
    background: var(--px-sidebar-bg);
    border-right: 1px solid var(--px-border);
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
}

.px-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.5rem 1.25rem;
    font-weight: 800;
    font-size: 1.15rem;
    color: #1b1f2e;
}

.px-nav { flex: 1; }
.px-nav a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--px-radius-sm);
    color: #414867;
    font-weight: 500;
    margin-bottom: 0.15rem;
    position: relative;
    transition: background 0.12s ease, color 0.12s ease;
}
.px-nav a i { width: 18px; text-align: center; color: #8a90a8; }
.px-nav a:hover { background: #f2f3f8; }
.px-nav a.active { background: var(--px-primary-soft); color: var(--px-primary); font-weight: 600; }
.px-nav a.active i { color: var(--px-primary); }
.px-nav a.active::before {
    content: "";
    position: absolute;
    left: -0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    border-radius: 0 3px 3px 0;
    background: var(--px-gradient);
}
.px-nav .px-nav-heading {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9aa0b4;
    padding: 0.9rem 0.75rem 0.3rem;
    font-weight: 700;
}

.px-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.px-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--px-border);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(6px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.px-content {
    padding: 1.5rem;
    flex: 1;
}

.px-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 600; font-size: 0.85rem;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(0,0,0,0.12);
}
.px-avatar-sm { width: 26px; height: 26px; font-size: 0.7rem; }

.px-card {
    background: #fff;
    border: 1px solid var(--px-border);
    border-radius: var(--px-radius);
    box-shadow: var(--px-shadow);
}
a.px-card, .px-card-hover {
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
a.px-card:hover, .px-card-hover:hover {
    box-shadow: var(--px-shadow-lg);
    border-color: #d7d9f5;
    transform: translateY(-2px);
}

.px-stat {
    background: #fff;
    border: 1px solid var(--px-border);
    border-radius: var(--px-radius);
    padding: 1.1rem 1.25rem;
    box-shadow: var(--px-shadow);
}
.px-stat .px-stat-value { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; }
.px-stat .px-stat-label { color: var(--px-text-soft); font-size: 0.82rem; }

.px-tabs .nav-link {
    border: none;
    color: var(--px-text-soft);
    font-weight: 500;
    padding: 0.6rem 0.9rem;
    transition: color 0.12s ease;
}
.px-tabs .nav-link.active {
    color: var(--px-primary);
    border-bottom: 2px solid var(--px-primary);
    background: transparent;
    font-weight: 600;
}

/* --- Kanban --- */
.kanban-board {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}
.kanban-column {
    background: #f0f1f6;
    border-radius: var(--px-radius);
    width: 280px;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 260px);
}
.kanban-column-header {
    padding: 0.75rem 0.9rem 0.5rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.kanban-cards {
    padding: 0 0.6rem 0.6rem;
    overflow-y: auto;
    flex: 1;
    min-height: 60px;
}
.kanban-card {
    background: #fff;
    border: 1px solid var(--px-border);
    border-radius: var(--px-radius-sm);
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.6rem;
    cursor: grab;
    box-shadow: var(--px-shadow);
    user-select: none;
    transition: box-shadow 0.12s ease, transform 0.12s ease;
}
.kanban-card:hover { box-shadow: var(--px-shadow-md); }
.kanban-card:active { cursor: grabbing; }
.kanban-card .kanban-card-title { font-weight: 600; font-size: 0.87rem; margin-bottom: 0.35rem; }
.kanban-card.sortable-ghost { opacity: 0.4; }
.kanban-card.sortable-fallback { box-shadow: var(--px-shadow-lg); rotate: 2deg; }

/* --- Gantt --- */
.gantt-wrap { overflow-x: auto; }
.gantt-container .bar { fill: var(--px-primary); }
.gantt-container .bar-progress { fill: var(--px-primary-dark); }
.gantt-container .bar-label { fill: #fff; }

/* --- Misc --- */
.px-progress-thin { height: 6px; border-radius: 3px; }
.progress-bar { background: var(--px-gradient); }
.px-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--px-text-soft);
}
.px-empty i { font-size: 2.2rem; color: #c8cbe0; margin-bottom: 0.75rem; }

.table > :not(caption) > * > * { vertical-align: middle; }

@media (max-width: 900px) {
    .px-sidebar { display: none; }
    .px-content { padding: 1rem; }
}

/* --- Super admin theme (dark sidebar to visually separate from tenant app) --- */
.px-sidebar-admin {
    background: #131629;
    border-right: 1px solid #22263f;
}
.px-sidebar-admin .px-brand { color: #fff; }
.px-sidebar-admin .px-nav a { color: #b7bad6; }
.px-sidebar-admin .px-nav a i { color: #7d81ab; }
.px-sidebar-admin .px-nav a:hover { background: #1c2040; }
.px-sidebar-admin .px-nav a.active { background: #272c52; color: #fff; }
.px-sidebar-admin .px-nav a.active i { color: #a5b4fc; }
.px-sidebar-admin .px-nav-heading { color: #6b6f96; }
.px-sidebar-admin .small.text-muted { color: #6b6f96 !important; }
.px-admin-badge {
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    font-weight: 700;
}

/* --- Marketing hero --- */
.px-hero-gradient {
    background: radial-gradient(1200px 500px at 15% -10%, rgba(124, 58, 237, 0.08), transparent),
                radial-gradient(900px 400px at 100% 0%, rgba(99, 102, 241, 0.08), transparent);
}
