:root {
    --nm-topbar-height: 80px;
    --nm-bg: #f4f9fe;
    --nm-bg-soft: #eaf3fb;
    --nm-surface: #ffffff;
    --nm-surface-soft: #f8fbff;
    --nm-border: #d7e6f3;
    --nm-border-strong: #c7dced;

    --nm-primary: #3f78b8;
    --nm-primary-dark: #356ca9;
    --nm-primary-soft: #4e86c5;
    --nm-primary-pale: #dbe9f7;

    --nm-text: #1e3a5f;
    --nm-text-soft: #5f7691;
    --nm-text-muted: #7d90a8;

    --nm-success: #1fa971;
    --nm-danger: #dc4c4c;
    --nm-warning: #f3a533;
    --nm-dark: #173556;

    --nm-shadow-sm: 0 8px 20px rgba(48, 91, 140, 0.08);
    --nm-shadow-md: 0 16px 34px rgba(48, 91, 140, 0.12);

    --nm-radius: 18px;
    --nm-radius-sm: 12px;
    --nm-transition: all 0.18s ease;
}

html,
body {
    min-height: 100%;
}

body.nm-app-body {
    background: linear-gradient(180deg, #f8fbff 0%, var(--nm-bg) 100%);
    color: var(--nm-text);
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
}

.nm-app-main {
    min-height: calc(100vh - 58px);
    padding-bottom: 30px;
    box-sizing: border-box;
}

.nm-has-topbar .nm-app-main {
    min-height: 100vh;
    padding-top: var(--nm-topbar-height);
}

.nm-flash-wrap {
    padding-top: 20px;
}

.nm-alert {
    border: none;
    border-radius: 16px;
    box-shadow: var(--nm-shadow-sm);
    padding: 14px 16px;
}

/* Topbar */
.nm-topbar {
    background: linear-gradient(135deg, var(--nm-primary) 0%, var(--nm-primary-soft) 100%);
    min-height: 58px;
    box-shadow: 0 2px 10px rgba(44, 92, 145, 0.18);
    padding-top: 4px;
    padding-bottom: 4px;
}

.nm-topbar .navbar-brand,
.nm-topbar .nav-link,
.nm-topbar .dropdown-toggle {
    color: #ffffff !important;
}

.nm-topbar .navbar-brand {
    font-size: 1.15rem;
    letter-spacing: 0.3px;
}

.nm-topbar .nav-link {
    padding: 10px 14px;
    font-weight: 700;
    border-radius: 10px;
    transition: var(--nm-transition);
}

.nm-topbar .nav-link:hover,
.nm-topbar .nav-link.active {
    background: rgba(255, 255, 255, 0.14);
}

.nm-topbar .dropdown-menu {
    border: 1px solid var(--nm-border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--nm-shadow-md);
    padding: 8px;
}

.nm-topbar .dropdown-item {
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 600;
    color: var(--nm-text);
}

.nm-topbar .dropdown-item:hover {
    background: var(--nm-bg-soft);
}

.ticket-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--nm-primary-dark);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 6px 14px rgba(31, 80, 130, 0.18);
}

/* Pages et titres */
.nm-dashboard-page,
.container,
.container-fluid {
    position: relative;
}

.nm-dashboard-page {
    padding: 28px 14px 40px;
}

.nm-page-header {
    margin-bottom: 26px;
}

.nm-page-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--nm-text);
    margin-bottom: 6px;
}

.nm-page-subtitle {
    margin: 0;
    color: var(--nm-text-soft);
    font-size: 15px;
}

/* Cards */
.card {
    border: 1px solid var(--nm-border);
    border-radius: var(--nm-radius) !important;
    box-shadow: var(--nm-shadow-sm);
    background: var(--nm-surface);
}

.card-header {
    border-bottom: 1px solid #edf4fb;
    background: transparent;
}

.rounded-4 {
    border-radius: var(--nm-radius) !important;
}

.shadow-sm {
    box-shadow: var(--nm-shadow-sm) !important;
}

.shadow-lg {
    box-shadow: var(--nm-shadow-md) !important;
}

