:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --info: #0891b2;
    --light: #f8fafc;
    --dark: #0f172a;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --border: #e2e8f0;
    --muted: #64748b;
    --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-strong: 0 18px 42px rgba(15, 23, 42, 0.14);
    --sidebar-width: 300px;
    --header-height: 70px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 34rem),
        linear-gradient(180deg, #f8fbff 0%, #eef3f8 100%);
    color: #334155;
    font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: var(--primary);
}

a:hover {
    color: var(--primary-dark);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #0f172a;
    font-family: "Nunito", "Open Sans", sans-serif;
    font-weight: 800;
    letter-spacing: 0;
}

.header {
    height: var(--header-height);
    padding: 0 22px;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.88);
    box-shadow: 0 2px 18px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
    z-index: 997;
}

.logo {
    width: 280px;
    text-decoration: none;
    gap: 12px;
}

.logo span.d-lg-block {
    color: #0f172a;
    font-family: "Poppins", sans-serif;
    font-size: 25px;
    font-weight: 700;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #0891b2);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.toggle-sidebar-btn {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #eff6ff;
    color: var(--primary);
    font-size: 18px;
}

.search-bar {
    min-width: 360px;
    padding: 0 20px;
}

.search-form {
    width: 100%;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    overflow: hidden;
}

.search-form input {
    width: 100%;
    height: 100%;
    padding: 0 14px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #334155;
}

.search-form button {
    width: 46px;
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--primary);
}

.header-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-nav .nav-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    position: relative;
    color: #475569;
    border-radius: 8px;
}

.header-nav .nav-icon:hover {
    background: #eff6ff;
    color: var(--primary);
}

.badge-number {
    position: absolute;
    inset: 4px 2px auto auto;
    min-width: 18px;
    height: 18px;
    padding: 3px 5px;
    border-radius: 999px;
    font-size: 10px;
    line-height: 12px;
}

.avatar-circle {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #2563eb);
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.nav-profile {
    color: #334155;
    font-weight: 700;
}

.dropdown-menu {
    border: 0;
    border-radius: 8px;
    box-shadow: var(--shadow-strong);
    color: #334155;
}

.dropdown-menu-arrow::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 18px;
    width: 14px;
    height: 14px;
    background: #fff;
    transform: rotate(45deg);
    border-left: 1px solid rgba(226, 232, 240, 0.7);
    border-top: 1px solid rgba(226, 232, 240, 0.7);
}

.dropdown-header {
    padding: 14px 20px 10px;
    color: #475569;
    font-weight: 700;
}

.dropdown-header h6 {
    margin: 0;
    font-size: 15px;
}

.dropdown-header span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.dropdown-item {
    gap: 10px;
    padding: 10px 18px;
    color: #334155;
    font-weight: 600;
}

.dropdown-item:hover {
    background: #eff6ff;
    color: var(--primary);
}

.notifications {
    min-width: 330px;
}

.notification-item {
    display: flex;
    gap: 14px;
    padding: 12px 18px;
}

.notification-item i {
    margin-top: 3px;
    font-size: 20px;
}

.notification-item h4 {
    margin: 0 0 4px;
    font-size: 14px;
}

.notification-item p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    padding: 22px 16px;
    background: rgba(255, 255, 255, 0.96);
    border-right: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 8px 0 24px rgba(15, 23, 42, 0.05);
    overflow-y: auto;
    transition: transform 0.25s ease;
    z-index: 996;
}

.sidebar-nav {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar-nav .nav-heading {
    padding: 14px 12px 8px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.sidebar-nav .nav-link {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0;
    padding: 12px 14px;
    border-radius: 8px;
    color: #1e293b;
    background: #eef6ff;
    font-family: "Poppins", sans-serif;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.sidebar-nav .nav-link i {
    width: 22px;
    color: var(--primary);
    text-align: center;
}

.sidebar-nav .nav-link.collapsed {
    color: #64748b;
    background: transparent;
}

.sidebar-nav .nav-link.collapsed i {
    color: #94a3b8;
}

.sidebar-nav .nav-link:hover {
    color: var(--primary);
    background: #eef6ff;
    transform: translateX(3px);
}

.main {
    min-height: calc(100vh - var(--header-height));
    margin-top: var(--header-height);
    margin-left: var(--sidebar-width);
    padding: 28px 30px 70px;
    transition: margin-left 0.25s ease;
}

.footer {
    margin-left: var(--sidebar-width);
    padding: 20px 30px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    transition: margin-left 0.25s ease;
}

.toggle-sidebar .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-width)));
}

