:root{--darlink-primary:#0F4C81;--darlink-primary-light:#eff6ff;--darlink-primary-hover:#1565A8;--darlink-dark:#0f172a;--darlink-bg:#f8fafc;--darlink-card:#fff;--darlink-text:#1e293b;--darlink-muted:#64748b;--darlink-border:#e2e8f0}body{background:var(--darlink-bg);color:var(--darlink-text);font-family:Arial,sans-serif}.darlink-topbar{background:var(--darlink-dark);color:#fff;height:64px}.darlink-sidebar{background:#fff;border-right:1px solid var(--darlink-border);min-height:calc(100vh - 64px)}.darlink-card{background:var(--darlink-card);border:1px solid var(--darlink-border);border-radius:18px;box-shadow:0 10px 30px rgba(15,23,42,.06)}.darlink-title{font-weight:700;letter-spacing:-.03em}.darlink-btn-primary{background:var(--darlink-primary);border-color:var(--darlink-primary);color:#fff;border-radius:12px}.darlink-btn-primary:hover{background:#1d4ed8;color:#fff}.darlink-menu-link{color:var(--darlink-muted);border-radius:12px;padding:10px 12px;margin-bottom:4px}.darlink-menu-link:hover,.darlink-menu-link.active{background:#eff6ff;color:var(--darlink-primary)}.darlink-table thead th{font-size:.82rem;text-transform:uppercase;letter-spacing:.04em;color:var(--darlink-muted);border-bottom:1px solid var(--darlink-border)}.darlink-table td{vertical-align:middle}.darlink-actions .btn{border-radius:10px}.darlink-section-title{font-weight:700;color:var(--darlink-dark);border-bottom:1px solid var(--darlink-border);padding-bottom:8px;margin-bottom:16px}.darlink-search{border-radius:14px;padding:.75rem 1rem}.form-control,.form-select{border-radius:12px}.form-label{font-weight:600;color:#334155;font-size:.9rem}.badge{border-radius:999px}
.darlink-stat{background:#f8fafc;border:1px solid var(--darlink-border);border-radius:16px;padding:14px 16px;height:100%}.darlink-stat span{display:block;color:var(--darlink-muted);font-size:.82rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em}.darlink-stat strong{display:block;font-size:1.45rem;color:var(--darlink-dark);margin-top:4px}

/* Phoenix P3.6.9 — Menu général premium : tuiles bleues */
.darlink-launcher-grid{
    align-items:stretch;
}
.darlink-launcher-card{
    position:relative;
    overflow:hidden;
    border:0 !important;
    border-radius:18px;
    min-height:210px;
    background:linear-gradient(135deg,#1479ff 0%,#0d6efd 48%,#005bd7 100%) !important;
    box-shadow:0 14px 28px rgba(13,110,253,.26);
    color:#fff !important;
    transition:transform .22s ease,box-shadow .22s ease,filter .22s ease;
}
.darlink-launcher-card::before{
    content:"";
    position:absolute;
    inset:0;
    background:
        radial-gradient(circle at 18% 14%,rgba(255,255,255,.24),transparent 28%),
        radial-gradient(circle at 90% 100%,rgba(255,255,255,.12),transparent 30%);
    pointer-events:none;
}
.darlink-launcher-card::after{
    content:"";
    position:absolute;
    width:140px;
    height:140px;
    border-radius:999px;
    right:-56px;
    bottom:-58px;
    background:rgba(255,255,255,.10);
    transition:transform .22s ease,opacity .22s ease;
}
.darlink-launcher-card:hover{
    color:#fff !important;
    box-shadow:0 22px 46px rgba(13,110,253,.38);
    transform:translateY(-6px) scale(1.04);
    filter:saturate(1.08);
}
.darlink-launcher-card:hover::after{
    transform:scale(1.18);
    opacity:.96;
}
.darlink-launcher-card .card-body{
    position:relative;
    z-index:1;
    min-height:210px;
    padding:28px 18px 24px;
    display:flex;
    flex-direction:column;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
}
.darlink-launcher-icon{
    width:100%;
    height:auto;
    display:flex;
    align-items:center;
    justify-content:center;
    margin:0 0 20px 0;
    padding:0;
    background:transparent !important;
    box-shadow:none !important;
    border-radius:0;
    color:#fff !important;
    font-size:5rem !important;
    line-height:1;
    text-align:center;
    text-shadow:0 8px 18px rgba(0,0,0,.16);
}
.darlink-launcher-icon i{
    color:#fff !important;
    font-size:5rem !important;
    line-height:1;
    display:block;
}
.darlink-launcher-title{
    display:block;
    width:100%;
    font-weight:800;
    font-size:1.28rem;
    letter-spacing:-.02em;
    color:#fff !important;
    line-height:1.15;
    text-align:center;
}
.darlink-launcher-text{
    display:block;
    width:100%;
    font-size:.92rem;
    color:rgba(255,255,255,.88) !important;
    line-height:1.25;
    margin-top:9px;
    text-align:center;
}
@media (max-width:575.98px){
    .darlink-launcher-card{min-height:165px;}
    .darlink-launcher-card .card-body{min-height:165px;padding:22px 14px;}
    .darlink-launcher-icon,.darlink-launcher-icon i{font-size:3.4rem !important;margin-bottom:14px;}
    .darlink-launcher-title{font-size:1.04rem;}
    .darlink-launcher-text{font-size:.78rem;}
}

/* Phoenix P3.7.0 Sidebar */
.darlink-sidebar{background:#0F4C81!important;width:260px;min-height:calc(100vh - 64px)}
.darlink-sidebar .nav-section{color:rgba(255,255,255,.65);font-size:.72rem;font-weight:700;letter-spacing:.12em;margin:18px 0 8px;padding:0 12px;border-top:1px solid rgba(255,255,255,.15);padding-top:14px}
.darlink-menu-link{color:#fff!important;padding:11px 14px;border-radius:10px;display:flex;align-items:center;gap:12px;transition:.25s}
.darlink-menu-link:hover{background:#1565A8!important;color:#fff!important;transform:translateX(2px)}
.darlink-menu-link.active{background:#1C75BC!important;color:#fff!important;font-weight:700;box-shadow:0 4px 10px rgba(0,0,0,.2);border-left:4px solid #fff}
/* =========================================================
   Phoenix P3.7.1 — Smart Navigation
   ========================================================= */

.darlink-shell {
    display: flex;
    min-height: calc(100vh - 56px);
}

.darlink-sidebar {
    width: 235px;
    min-width: 235px;
    max-width: 235px;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    background: linear-gradient(180deg, #0f4c81 0%, #0b3b66 100%);
    padding: 14px 12px;
}

.darlink-main {
    flex: 1;
    padding: 1.5rem;
    overflow-x: auto;
}

.darlink-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.darlink-nav-section {
    width: 100%;
    border: 0;
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.94);
    border-radius: 9px;
    padding: 7px 9px;
    margin-top: 5px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .055em;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.darlink-nav-section span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.darlink-nav-section i {
    font-size: 14px;
}

.darlink-menu-link {
    color: rgba(255,255,255,.86);
    text-decoration: none;
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 9px;
    margin: 2px 0;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    line-height: 1.1;
    transition: all .18s ease;
    border-left: 3px solid transparent;
}

.darlink-menu-link i {
    width: 20px;
    min-width: 20px;
    text-align: center;
    font-size: 18px;
    color: #fff;
}

.darlink-menu-link span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.darlink-menu-link:hover {
    color: #fff;
    background: rgba(255,255,255,.14);
    transform: translateX(2px);
}

.darlink-menu-link.active {
    color: #fff;
    background: linear-gradient(135deg, #2f7fe4 0%, #2368cb 100%);
    border-left-color: #fff;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(0,0,0,.18);
}

.darlink-sidebar::-webkit-scrollbar {
    width: 6px;
}

.darlink-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.35);
    border-radius: 10px;
}

@media (max-width: 768px) {
    .darlink-shell {
        flex-direction: column;
    }

    .darlink-sidebar {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
    }
}
html,
body{
    height:100%;
    overflow:hidden;
}

.darlink-shell{
    display:flex;
    height:calc(100vh - 64px);
    overflow:hidden;
}

.darlink-sidebar{
    position:sticky;
    top:0;
    height:100%;
    overflow-y:auto;
    overflow-x:hidden;
}

.darlink-main{
    flex:1;
    height:100%;
    overflow-y:auto;
    overflow-x:auto;
    padding:24px;
}
/* =========================================================
   Phoenix P3.7.2 — DarlinkTable
   ========================================================= */

.darlink-table-card {
    padding: 0;
    overflow: hidden;
}

.darlink-table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--darlink-border);
    background: #fff;
}

.darlink-table-search {
    min-width: 320px;
    max-width: 520px;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid var(--darlink-border);
    border-radius: 14px;
    padding: 0 14px;
}

.darlink-table-search i {
    color: var(--darlink-muted);
    font-size: 1rem;
}

.darlink-table-search input {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    padding: 12px 0;
    font-size: .95rem;
    color: var(--darlink-text);
}

.darlink-table-toolbar-info {
    color: var(--darlink-muted);
    font-size: .85rem;
    white-space: nowrap;
}

.darlink-table-wrapper {
    background: #fff;
}

.darlink-table-modern {
    margin-bottom: 0;
}

.darlink-table-modern thead th {
    background: #eff6ff;
    color: #0f4c81;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .055em;
    padding: 14px 16px;
    border-bottom: 1px solid #dbeafe;
    white-space: nowrap;
}

.darlink-table-modern tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid #edf2f7;
    color: #334155;
    font-size: .92rem;
}

.darlink-table-modern tbody tr:nth-child(even) {
    background: #fbfdff;
}

.darlink-table-modern tbody tr {
    transition: background .18s ease;
}

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

.darlink-table-code {
    color: #0f4c81;
    font-weight: 800;
}

.darlink-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.darlink-badge-light {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.darlink-actions {
    white-space: nowrap;
}

.darlink-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    text-decoration: none;
    transition: all .18s ease;
    background: #f8fafc;
    color: #475569;
}

.darlink-icon-btn:hover {
    transform: translateY(-1px);
}

.darlink-icon-btn-view {
    color: #0f4c81;
    background: #eff6ff;
    border-color: #dbeafe;
}

.darlink-icon-btn-view:hover {
    background: #dbeafe;
    color: #0f4c81;
}

.darlink-icon-btn-edit {
    color: #7c3aed;
    background: #f5f3ff;
    border-color: #ede9fe;
}

.darlink-icon-btn-edit:hover {
    background: #ede9fe;
    color: #6d28d9;
}

.darlink-icon-btn-delete {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fee2e2;
}

.darlink-icon-btn-delete:hover {
    background: #fee2e2;
    color: #b91c1c;
}

@media (max-width: 768px) {
    .darlink-table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .darlink-table-search {
        min-width: 100%;
    }

    .darlink-table-toolbar-info {
        text-align: left;
    }
}
/* =========================================================
   Phoenix P3.7.2 — DarlinkTable Polish
   ========================================================= */

.darlink-table-modern thead th {
    padding: 11px 16px;
}

.darlink-table-modern tbody td {
    padding: 10px 16px;
}

.darlink-actions .darlink-icon-btn {
    margin-left: 2px;
}

.darlink-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 9px;
}

.darlink-icon-btn-view {
    background: #f1f7ff;
}

.darlink-icon-btn-edit {
    background: #f7f3ff;
}

.darlink-icon-btn-delete {
    background: #fff5f5;
}

.darlink-table-modern th:nth-child(6),
.darlink-table-modern td:nth-child(6),
.darlink-table-modern th:nth-child(7),
.darlink-table-modern td:nth-child(7) {
    width: 135px;
    white-space: nowrap;
}

.darlink-table-modern th:last-child,
.darlink-table-modern td:last-child {
    width: 120px;
}
/* =========================================================
   Phoenix P3.7.2.1 — DarlinkTable Toolbar
   ========================================================= */

.darlink-table-toolbar-left,
.darlink-table-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.darlink-table-filter {
    height: 44px;
    min-width: 130px;
    border: 1px solid var(--darlink-border);
    border-radius: 14px;
    background: #f8fafc;
    color: #475569;
    padding: 0 12px;
    font-size: .9rem;
    outline: none;
}

.darlink-table-filter:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.darlink-toolbar-btn {
    height: 44px;
    border: 1px solid var(--darlink-border);
    border-radius: 14px;
    background: #fff;
    color: #475569;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
    transition: all .18s ease;
}

.darlink-toolbar-btn:hover {
    background: #eff6ff;
    color: #0f4c81;
    border-color: #bfdbfe;
}
/* =========================================================
   Phoenix P3.7.2.2 — DarlinkTable Sticky Header
   ========================================================= */

.darlink-table-wrapper {
    max-height: calc(100vh - 260px);
    overflow: auto;
}

.darlink-table-modern thead th {
    position: sticky;
    top: 0;
    z-index: 5;
}

.darlink-table-modern thead th:first-child {
    border-top-left-radius: 0;
}

.darlink-table-modern thead th:last-child {
    border-top-right-radius: 0;
}
/* =========================================================
   Phoenix P3.7.2.3
   Ligne sélectionnée Darlink ERP
   ========================================================= */

.darlink-table-modern tbody tr.selected td{

    background:#eff6ff !important;

    color:#0f172a;

    font-weight:600;

    transition:all .18s ease;

}

.darlink-table-modern tbody tr.selected td:first-child{

    border-left:5px solid #0F4C81;

    padding-left:11px;

}
/* Survol doux des lignes DarlinkTable */
.darlink-table-modern tbody tr:hover td{
    background:#f7fbff;
}
/* Ligne sélectionnée Darlink ERP */
.darlink-table-modern tbody tr.selected td{
    background:#eff6ff !important;
    color:#0f172a;
    font-weight:600;
    transition:all .18s ease;
}

.darlink-table-modern tbody tr.selected td:first-child{
    border-left:5px solid #0F4C81;
    padding-left:11px;
}
/* =========================================================
   Phoenix P3.7.2.6 — Tri des colonnes DarlinkTable
   ========================================================= */

.darlink-sortable {
    cursor: pointer;
    user-select: none;
}

.darlink-sortable:hover {
    background: #dbeafe !important;
}

.sort-indicator {
    color: #64748b;
    font-size: .75rem;
    margin-left: 4px;
}
.darlink-icon-btn-order {
    color: #047857;
    background: #ecfdf5;
    border-color: #d1fae5;
}

.darlink-icon-btn-order:hover {
    background: #d1fae5;
    color: #065f46;
}
/* ==========================================================
   LOGIN
   ========================================================== */

.darlink-login-password{
    position:relative;
}

.darlink-login-password .form-control{
    padding-right:48px;
}

.darlink-login-password-toggle{
    position:absolute;
    top:50%;
    right:12px;
    transform:translateY(-50%);
    border:0;
    background:transparent;
    color:#64748b;
    padding:5px;
    z-index:3;
    cursor:pointer;
}

.darlink-login-password-toggle:hover{
    color:var(--darlink-primary);
}
/* ==========================================================
   Phoenix 2026.1.1 — Connexion
   ========================================================== */

.darlink-auth-body{
    min-height:100vh;
    margin:0;
    background:#f5f7fb;
}

.darlink-login-page{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
}

.darlink-login-card{
    width:100%;
    max-width:420px;
    background:#fff;
    border:1px solid #dbe4ef;
    border-radius:20px;
    box-shadow:0 18px 45px rgba(15,23,42,.08);
    padding:34px;
}

.darlink-login-brand{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:14px;
    text-align:left;
}

.darlink-login-logo{
    width:204px;
    height:84px;
    margin:0 auto 8px;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
}

.darlink-login-logo img{
    width:auto;
    max-width:100%;
    max-height:84px;
    object-fit:contain;
    display:block;
}

.darlink-login-brand-centered{
    flex-direction:column;
    justify-content:center;
    gap:2px;
    text-align:center;
}

.darlink-login-brand-centered .darlink-login-brand-version{
    margin-top:2px;
}

.darlink-login-brand-version{
    margin-top:2px;
    color:#64748b;
    font-size:.82rem;
}

.darlink-login-separator{
    height:1px;
    margin:26px 0;
    background:#e2e8f0;
}

.darlink-login-heading{
    margin-bottom:24px;
}

.darlink-login-heading h1{
    margin:0 0 6px;
    color:#0f172a;
    font-size:1.55rem;
    font-weight:800;
}

.darlink-login-heading p{
    margin:0;
    color:#64748b;
}

.darlink-login-form{
    display:flex;
    flex-direction:column;
    gap:18px;
}

.darlink-login-input{
    position:relative;
    display:flex;
    align-items:center;
}

.darlink-login-input > i{
    position:absolute;
    left:14px;
    color:#64748b;
    pointer-events:none;
}

.darlink-login-input input{
    width:100%;
    height:48px;
    padding:0 48px 0 42px;
    border:1px solid #cbd5e1;
    border-radius:12px;
    background:#fff;
    color:#0f172a;
    outline:none;
    transition:all .18s ease;
}

.darlink-login-input input:focus{
    border-color:#93c5fd;
    box-shadow:0 0 0 3px rgba(59,130,246,.12);
}

.darlink-login-password-toggle{
    position:absolute;
    right:12px;
    border:0;
    background:transparent;
    color:#64748b;
    padding:5px;
    cursor:pointer;
}

.darlink-login-password-toggle:hover{
    color:var(--darlink-primary, #0F4C81);
}

.darlink-login-submit{
    width:100%;
    min-height:48px;
    margin-top:2px;
}

.darlink-login-footer{
    display:flex;
    justify-content:space-between;
    gap:16px;
    margin-top:26px;
    padding-top:18px;
    border-top:1px solid #e2e8f0;
    color:#94a3b8;
    font-size:.75rem;
}

.darlink-auth-flash{
    position:fixed;
    top:18px;
    left:50%;
    z-index:1000;
    transform:translateX(-50%);
    min-width:280px;
    max-width:calc(100% - 32px);
}

@media (max-width:576px){
    .darlink-login-page{
        padding:14px;
    }

    .darlink-login-card{
        padding:26px 20px;
        border-radius:16px;
    }

    .darlink-login-footer{
        flex-direction:column;
        align-items:center;
        gap:4px;
        text-align:center;
    }
}
.darlink-login-brand-subtitle{
    margin-top:2px;
    color:#94a3b8;
    font-size:.80rem;
    font-weight:500;
}
/* Phoenix P2.5.4 LTS — Notifications utilisateur */
.darlink-notification{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    overflow:hidden;
    padding-right:3rem;
    animation:darlink-notification-in 200ms ease-out both;
}

.darlink-notification .btn-close{
    position:absolute;
    top:50%;
    right:1rem;
    transform:translateY(-50%);
}

.darlink-notification-closing{
    pointer-events:none;
    animation:darlink-notification-out 300ms ease-in both;
}

.darlink-notification-progress{
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    height:3px;
    background:currentColor;
    opacity:.28;
    transform-origin:left center;
}

.darlink-notification-progress-running{
    animation:darlink-notification-countdown var(--darlink-notification-duration, 3000ms) linear forwards;
}

.darlink-auth-notifications{
    position:fixed;
    top:18px;
    left:50%;
    z-index:1080;
    width:min(520px, calc(100% - 32px));
    transform:translateX(-50%);
}

.darlink-auth-notifications .darlink-auth-flash{
    position:relative;
    top:auto;
    left:auto;
    width:100%;
    min-width:0;
    max-width:none;
    transform:none;
}

@keyframes darlink-notification-in{
    from{opacity:0;transform:translateY(-8px)}
    to{opacity:1;transform:translateY(0)}
}

@keyframes darlink-notification-out{
    from{opacity:1;transform:translateY(0)}
    to{opacity:0;transform:translateY(-8px)}
}

@keyframes darlink-notification-countdown{
    from{transform:scaleX(1)}
    to{transform:scaleX(0)}
}

@media (prefers-reduced-motion:reduce){
    .darlink-notification,
    .darlink-notification-closing,
    .darlink-notification-progress-running{
        animation:none;
    }
}
