/* RiLoGroup - VMware ESXi / vSphere Client 5.x look + Frutiger Aero gloss */

:root {
    --vmw-blue:       #1f5b9e;
    --vmw-blue-dark:  #143d6b;
    --vmw-blue-light: #4a90d9;
    --vmw-grey-bg:    #e9eef3;
    --vmw-panel:      #f4f7fa;
    --vmw-border:     #9eb3c7;
    --vmw-border-lt:  #c5d2df;
    --vmw-text:       #1d2733;
    --vmw-header-1:   #6fb0e8;
    --vmw-header-2:   #2a6db0;
    --vmw-tab-active: #ffffff;
    --aero-green:     #7ec64a;
    --aero-glass:     rgba(255, 255, 255, 0.55);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
    font-family: "Segoe UI", Tahoma, Verdana, sans-serif;
    font-size: 12px;
    color: var(--vmw-text);
    background: linear-gradient(180deg, #cdd9e5 0%, #aebfd1 55%, #8ba0b8 100%);
}

a { color: var(--vmw-blue); }

/* ---------- Top title bar (vSphere gradient) ---------- */
.vmw-titlebar {
    height: 46px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    color: #fff;
    background: linear-gradient(180deg, #5a9bd8 0%, #2f6fb0 48%, #225a96 52%, #1a4878 100%);
    border-bottom: 1px solid #0e2e52;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 1px 3px rgba(0, 0, 0, 0.4);
}
.vmw-titlebar .logo { display: flex; align-items: center; gap: 9px; }
.vmw-titlebar .app-name {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}
.vmw-titlebar .spacer { flex: 1; }
.vmw-titlebar .session {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
}
.vmw-titlebar .session a { color: #dcefff; }

/* ---------- Menu strip ---------- */
.vmw-menu {
    height: 26px;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 8px;
    background: linear-gradient(180deg, #f3f6f9 0%, #dde6ee 100%);
    border-bottom: 1px solid var(--vmw-border);
    font-size: 11px;
}
.vmw-menu span {
    padding: 3px 9px;
    border-radius: 3px;
    cursor: default;
}
.vmw-menu span:hover {
    background: linear-gradient(180deg, #fff 0%, #d5e6f7 100%);
    border: 1px solid #9fc3e8;
    padding: 2px 8px;
}

/* ---------- Main layout ---------- */
.vmw-body {
    display: flex;
    height: calc(100% - 72px);
}

/* left inventory tree */
.vmw-tree {
    width: 230px;
    min-width: 230px;
    background: linear-gradient(180deg, #fbfdff 0%, #eef3f8 100%);
    border-right: 1px solid var(--vmw-border);
    overflow: auto;
}
.vmw-tree .tree-head {
    padding: 5px 9px;
    font-weight: 600;
    color: var(--vmw-blue-dark);
    background: linear-gradient(180deg, #e6eef6 0%, #cfddeb 100%);
    border-bottom: 1px solid var(--vmw-border-lt);
}
.vmw-tree ul { list-style: none; margin: 0; padding: 4px 0; }
.vmw-tree li { padding: 0; }
.vmw-tree a.node {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 9px 4px 14px;
    text-decoration: none;
    color: var(--vmw-text);
    white-space: nowrap;
}
.vmw-tree a.node.child { padding-left: 30px; }
.vmw-tree a.node:hover { background: #dcebfb; background: #d8e8fb; }
.vmw-tree a.node.active {
    background: linear-gradient(180deg, #cfe3fa 0%, #aecdf0 100%);
    border-top: 1px solid #bcd6f2;
    border-bottom: 1px solid #8fb6e2;
}

/* right content */
.vmw-content {
    flex: 1;
    overflow: auto;
    padding: 0;
    background: var(--vmw-grey-bg);
}

/* breadcrumb + object header */
.vmw-objhead {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    background: linear-gradient(180deg, #ffffff 0%, #e7eef5 100%);
    border-bottom: 1px solid var(--vmw-border);
}
.vmw-objhead .title { font-size: 15px; font-weight: 600; color: var(--vmw-blue-dark); }
.vmw-objhead .sub { font-size: 11px; color: #5a6b7c; }

/* tabs */
.vmw-tabs {
    display: flex;
    gap: 1px;
    padding: 6px 10px 0 10px;
    background: var(--vmw-grey-bg);
    border-bottom: 1px solid var(--vmw-border);
}
.vmw-tab {
    padding: 5px 14px;
    font-size: 11px;
    cursor: pointer;
    color: #2a4763;
    background: linear-gradient(180deg, #dde7f0 0%, #c4d4e4 100%);
    border: 1px solid var(--vmw-border);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}
.vmw-tab.active {
    background: var(--vmw-tab-active);
    font-weight: 600;
    margin-bottom: -1px;
    padding-bottom: 6px;
}

/* content panels */
.vmw-panels { padding: 12px; }
.vmw-panel {
    background: var(--vmw-panel);
    border: 1px solid var(--vmw-border);
    border-radius: 5px;
    margin-bottom: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}
.vmw-panel .panel-head {
    padding: 6px 11px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(180deg, var(--vmw-header-1) 0%, var(--vmw-header-2) 100%);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
}
.vmw-panel .panel-body { padding: 11px; }

/* key/value grid */
.kv { width: 100%; border-collapse: collapse; }
.kv td { padding: 4px 8px; border-bottom: 1px solid #e2e9f0; vertical-align: top; }
.kv td.k { width: 200px; color: #54657a; }
.kv tr:last-child td { border-bottom: none; }

/* dashboard tiles */
.tiles { display: flex; flex-wrap: wrap; gap: 12px; }
.tile {
    width: 150px;
    text-align: center;
    padding: 14px 8px 12px;
    background: var(--vmw-panel);
    border: 1px solid var(--vmw-border);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    color: var(--vmw-text);
    transition: transform .08s, box-shadow .08s;
}
.tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 9px rgba(0, 0, 0, 0.22);
    background: linear-gradient(180deg, #ffffff 0%, #eaf2fb 100%);
}
.tile .label { margin-top: 8px; font-weight: 600; }
.tile .meta { color: #6a7b8c; font-size: 11px; }

/* status bar */
.vmw-status {
    height: 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 12px;
    font-size: 11px;
    color: #2a3b4c;
    background: linear-gradient(180deg, #e7edf3 0%, #cfdae6 100%);
    border-top: 1px solid var(--vmw-border);
}
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block;
       box-shadow: inset 0 1px 1px rgba(255,255,255,.7), 0 0 3px rgba(0,0,0,.2); }
.dot.green { background: radial-gradient(circle at 35% 30%, #b6f08a, var(--aero-green)); }

/* ---------- Login screen ---------- */
.login-wrap {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% -10%, rgba(255,255,255,.55), transparent 60%),
        linear-gradient(180deg, #9ec3e8 0%, #5d8fc4 45%, #2f6299 100%);
}
.login-box {
    width: 380px;
    background: linear-gradient(180deg, #fdfeff 0%, #eaf1f8 100%);
    border: 1px solid #6f93b8;
    border-radius: 10px;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
    overflow: hidden;
}
.login-box .head {
    padding: 16px 18px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 11px;
    background: linear-gradient(180deg, #5a9bd8 0%, #2f6fb0 50%, #1a4878 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.login-box .head .t { font-size: 19px; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.login-box .head .s { font-size: 11px; opacity: .9; }
.login-box .form { padding: 20px 22px 22px; }
.login-box label { display: block; margin: 0 0 4px; font-weight: 600; color: #34536f; }
.field { margin-bottom: 14px; }

input[type=text], input[type=email], input[type=password] {
    width: 100%;
    padding: 7px 9px;
    font-size: 13px;
    border: 1px solid #8ba6c1;
    border-radius: 4px;
    background: linear-gradient(180deg, #f4f8fc 0%, #ffffff 12%);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
}
input:focus {
    outline: none;
    border-color: var(--vmw-blue-light);
    box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 0 0 3px rgba(74,144,217,.3);
}

/* glossy aero button */
.btn {
    display: inline-block;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    border: 1px solid #1f5286;
    border-radius: 5px;
    background: linear-gradient(180deg, #6fb3ea 0%, #3a82c4 48%, #2f6fb0 52%, #245a93 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 1px 2px rgba(0, 0, 0, 0.3);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
}
.btn:hover { background: linear-gradient(180deg, #80c2f5 0%, #4790d2 48%, #387cbe 52%, #2c66a3 100%); }
.btn:active { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35); }
.btn.full { width: 100%; }

/* alerts */
.alert {
    padding: 8px 11px;
    border-radius: 5px;
    margin-bottom: 14px;
    font-size: 12px;
    border: 1px solid;
}
.alert.err  { background: #fde8e8; border-color: #e0a3a3; color: #8a2222; }
.alert.warn { background: #fff6db; border-color: #e3cd86; color: #7a5c12; }
.alert.ok   { background: #e7f6e2; border-color: #a9d59a; color: #2e5e22; }

.muted { color: #6a7b8c; }
.hint  { font-size: 11px; color: #6a7b8c; margin-top: 4px; }

/* ============ Portal additions ============ */
.vmw-titlebar .tagline { font-size:11px; opacity:.85; font-weight:400; margin-left:6px;
    text-shadow:0 1px 1px rgba(0,0,0,.4); }
.vmw-tree { width:248px; min-width:248px; }
.vmw-tree .tree-head { margin-top:2px; }

textarea, select {
    width:100%; padding:7px 9px; font-size:13px; font-family:inherit;
    border:1px solid #8ba6c1; border-radius:4px;
    background:linear-gradient(180deg,#f4f8fc 0%,#fff 12%);
    box-shadow:inset 0 1px 2px rgba(0,0,0,.12);
}
select:focus, textarea:focus { outline:none; border-color:var(--vmw-blue-light);
    box-shadow:inset 0 1px 2px rgba(0,0,0,.1),0 0 0 3px rgba(74,144,217,.3); }

/* data grid */
table.grid { width:100%; border-collapse:collapse; font-size:12px; }
table.grid thead th {
    text-align:left; padding:6px 10px; color:#2a4763; font-weight:600;
    background:linear-gradient(180deg,#eef4fa 0%,#d8e4f0 100%);
    border-bottom:1px solid var(--vmw-border); white-space:nowrap;
}
table.grid td { padding:5px 10px; border-bottom:1px solid #e2e9f0; vertical-align:middle; }
table.grid tbody tr:hover { background:#eef6ff; }
table.grid code { background:#eef2f6; padding:1px 4px; border-radius:3px; font-size:11px; }
.row-actions a { margin-right:8px; font-size:11px; }

/* badges */
.badge { display:inline-block; padding:1px 8px; border-radius:9px; font-size:10px; font-weight:600;
    text-transform:uppercase; letter-spacing:.3px; color:#fff; }
.b-green { background:linear-gradient(180deg,#7ec64a,#5fa72f); }
.b-amber { background:linear-gradient(180deg,#f4b942,#e08620); }
.b-red   { background:linear-gradient(180deg,#ef6a6a,#cf3434); }
.b-grey  { background:linear-gradient(180deg,#9fb0c0,#7d8c9b); }

/* KPI tiles */
.tile.kpi { width:200px; }
.tile.kpi .big { font-size:24px; font-weight:700; color:var(--vmw-blue-dark); margin-top:6px; }

/* dashboard 2-col */
.dash-cols { display:flex; gap:12px; align-items:flex-start; }
.dash-col { flex:1; min-width:0; }
@media (max-width:1100px){ .dash-cols{ flex-direction:column; } }

/* calendar */
.cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:1px; background:var(--vmw-border);
    border:1px solid var(--vmw-border); border-radius:5px; overflow:hidden; margin-bottom:12px; }
.cal-dow { background:linear-gradient(180deg,#eef4fa,#d8e4f0); padding:5px; text-align:center;
    font-weight:600; font-size:11px; color:#2a4763; }
.cal-cell { background:#fff; min-height:84px; padding:3px 4px; }
.cal-cell.empty { background:#f1f5f9; }
.cal-cell.today { background:#fff8e1; box-shadow:inset 0 0 0 2px #f4b942; }
.cal-num { font-size:11px; color:#6a7b8c; font-weight:600; }
.cal-ev { color:#fff; font-size:10px; padding:1px 4px; border-radius:3px; margin-top:2px;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:default; }

/* directory cards */
.dir-grid { display:flex; flex-wrap:wrap; gap:12px; }
.dir-card { width:210px; background:var(--vmw-panel); border:1px solid var(--vmw-border);
    border-radius:8px; padding:14px; text-align:center; box-shadow:0 1px 2px rgba(0,0,0,.12); }
.dir-ava { width:54px; height:54px; margin:0 auto 8px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    background:radial-gradient(circle at 35% 30%,#eafaff,#cfe0ee); border:1px solid #b7c4d1; }
.dir-name { font-weight:700; color:var(--vmw-blue-dark); }
.dir-title { font-size:11px; color:#54657a; margin-bottom:2px; }
.dir-co { font-size:11px; color:#2f74bb; margin-bottom:8px; }
.dir-line { font-size:11px; margin-top:3px; }

/* messages */
.msg-layout { display:flex; gap:12px; align-items:stretch; }
.msg-list { width:260px; min-width:260px; }
.msg-thread { flex:1; }
.msg-contact { display:flex; align-items:center; gap:8px; padding:8px 10px; text-decoration:none;
    color:var(--vmw-text); border-bottom:1px solid #e2e9f0; }
.msg-contact:hover { background:#eef6ff; }
.msg-contact.active { background:linear-gradient(180deg,#cfe3fa,#aecdf0); }
.msg-contact span { flex:1; font-size:12px; }
.msg-scroll { max-height:420px; overflow:auto; display:flex; flex-direction:column; gap:6px; }
.msg-bubble { max-width:70%; align-self:flex-start; background:#eef2f6; border:1px solid #d6e0ea;
    border-radius:8px; padding:6px 10px; }
.msg-bubble.mine { align-self:flex-end; background:linear-gradient(180deg,#d5ebff,#bcd9f5); border-color:#9fc3e8; }
.msg-body { font-size:12px; }
.msg-time { font-size:9px; color:#6a7b8c; margin-top:2px; text-align:right; }

/* monitoring */
.mon-grid { display:flex; flex-wrap:wrap; gap:12px; }
.mon-grid .vmw-panel { width:300px; }
.bar { display:inline-block; width:120px; height:10px; background:#e2e9f0; border-radius:5px;
    overflow:hidden; vertical-align:middle; margin-right:6px; box-shadow:inset 0 1px 2px rgba(0,0,0,.15); }
.bar-fill { height:100%; border-radius:5px; }

/* ssh */
.ssh-bar { display:flex; gap:8px; align-items:center; margin-bottom:10px; }
.ssh-bar select { width:auto; min-width:280px; }
.term { background:#0c1622; color:#7dff8a; font-family:Consolas,monospace; font-size:13px;
    padding:14px; border-radius:6px; min-height:320px; white-space:pre-wrap;
    box-shadow:inset 0 2px 8px rgba(0,0,0,.5); }

/* vault */
.secret { font-family:Consolas,monospace; letter-spacing:1px; }

/* wiki */
.wiki-body { line-height:1.55; }
.wiki-body h1 { font-size:20px; color:var(--vmw-blue-dark); border-bottom:1px solid var(--vmw-border-lt); padding-bottom:4px; }
.wiki-body h2 { font-size:16px; color:#2a4763; }
.wiki-body h3 { font-size:14px; color:#2a4763; }
.wiki-body pre { background:#0c1622; color:#9fe8ff; padding:10px; border-radius:5px; overflow:auto; }
.wiki-body code { background:#eef2f6; padding:1px 4px; border-radius:3px; }
.wiki-body li { margin-left:18px; }

/* ============ Accès rapide tiles ============ */
.ql-cat{font-size:11px;font-weight:600;color:#54657a;text-transform:uppercase;letter-spacing:.4px;margin:10px 0 6px}
.ql-cat:first-child{margin-top:0}
.ql-grid{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:6px}
.ql-tile{width:150px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;
    padding:14px 8px 10px;background:var(--vmw-panel);border:1px solid var(--vmw-border);border-radius:8px;
    text-decoration:none;color:var(--vmw-text);box-shadow:0 1px 2px rgba(0,0,0,.12);
    border-top:3px solid var(--ql,#2f6fb0);transition:transform .08s,box-shadow .08s}
.ql-tile:hover{transform:translateY(-2px);box-shadow:0 5px 12px rgba(0,0,0,.2);background:linear-gradient(180deg,#fff,#eaf2fb)}
.ql-tile .ql-ico{width:44px;height:44px;display:flex;align-items:center;justify-content:center;
    border-radius:10px;background:radial-gradient(circle at 35% 30%,#fff,#e7eef6)}
.ql-tile .ql-lbl{font-weight:600;font-size:12px;line-height:1.2}
.ql-tile .ql-sub{font-size:10px;color:#8a96a3}

/* ============ Document center UX ============ */
.doc-empty{padding:22px;text-align:center;color:#6a7b8c;background:#f0f5fa;border:1px dashed var(--vmw-border-lt);border-radius:8px;margin-bottom:12px}
.doc-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:10px}
.doc-card{position:relative;display:flex;align-items:flex-start;gap:10px;padding:11px;
    background:#fff;border:1px solid var(--vmw-border-lt);border-radius:8px;box-shadow:0 1px 2px rgba(0,0,0,.08);transition:box-shadow .1s}
.doc-card:hover{box-shadow:0 4px 10px rgba(0,0,0,.16)}
.doc-ic{width:42px;height:42px;min-width:42px;display:flex;align-items:center;justify-content:center;font-size:22px;
    border-radius:8px;background:#eef3f8}
.ic-pdf{background:#fde8e8}.ic-doc{background:#e6effb}.ic-xls{background:#e7f6e2}.ic-ppt{background:#fdeede}
.ic-img{background:#efeafb}.ic-zip{background:#f1eede}.ic-vid{background:#fde8f1}.ic-code{background:#e9eef3}
.doc-meta{flex:1;min-width:0}
.doc-meta .doc-title{font-weight:600;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.doc-info{font-size:11px;color:#6a7b8c}
.doc-actions{display:flex;flex-direction:column;gap:4px}
.btn-sm{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:24px;padding:0 6px;
    border:1px solid var(--vmw-border);background:linear-gradient(180deg,#fff,#e7eef5);border-radius:5px;
    cursor:pointer;font-size:13px;color:var(--vmw-blue-dark);text-decoration:none}
.btn-sm:hover{background:linear-gradient(180deg,#fff,#d5e6f7)}
.doc-edit{flex-basis:100%;width:100%;margin-top:8px;padding-top:8px;border-top:1px solid #eef2f6}
.lnk-del{background:none;border:none;color:#b23;cursor:pointer;font-size:11px;padding:0;text-decoration:underline}

.dropzone{border:2px dashed #9fc3e8;border-radius:10px;padding:22px;text-align:center;cursor:pointer;
    background:#f4f9ff;color:#4a6a88;margin-bottom:12px;transition:.12s}
.dropzone:hover{background:#e9f3ff;border-color:#4a90d9}
.dropzone.over{background:#dcebfb;border-color:#2f6fb0;color:#1f5a99}
.dropzone .dz-ico{font-size:28px;margin-bottom:6px}
.fold-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.fold{background:#fbfdff;border:1px solid var(--vmw-border-lt);border-radius:8px;padding:12px;text-align:center;transition:.1s}
.fold:hover{box-shadow:0 3px 8px rgba(0,0,0,.14);background:#fff}
.fold a{text-decoration:none;color:var(--vmw-text)}
.fold-ico{font-size:30px}.fold-name{font-weight:600;font-size:13px;margin-top:4px}

/* ============ Bugs & tâches (kanban) ============ */
.kanban{display:flex;gap:12px;overflow-x:auto;padding-bottom:8px}
.kan-col{flex:1;min-width:240px;background:#eef2f7;border:1px solid var(--vmw-border-lt);border-radius:8px;display:flex;flex-direction:column;max-height:calc(100vh - 220px)}
.kan-head{padding:8px 11px;font-weight:600;color:#2a4763;border-bottom:1px solid var(--vmw-border-lt);display:flex;align-items:center;gap:8px;
    background:linear-gradient(180deg,#f6f9fc,#e3ebf3);border-radius:8px 8px 0 0}
.kan-n{background:#c4d4e4;border-radius:10px;padding:0 8px;font-size:11px}
.kan-add{margin-left:auto;text-decoration:none;font-size:18px;color:#2f6fb0;line-height:1;width:22px;height:22px;text-align:center;border-radius:5px}
.kan-add:hover{background:#d5e6f7}
.kan-list{padding:8px;overflow-y:auto;flex:1;min-height:60px}
.kan-list.over{background:#dcebfb;outline:2px dashed #9fc3e8;outline-offset:-4px}
.kan-card{background:#fff;border:1px solid var(--vmw-border-lt);border-left:3px solid #9fb0c0;border-radius:6px;padding:9px 10px;margin-bottom:8px;
    box-shadow:0 1px 2px rgba(0,0,0,.1);cursor:pointer;transition:box-shadow .1s,transform .05s}
.kan-card:hover{box-shadow:0 3px 8px rgba(0,0,0,.18)}
.kan-card.dragging{opacity:.5;transform:rotate(1deg)}
.kan-card.wt-bug{border-left-color:#c50f1f}.kan-card.wt-task{border-left-color:#2f6fb0}
.kan-card.wt-imp{border-left-color:#5fa72f}.kan-card.wt-idea{border-left-color:#bf8d00}
.kc-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}
.kc-type{font-size:11px;color:#54657a}
.kc-prio{width:10px;height:10px;border-radius:50%;display:inline-block}
.kc-title{font-weight:600;font-size:13px;line-height:1.3;margin-bottom:5px}
.kc-meta{display:flex;flex-wrap:wrap;gap:6px;font-size:10px;color:#6a7b8c;margin-bottom:4px}
.kc-co{background:#eef2f6;padding:1px 6px;border-radius:8px}
.kc-due.late{color:#c50f1f;font-weight:600}
.kc-ass{font-size:10px;color:#2f6fb0;margin-top:4px}
.tag-lbl{display:inline-block;background:#e7eef6;color:#2a4763;border-radius:8px;padding:1px 7px;font-size:10px;margin:2px 2px 0 0}
.wi-cmt{border-bottom:1px solid #eef2f6;padding:7px 0;font-size:13px}
.wi-cmt-h{font-size:12px;margin-bottom:2px}

/* ============ Language switcher ============ */
.lang-switch{display:inline-flex;gap:2px;margin-right:8px}
.lang-switch a{color:#dceeff;font-size:10px;font-weight:600;padding:2px 5px;border-radius:4px;text-decoration:none;opacity:.7}
.lang-switch a:hover{opacity:1;background:rgba(255,255,255,.15)}
.lang-switch a.on{background:rgba(255,255,255,.28);opacity:1}
.login-box .head .lang-switch a{color:#fff}

/* ============ Responsive ============ */
.vmw-tree-toggle{display:none}
@media (max-width: 860px){
    html,body{font-size:13px}
    .vmw-titlebar{height:auto;flex-wrap:wrap;padding:6px 10px;gap:6px}
    .vmw-titlebar .tagline{display:none}
    .vmw-titlebar .session{font-size:11px;gap:8px;flex-wrap:wrap}
    .vmw-menu{display:none}
    .vmw-body{flex-direction:column;height:auto}
    .vmw-tree{width:100%;min-width:0;max-height:42vh;border-right:none;border-bottom:1px solid var(--vmw-border)}
    .vmw-content{height:auto}
    .vmw-tree.collapsed{display:none}
    .vmw-tree-toggle{display:inline-flex;align-items:center;gap:6px;background:rgba(255,255,255,.15);
        color:#fff;border:none;padding:5px 10px;border-radius:5px;font-size:13px;cursor:pointer}
    .vmw-objhead{flex-wrap:wrap;gap:6px}
    .vmw-objhead form{width:100%}
    .vmw-objhead input[type=text]{width:100%!important}
    .dash-cols{flex-direction:column}
    .form-grid{grid-template-columns:1fr!important}
    .panel-body{overflow-x:auto}
    table.grid{min-width:560px}
    .tile,.tile.kpi{width:calc(50% - 8px);min-width:0}
    .msg-layout{flex-direction:column}.msg-list{width:100%}
    .dir-grid .dir-card{width:calc(50% - 8px)}
}
@media (max-width: 520px){
    .tile,.tile.kpi,.dir-grid .dir-card{width:100%}
    .cal-ev{font-size:9px}
    .cal-cell{min-height:62px}
}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}

/* ============ Modal (calendrier & co) ============ */
.modal-back{position:fixed;inset:0;background:rgba(10,20,35,.5);backdrop-filter:blur(2px);
    display:flex;align-items:center;justify-content:center;z-index:1000;padding:16px}
.modal-back[hidden]{display:none}
.modal-card{background:#fff;border:1px solid var(--vmw-border);border-radius:9px;width:100%;max-width:460px;
    max-height:92vh;display:flex;flex-direction:column;overflow:hidden;
    box-shadow:0 16px 50px rgba(0,0,0,.45);animation:modalIn .12s ease-out}
@keyframes modalIn{from{transform:translateY(8px) scale(.98);opacity:.6}to{transform:none;opacity:1}}
.modal-head{display:flex;align-items:center;gap:8px;padding:10px 14px;color:#fff;
    background:linear-gradient(180deg,var(--vmw-header-1),var(--vmw-header-2));
    text-shadow:0 1px 1px rgba(0,0,0,.4);font-weight:600}
.modal-head .x{margin-left:auto;color:#fff;text-decoration:none;font-size:18px;line-height:1;opacity:.85;cursor:pointer}
.modal-head .x:hover{opacity:1}
.modal-body{padding:14px;overflow:auto}
.modal-foot{display:flex;gap:8px;align-items:center;padding:10px 14px;border-top:1px solid var(--vmw-border-lt);background:#f6f9fc}
.modal-foot .spacer{flex:1}

/* calendar interactivity */
.cal-cell{cursor:pointer;transition:background .08s}
.cal-cell:not(.empty):hover{background:#eef6ff;box-shadow:inset 0 0 0 2px #bcd6f2}
.cal-cell .cal-add{display:none;font-size:10px;color:#2f6fb0;font-weight:700}
.cal-cell:not(.empty):hover .cal-add{display:inline}
.cal-ev{cursor:pointer;transition:filter .08s,transform .08s}
.cal-ev:hover{filter:brightness(1.08);transform:translateX(1px)}

/* unread message badge in titlebar */
.nav-unread{display:inline-block;min-width:16px;padding:0 5px;border-radius:9px;background:#cf3434;color:#fff;
    font-size:10px;font-weight:700;text-align:center;line-height:16px;vertical-align:middle}
#msgLive{color:#3a8a2a}

/* ============ Pointeuse (navbar widget) ============ */
.pt-widget{display:inline-flex;align-items:center;gap:5px;background:rgba(255,255,255,.14);
    padding:3px 8px;border-radius:14px;margin-right:4px}
.pt-widget .pt-w-link{text-decoration:none;font-size:13px}
.pt-w-timer{color:#fff;font-family:Consolas,monospace;font-size:12px;font-weight:600;min-width:54px;text-align:center}
.pt-w-btn{background:rgba(255,255,255,.85);border:none;border-radius:5px;width:22px;height:20px;
    cursor:pointer;font-size:11px;line-height:1;color:#143d6b}
.pt-w-btn:hover{background:#fff}

/* pointeuse page */
.pt-state{font-size:18px;font-weight:600;color:#2a4763}
.pt-timer{font-size:46px;font-weight:700;font-family:Consolas,monospace;color:var(--vmw-blue-dark);letter-spacing:2px;margin-top:4px}
.pt-btns .btn{color:#fff;text-shadow:0 1px 1px rgba(0,0,0,.3)}

/* planning grid */
.plan-grid th,.plan-grid td{text-align:center;vertical-align:top;min-width:92px}
.plan-grid td:first-child,.plan-grid th:first-child{text-align:left;min-width:150px;position:sticky;left:0;background:#fff}
.plan-cell{padding:4px!important}
.plan-shift{background:linear-gradient(180deg,#e7f1fb,#cfe3fa);border:1px solid #aecdf0;border-radius:6px;
    padding:3px 6px;margin:2px 0;font-size:11px;display:flex;flex-direction:column;gap:1px;position:relative}
.plan-shift span{font-weight:600;color:#1f5a99}
.plan-x{position:absolute;top:1px;right:2px;background:none;border:none;color:#b23;cursor:pointer;font-size:10px;padding:0}

/* ============ Prospection ============ */
.prosp-legend{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.prosp-legend a{font-size:12px;color:#2a4763;text-decoration:none;padding:4px 9px;border:1px solid var(--vmw-border-lt);border-radius:14px;background:#fff}
.prosp-legend a.on{background:linear-gradient(180deg,#cfe3fa,#aecdf0);font-weight:600}
.prosp-legend .sw{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:4px;vertical-align:middle}
.prosp-thread{max-height:420px;overflow:auto;display:flex;flex-direction:column;gap:8px}
.prosp-msg{border:1px solid var(--vmw-border-lt);border-radius:8px;padding:8px 11px;max-width:90%}
.prosp-msg.out{align-self:flex-end;background:linear-gradient(180deg,#d5ebff,#bcd9f5);border-color:#9fc3e8}
.prosp-msg.in{align-self:flex-start;background:#f1f5f9}
.prosp-msg .pm-h{font-size:11px;color:#6a7b8c;margin-bottom:3px}
.prosp-msg .pm-b{font-size:13px;white-space:pre-wrap}

/* ============ Assistant IA ============ */
.ai-navbtn{background:linear-gradient(180deg,#6fb3ea,#2f6fb0);color:#fff;border:1px solid #1f5286;
    border-radius:13px;padding:3px 10px;font-size:12px;font-weight:600;cursor:pointer;margin-right:4px}
.ai-navbtn:hover{filter:brightness(1.08)}
.ai-panel{position:fixed;bottom:18px;right:18px;width:360px;max-width:calc(100vw - 24px);height:480px;max-height:75vh;
    background:#fff;border:1px solid var(--vmw-border);border-radius:12px;box-shadow:0 14px 44px rgba(0,0,0,.4);
    display:flex;flex-direction:column;overflow:hidden;z-index:1100}
.ai-panel[hidden]{display:none}
.ai-head{display:flex;align-items:center;gap:6px;padding:10px 14px;color:#fff;font-weight:600;
    background:linear-gradient(180deg,#2f6fb0,#1a4878)}
.ai-head .ai-x{cursor:pointer;opacity:.85}.ai-head .ai-x:hover{opacity:1}
.ai-msgs{flex:1;overflow:auto;padding:12px;display:flex;flex-direction:column;gap:8px;background:#f3f6fa}
.ai-m{max-width:85%;padding:8px 11px;border-radius:10px;font-size:13px;line-height:1.4;white-space:normal}
.ai-m.usr{align-self:flex-end;background:linear-gradient(180deg,#d5ebff,#bcd9f5);border:1px solid #9fc3e8}
.ai-m.bot{align-self:flex-start;background:#fff;border:1px solid var(--vmw-border-lt)}
.ai-in{display:flex;gap:6px;padding:9px;border-top:1px solid var(--vmw-border-lt);background:#fff}
.ai-in input{flex:1}
/* réflexion (modèles raisonnants) */
.ai-think{background:#eef2f7;border:1px solid var(--vmw-border-lt);border-radius:9px;margin-bottom:6px;overflow:hidden}
.ai-think-h{display:block;padding:5px 9px;cursor:pointer;font-weight:600;color:#46586c;font-size:12px;user-select:none}
.ai-think-h::after{content:' ▾';opacity:.6}.ai-think.collapsed .ai-think-h::after{content:' ▸'}
.ai-think-b{padding:0 9px 7px;white-space:pre-wrap;max-height:150px;overflow:auto;color:#6a7a8a;font-size:11.5px;line-height:1.4}
.ai-think.collapsed .ai-think-b{display:none}
.ai-ans{white-space:normal}
.ai-ans p{margin:.4em 0}.ai-ans p:first-child{margin-top:0}.ai-ans p:last-child{margin-bottom:0}
.ai-ans h1,.ai-ans h2,.ai-ans h3,.ai-ans h4{margin:.55em 0 .3em;line-height:1.25;font-weight:700}
.ai-ans h1{font-size:1.22em}.ai-ans h2{font-size:1.13em}.ai-ans h3{font-size:1.05em}.ai-ans h4{font-size:1em}
.ai-ans ul,.ai-ans ol{margin:.3em 0;padding-left:1.35em}.ai-ans li{margin:.15em 0}
.ai-ans code{background:#eef2f7;border:1px solid #dce3ec;border-radius:4px;padding:0 4px;font-family:Consolas,Menlo,monospace;font-size:.92em}
.ai-ans pre{background:#1e2733;color:#e6edf3;border-radius:8px;padding:9px 11px;overflow:auto;margin:.5em 0}
.ai-ans pre code{background:none;border:0;color:inherit;padding:0;font-size:.86em;white-space:pre}
.ai-ans a{color:#2f6fb0;text-decoration:underline}
.ai-ans blockquote{margin:.4em 0;padding:.2em .8em;border-left:3px solid #9fc3e8;color:#566;background:#f3f7fb}
.ai-ans hr{border:0;border-top:1px solid #cdd7e2;margin:.6em 0}
.ai-ans strong{font-weight:700}.ai-ans em{font-style:italic}
.ai-ans table{border-collapse:collapse;margin:.4em 0;font-size:.92em}
.ai-ans th,.ai-ans td{border:1px solid #cdd7e2;padding:3px 8px;text-align:left}
.ai-ans th{background:#eef2f7}
.ai-ans.ai-writing::after{content:'▋';display:inline-block;margin-left:1px;color:#2f6fb0;animation:aiCaret 1s steps(1) infinite}
@keyframes aiCaret{50%{opacity:0}}
.ai-dots{display:inline-flex;gap:4px;align-items:center}
.ai-dots i{width:6px;height:6px;border-radius:50%;background:#7d97b3;display:inline-block;animation:aiBlink 1.2s infinite ease-in-out}
.ai-dots i:nth-child(2){animation-delay:.2s}.ai-dots i:nth-child(3){animation-delay:.4s}
@keyframes aiBlink{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
@media(max-width:520px){.ai-panel{width:calc(100vw - 16px);height:70vh;right:8px;bottom:8px}}