/* Bandeaux doux */
.nm-soft-banner {
    background: linear-gradient(135deg, #dceafb 0%, #eef6ff 100%);
    border: 1px solid #c7def5;
    border-radius: 20px;
}

/* Formulaires */
form .form-label {
    color: var(--nm-text);
    font-weight: 700;
    margin-bottom: 8px;
}

.form-control,
.form-select,
textarea.form-control {
    min-height: 46px;
    border: 1px solid var(--nm-border-strong);
    border-radius: 14px;
    background: #fbfdff;
    color: var(--nm-text);
    box-shadow: none;
    transition: var(--nm-transition);
    padding-left: 14px;
    padding-right: 14px;
}

textarea.form-control {
    min-height: 120px;
    padding-top: 12px;
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
    border-color: #93bde8;
    background: #ffffff;
    box-shadow: 0 0 0 0.18rem rgba(63, 120, 184, 0.12);
}

.form-control::placeholder,
textarea.form-control::placeholder {
    color: #95a6ba;
}

/* Boutons */
.btn {
    border-radius: 14px;
    font-weight: 700;
    padding: 10px 16px;
    transition: var(--nm-transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--nm-primary) 0%, var(--nm-primary-soft) 100%);
    border: none;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(63, 120, 184, 0.18);
}

.btn-primary:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--nm-primary-dark) 0%, var(--nm-primary) 100%);
}

.btn-dark {
    background: linear-gradient(135deg, #23476f 0%, #315e90 100%);
    border: none;
}

.btn-outline-danger,
.btn-outline-dark,
.btn-outline-secondary {
    border-width: 1px;
}

.btn.rounded-pill {
    border-radius: 999px !important;
    padding-left: 18px;
    padding-right: 18px;
}

/* Tableaux */
.table {
    color: var(--nm-text);
}

.table thead th {
    border-bottom: 1px solid #e7eff8;
    color: var(--nm-text-soft);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 800;
    background: #f6fbff;
    padding-top: 14px;
    padding-bottom: 14px;
}

.table tbody td {
    padding-top: 14px;
    padding-bottom: 14px;
    border-color: #edf3fa;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background: #f8fbff;
}

/* Badges */
.badge {
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* Modales */
.modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: var(--nm-shadow-md);
}

.modal-header,
.modal-footer {
    border: none;
}

.modal-body {
    color: var(--nm-text);
}

/* Dashboard boîtes mail */
.fs-mailbox-card {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid var(--nm-border);
    border-radius: 20px;
    overflow: hidden;
    min-height: 255px;
    box-shadow: var(--nm-shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.fs-mailbox-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--nm-shadow-md);
}

.fs-mailbox-card__header {
    background: linear-gradient(180deg, #f4f9fe 0%, #eaf3fb 100%);
    border-bottom: 1px solid #ddebf8;
    padding: 20px 20px 16px;
}

.fs-mailbox-card__title {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 800;
    color: var(--nm-text);
    line-height: 1.35;
    word-break: break-word;
}

.fs-mailbox-card__subtitle {
    color: var(--nm-text-soft);
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

.fs-mailbox-card__body {
    padding: 18px 20px 14px;
    background: #ffffff;
}

.fs-mailbox-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #edf3fa;
}

.fs-mailbox-row:last-child {
    border-bottom: none;
}

.fs-mailbox-label {
    color: var(--nm-text-soft);
    font-size: 15px;
    font-weight: 600;
}

.fs-mailbox-count {
    min-width: 28px;
    text-align: right;
    color: var(--nm-text);
    font-size: 16px;
    font-weight: 800;
}

.fs-mailbox-count.is-unread {
    color: var(--nm-danger);
}

.fs-mailbox-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-top: 1px solid #e8f1fa;
    background: #fbfdff;
    color: var(--nm-text);
    font-size: 15px;
    font-weight: 700;
}

.fs-mailbox-arrow {
    font-size: 20px;
    line-height: 1;
    color: var(--nm-text-muted);
    transition: transform 0.18s ease;
}

.fs-mailbox-card:hover .fs-mailbox-arrow {
    transform: translateX(4px);
}

.fs-mailbox-delete-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 999px;
    background: #fff;
    color: var(--nm-danger);
    box-shadow: var(--nm-shadow-sm);
    font-size: 20px;
    line-height: 1;
    font-weight: 700;
    transition: var(--nm-transition);
}