.toggle-sidebar .main,
.toggle-sidebar .footer {
    margin-left: 0;
}

.pagetitle {
    margin-bottom: 22px;
}

.pagetitle h1 {
    margin-bottom: 6px;
    color: #0f172a;
    font-size: 28px;
}

.breadcrumb {
    color: var(--muted);
    font-size: 14px;
}

.dashboard-hero {
    position: relative;
    overflow: hidden;
    padding: 28px;
    margin-bottom: 24px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.96), rgba(8, 145, 178, 0.92)),
        linear-gradient(45deg, #2563eb, #0891b2);
    color: #fff;
    box-shadow: 0 20px 42px rgba(37, 99, 235, 0.22);
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -120px;
    width: 330px;
    height: 330px;
    border: 54px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
}

.dashboard-hero h1,
.dashboard-hero p,
.dashboard-hero .breadcrumb,
.dashboard-hero .breadcrumb a {
    position: relative;
    z-index: 1;
    color: #fff;
}

.dashboard-hero h1 {
    margin-bottom: 8px;
    font-size: 31px;
}

.dashboard-hero p {
    max-width: 680px;
    margin: 0;
    opacity: 0.88;
}

.quick-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.btn {
    border-radius: 8px;
    border: 0;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #0891b2);
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover {
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.28);
}

.btn-light {
    color: var(--primary);
}

.btn-outline-light {
    border: 1px solid rgba(255, 255, 255, 0.65);
}