.fs-mailbox-delete-btn:hover {
    background: #feecec;
}

/* Mailbox page */
.mailbox-page {
    padding-bottom: 24px;
}

.mailbox-sidebar-card,
.mailbox-list-card {
    border: 1px solid var(--nm-border);
}

.mailbox-sidebar-title {
    font-weight: 800;
    color: var(--nm-text);
}

.mailbox-sidebar-host {
    color: var(--nm-text-soft);
}

.mailbox-filters-list .list-group-item {
    border: none;
    border-bottom: 1px solid #edf3fa;
    padding: 12px 14px;
    font-weight: 600;
}

.mailbox-filters-list .list-group-item:last-child {
    border-bottom: none;
}

.mailbox-filters-list .list-group-item.active {
    background: linear-gradient(135deg, var(--nm-primary) 0%, var(--nm-primary-soft) 100%);
    color: #fff;
}

.mailbox-table-wrap {
    overflow-x: auto;
}

.mailbox-table th,
.mailbox-table td {
    white-space: nowrap;
}

.mailbox-sender-name,
.mailbox-subject-line {
    font-weight: 700;
    color: var(--nm-text);
}

.mailbox-sender-email,
.mailbox-preview-line {
    color: var(--nm-text-soft);
    font-size: 13px;
}

.mailbox-more-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--nm-border);
    border-radius: 12px;
    background: #fff;
    color: #4f6986;
    font-size: 22px;
    line-height: 1;
    transition: var(--nm-transition);
}

.mailbox-more-btn:hover {
    background: #f5faff;
    border-color: #c4daef;
}

/* Utilisateur */
.nm-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    font-weight: 700;
    color: var(--nm-text-soft);
    padding: 2px 6px 6px;
    border-radius: 8px;
    user-select: none;
    transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.nm-more-btn:hover {
    color: var(--nm-text);
    background-color: #f4f9fe;
}

.nm-more-btn:active {
    transform: scale(0.96);
}

/* Rapports */
canvas {
    max-width: 100%;
}

.progress {
    border-radius: 999px;
    overflow: hidden;
}

/* Tâches */
.task-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    align-items: start;
}

.task-column {
    background: #edf5fc;
    border: 1px solid var(--nm-border);
    border-radius: 18px;
    overflow: hidden;
    min-height: 420px;
}

.task-column__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: #e1eef9;
    border-bottom: 1px solid #d1e4f4;
}

.task-column__header h5 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--nm-text);
}

.task-column__header span {
    background: #ffffff;
    color: var(--nm-text);
    border-radius: 999px;
    min-width: 28px;
    text-align: center;
    padding: 4px 10px;
    font-weight: 800;
    font-size: 14px;
}

.task-column__body {
    padding: 14px;
}

.task-empty {
    background: #ffffff;
    border: 1px dashed #c9daeb;
    border-radius: 14px;
    padding: 18px;
    color: var(--nm-text-soft);
    text-align: center;
    font-size: 14px;
}

.task-card {
    background: #ffffff;
    border: 1px solid #d8e6f3;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(20, 60, 100, 0.05);
    margin-bottom: 14px;
}

.task-card:last-child {
    margin-bottom: 0;
}

/* Auth */
.min-vh-100 .card input.form-control {
    min-height: 50px;
}

/* Responsive */
@media (max-width: 991.98px) {
    .task-board {
        grid-template-columns: 1fr;
    }

    .nm-app-main {
        padding-bottom: 22px;
    }

    .nm-page-title {
        font-size: 24px;
    }
}

@media (max-width: 767.98px) {
    .card-body {
        padding: 1rem !important;
    }

    .table thead th,
    .table tbody td {
        font-size: 13px;
    }

    .form-control,
    .form-select {
        min-height: 44px;
    }
}
.task-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 180px;
    background: #ffffff;
    border: 1px solid #d8e6f3;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(20, 60, 100, 0.05);
}

.task-card__content {
    flex-grow: 1;
}

.task-card__actions {
    margin-top: auto;
    align-items: center;
}

.task-btn-fixed {
    min-width: 88px;
    padding: 6px 12px !important;
    font-size: 12px !important;
    line-height: 1.2;
    text-align: center;
    border-radius: 999px !important;
}

.task-card form {
    margin: 0;
}
.nm-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    font-weight: 700;
    color: #5f7691;
    padding: 2px 6px 6px;
    border-radius: 8px;
    user-select: none;
    transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.nm-more-btn:hover {
    color: #1e3a5f;
    background-color: #eff6ff;
}

.nm-more-btn:active {
    transform: scale(0.96);
}

.task-card__footer--menu {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.dropdown-menu form {
    margin: 0;
}
/* =========================
   NAVBAR STYLE FREESCOUT
========================= */

.nm-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    box-sizing: border-box;
    background: #5d9ce6;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.65rem 1.2rem;
    min-height: var(--nm-topbar-height);
}

.nm-topbar .navbar-brand {
    color: #ffffff !important;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.1px;
}

.nm-topbar .navbar-nav {
    align-items: center;
}

.nm-topbar .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 0.48rem 0.75rem;
    border-radius: 6px;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.nm-topbar .nav-link:hover,
.nm-topbar .nav-link:focus {
    background-color: rgba(255, 255, 255, 0.10);
    color: #ffffff !important;
}

.nm-topbar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.18);
    color: #ffffff !important;
}

.ticket-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ffffff;
    color: #4d8fda;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}

.nm-topbar .dropdown-menu {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.3rem;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
    margin-top: 0.45rem;
}

.nm-topbar .dropdown-item {
    border-radius: 6px;
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    color: #344054;
}

.nm-topbar .dropdown-item:hover,
.nm-topbar .dropdown-item:focus {
    background-color: #f5f9ff;
    color: #4d8fda;
}

.nm-topbar .dropdown-toggle::after {
    margin-left: 0.35rem;
    vertical-align: middle;
}

.nm-topbar .navbar-toggler {
    border: none;
    box-shadow: none !important;
    padding: 0.3rem 0.5rem;
}

.nm-topbar .navbar-toggler-icon {
    filter: brightness(0) invert(1);
}

.nm-topbar .nav-link.nm-logout-link {
    color: rgba(255, 255, 255, 0.92) !important;
}

.nm-topbar .nav-link.nm-logout-link:hover {
    background-color: rgba(255, 255, 255, 0.10);
}

@media (max-width: 991.98px) {
    .nm-topbar .navbar-collapse {
        margin-top: 0.65rem;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 8px;
        padding: 0.7rem;
    }

    .nm-topbar .nav-link {
        width: 100%;
        text-align: left;
    }
}
.nm-logout-modal {
    border: none;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

.nm-logout-modal .modal-title {
    font-weight: 700;
    color: #2d3a4a;
}

.nm-logout-modal .modal-body {
    font-size: 1rem;
    color: #5b6673;
    padding-left: 1rem;
    padding-right: 1rem;
}

.nm-logout-modal .btn {
    border-radius: 10px;
    padding: 0.55rem 1rem;
    font-weight: 600;
}
.nm-brand-logo {
    height: 38px;
    width: auto;
    display: block;
}

.nm-home-logo {
    height: 42px;
    width: auto;
    display: block;
}
.nm-topbar .container-fluid {
    display: flex;
    align-items: center;
}

.nm-brand {
    display: flex;
    align-items: center;
    height: 58px;
    padding: 0;
    margin: 0;
}

.nm-brand-logo {
    height: 46px;
    width: auto;
    display: block;
}
.nm-app-footer {
    padding: 14px 20px;
    background: #f7fbff;
    border-top: 1px solid #dbe9f6;
    color: #6c8198;
    font-size: 13px;
}

.nm-app-footer-inner {
    max-width: 1320px;
    margin: 0 auto;
    text-align: center;
    font-weight: 600;
}