.card {
    border: 0;
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.card:hover {
    box-shadow: var(--shadow-strong);
}

.card-header {
    padding: 18px 22px;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 8px 8px 0 0 !important;
    background: #fff;
    color: #0f172a;
}

.card-header h5,
.card-title {
    margin: 0;
    color: #0f172a;
    font-family: "Poppins", sans-serif;
    font-size: 18px;
    font-weight: 700;
}

.card-body {
    padding: 22px;
}

.stats-card {
    position: relative;
    overflow: hidden;
    min-height: 154px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
    border: 0;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.stats-card::after {
    content: "";
    position: absolute;
    right: -38px;
    bottom: -48px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.08);
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
}

.stats-icon {
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    background: linear-gradient(135deg, #2563eb, #0891b2);
}

.stats-icon.warning {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.stats-icon.success {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

.stats-icon.info {
    background: linear-gradient(135deg, #0891b2, #0ea5e9);
}

.stats-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.stats-number {
    margin: 4px 0 0;
    color: #0f172a;
    font-family: "Nunito", sans-serif;
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
}

.stats-note {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.chart-box {
    min-height: 320px;
    position: relative;
}

.roadmap-meter {
    display: grid;
    gap: 14px;
}

.meter-item {
    display: grid;
    gap: 7px;
}

.meter-meta {
    display: flex;
    justify-content: space-between;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.progress {
    height: 12px;
    border-radius: 999px;
    background: #e2e8f0;
}

.progress-bar {
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #0891b2);
}

.progress-bar.bg-success {
    background: linear-gradient(90deg, #16a34a, #22c55e) !important;
}

.progress-bar.bg-danger {
    background: linear-gradient(90deg, #dc2626, #f97316) !important;
}

.activity-feed {
    display: grid;
    gap: 16px;
}

.activity-item {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 12px;
    align-items: start;
}

.activity-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eff6ff;
    color: var(--primary);
}

.activity-item h6 {
    margin: 0 0 4px;
    font-size: 14px;
}

.activity-item p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.table-responsive {
    border-radius: 8px;
}

.table {
    margin-bottom: 0;
    color: #334155;
}

.table thead th {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #edf2f7;
    vertical-align: middle;
}

.table-hover tbody tr {
    transition: background 0.2s ease;
}

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

.badge {
    padding: 0.46rem 0.7rem;
    border-radius: 6px;
    font-weight: 700;
}

.alert {
    border: 0;
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.form-control,
.form-select {
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #334155;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.16);
}

.form-label {
    color: #334155;
    font-weight: 700;
}

.input-group-text {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
}

.modal-content {
    border: 0;
    border-radius: 8px;
    box-shadow: var(--shadow-strong);
}

.modal-header {
    border-bottom: 1px solid var(--border);
}

.kanban-container {
    display: flex;
    gap: 18px;
    min-height: 700px;
    padding: 4px 0 18px;
    overflow-x: auto;
}

.kanban-column {
    flex: 0 0 350px;
    padding: 16px;
    border: 1px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
}

.kanban-column-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    color: #0f172a;
    font-weight: 800;
}

.kanban-drop-zone {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}

.kanban-drop-zone.drag-over {
    border-color: var(--primary);
    background: #eff6ff;
}

.kanban-card {
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    cursor: move;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kanban-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.kanban-card.dragging {
    opacity: 0.7;
    transform: rotate(2deg) scale(1.02);
}

.kanban-card-title {
    margin-bottom: 10px;
    color: #0f172a;
    font-weight: 800;
}

.kanban-card-feature {
    display: inline-flex;
    padding: 5px 8px;
    margin-bottom: 10px;
    border-radius: 6px;
    background: #eef6ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.kanban-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    color: var(--muted);
    font-size: 13px;
}

.alert-overdue {
    border-left-color: var(--danger);
}

.font-weight-500 {
    font-weight: 500;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 0.2rem;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at top right, rgba(8, 145, 178, 0.22), transparent 28rem),
        radial-gradient(circle at bottom left, rgba(37, 99, 235, 0.2), transparent 28rem),
        linear-gradient(135deg, #f8fbff 0%, #e8f1fb 100%);
}

.login-shell {
    width: min(1080px, 100%);
    display: grid;
    grid-template-columns: minmax(320px, 440px) 1fr;
    gap: 28px;
    align-items: stretch;
}

.login-panel,
.login-insights {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow-strong);
    backdrop-filter: blur(16px);
}

.login-panel {
    padding: 28px;
}

.login-brand {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 24px;
}

.login-brand h1 {
    margin: 0;
    font-size: 30px;
}

.login-brand p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.login-card {
    box-shadow: none;
}

.login-card:hover {
    box-shadow: none;
}

.login-card .card-header {
    padding-top: 24px;
}

.login-card h3 {
    margin-bottom: 6px;
    font-size: 22px;
}

.login-insights {
    display: grid;
    align-content: center;
    gap: 18px;
    padding: 34px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(8, 145, 178, 0.92)),
        #2563eb;
}

.insight-card {
    display: grid;
    gap: 8px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.insight-card i {
    font-size: 26px;
}

.insight-card strong {
    font-family: "Nunito", sans-serif;
    font-size: 22px;
}

.insight-card span {
    opacity: 0.86;
}

@media (max-width: 1199px) {
    .search-bar {
        min-width: 260px;
    }

    .sidebar {
        transform: translateX(calc(-1 * var(--sidebar-width)));
    }

    .main,
    .footer {
        margin-left: 0;
    }

    .toggle-sidebar .sidebar {
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 14px;
    }

    .logo {
        width: auto;
    }

    .search-bar {
        display: none;
    }

    .main {
        padding: 22px 14px 54px;
    }

    .dashboard-hero {
        padding: 22px;
    }

    .dashboard-hero h1 {
        font-size: 25px;
    }

    .stats-card {
        min-height: auto;
    }

    .notifications {
        min-width: 290px;
    }

    .login-page {
        padding: 16px;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-insights {
        display: none;
    }
}
