/* Thème TMK pour Tactical RMM (Quasar) à l'image de tmktools.com : fond nuit #0f172a → #1e1b4b
   (clair : #f0f9ff → #e0e7ff), halos ciel / violet / rose, verre dépoli, accent ciel, Inter.
   Injecté par le nginx de l'hôte (sub_filter) dans les pages HTML de rmm.tmktools.com (MeshCentral : mesh-theme/). */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

:root {
    --tmk-night-1: #0f172a;
    --tmk-night-2: #1e1b4b;
    --tmk-sky: #38bdf8;
    --tmk-sky-strong: #0284c7;
    --tmk-violet: #a855f7;
    --tmk-pink: #ec4899;
    --tmk-glass: rgba(255, 255, 255, 0.06);
    --tmk-glass-border: rgba(255, 255, 255, 0.12);
    --tmk-line: rgba(148, 163, 184, 0.16);
    --tmk-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --tmk-logo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%2338bdf8'/%3E%3Cstop offset='.55' stop-color='%23a855f7'/%3E%3Cstop offset='1' stop-color='%23ec4899'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='64' height='64' rx='16' fill='url(%23g)'/%3E%3Ctext x='32' y='41' text-anchor='middle' font-family='Inter,Arial,sans-serif' font-size='22' font-weight='700' fill='white'%3ETMK%3C/text%3E%3C/svg%3E");

    --q-primary: #0284c7;
    --q-secondary: #7c3aed;
    --q-accent: #db2777;
    --q-info: #38bdf8;
    --q-positive: #16a34a;
    --q-negative: #dc2626;
    --q-warning: #d97706;
    --q-dark-page: #0f172a;
    --q-dark: #141d33;
}

body, .q-btn, .q-field, .q-item, .q-table, .q-tab, .q-menu, .q-dialog, button, input, select, textarea {
    font-family: var(--tmk-font) !important;
}
body { -webkit-font-smoothing: antialiased; }

/* ---------- Tactical RMM : barre du haut ---------- */
.q-layout--standard > .q-header {
    background: linear-gradient(90deg, var(--tmk-night-1), var(--tmk-night-2)) !important;
    border-bottom: 1px solid var(--tmk-glass-border);
    box-shadow: 0 4px 24px rgba(2, 6, 23, 0.35);
}
.q-layout--standard > .q-header .q-toolbar { min-height: 56px; }
.q-layout--standard > .q-header .q-toolbar__title {
    font-size: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.q-layout--standard > .q-header .q-toolbar__title::before {
    content: "TMK Tools RMM";
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    padding-left: 40px;
    line-height: 30px;
    background: var(--tmk-logo) left center / 30px 30px no-repeat;
}
.q-layout--standard > .q-header .q-toolbar__title .text-overline {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1;
    margin-left: 0 !important;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--tmk-sky);
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
}
.q-layout--standard > .q-header .q-chip { background: rgba(255, 255, 255, 0.08) !important; color: #f8fafc; }
.q-layout--standard > .q-header .q-btn { border-radius: 10px; }

/* Barre de menus File / View / Agents… */
.q-page > .q-pb-sm > .q-bar {
    background: transparent !important;
    border-bottom: 1px solid var(--tmk-line);
    padding: 0 8px;
}
.q-page > .q-pb-sm > .q-bar .q-btn { font-weight: 500; text-transform: none; border-radius: 8px; opacity: 0.88; }
.q-page > .q-pb-sm > .q-bar .q-btn:hover { opacity: 1; }

/* ---------- Commun ---------- */
.q-btn { border-radius: 10px; letter-spacing: 0.01em; }
.q-btn--standard.bg-primary, .q-btn--unelevated.bg-primary {
    background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}
.q-card { border-radius: 14px !important; }
.q-menu { border-radius: 12px !important; box-shadow: 0 12px 32px rgba(2, 6, 23, 0.35) !important; }
.q-dialog__inner > .q-card { box-shadow: 0 24px 64px rgba(2, 6, 23, 0.45) !important; }
.q-field--outlined .q-field__control { border-radius: 10px; }
.q-field--filled .q-field__control { border-radius: 10px 10px 0 0; }
.q-tab { text-transform: none; font-weight: 500; }
.q-tab--active { color: var(--tmk-sky-strong) !important; }
.q-tab__indicator { height: 3px; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, var(--tmk-sky), var(--tmk-violet)); }
.q-table th { font-weight: 600; letter-spacing: 0.02em; }
.q-splitter__separator { background: var(--tmk-line) !important; }
.q-tree__node-header { border-radius: 8px; }
.q-item.q-router-link--active, .q-item--active { color: var(--tmk-sky-strong) !important; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.35); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }

/* ---------- Mode sombre ---------- */
.body--dark {
    background: radial-gradient(1200px 600px at 100% -10%, rgba(168, 85, 247, 0.10), transparent 60%),
                radial-gradient(900px 500px at -10% 110%, rgba(56, 189, 248, 0.08), transparent 60%),
                var(--tmk-night-1) !important;
    color: #e2e8f0;
}
.body--dark .q-tab--active, .body--dark .q-item.q-router-link--active, .body--dark .q-item--active { color: var(--tmk-sky) !important; }
.body--dark .q-page-container, .body--dark .q-page, .body--dark .q-bar--dark,
.body--dark .q-splitter--dark, .body--dark .table-bgcolor-dark, .body--dark .q-table__card--dark,
.body--dark .q-layout--containerized, .body--dark .q-layout--containerized .q-page-container {
    background: transparent !important;
}
.body--dark .q-splitter__before .q-tree, .body--dark .q-splitter__before .q-list { color: #cbd5e1; }
.body--dark .q-table thead tr, .body--dark .q-table thead th { background: #111a2e !important; }
.body--dark .q-table thead th { color: #94a3b8; border-bottom: 1px solid var(--tmk-line) !important; }
.body--dark .q-table tbody td { border-color: var(--tmk-line) !important; }
.body--dark .q-table tbody tr:hover > td { background: rgba(56, 189, 248, 0.06); }
.body--dark .q-table__bottom { border-top: 1px solid var(--tmk-line); color: #94a3b8; }
.body--dark .q-layout--containerized > .q-header.bg-dark {
    background: rgba(15, 23, 42, 0.6) !important;
    border-top: 1px solid var(--tmk-line);
    border-bottom: 1px solid var(--tmk-line);
    backdrop-filter: blur(8px);
}
.body--dark .q-card--dark, .body--dark .q-menu--dark {
    background: rgba(20, 29, 51, 0.92) !important;
    border: 1px solid var(--tmk-glass-border);
    backdrop-filter: blur(14px);
}
.body--dark .q-field--outlined .q-field__control:before { border-color: rgba(148, 163, 184, 0.3); }
.body--dark .q-field--filled .q-field__control { background: rgba(255, 255, 255, 0.06); }

/* ---------- Mode clair ---------- */
.body--light { background: #f8fafc; color: #0f172a; }
.body--light .q-page > .q-pb-sm > .q-bar { background: #ffffff !important; }
.body--light .q-splitter__before { background: #ffffff; }
.body--light .q-table thead tr, .body--light .q-table thead th { background: #f1f5f9 !important; }
.body--light .q-table thead th { color: #475569; }
.body--light .q-table tbody tr:hover > td { background: #f0f9ff; }
.body--light .q-layout--containerized > .q-header { background: #ffffff !important; color: #0f172a !important; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; }
.body--light .q-card { border: 1px solid #e2e8f0; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08); }

/* ---------- Tactical RMM : connexion (2FA, assistant initial) ---------- */
.q-page.bg-image, #q-app .q-layout--standard:not(:has(.q-header)) .q-page {
    background:
        radial-gradient(520px 420px at 12% 18%, rgba(56, 189, 248, 0.35), transparent 70%),
        radial-gradient(560px 460px at 88% 22%, rgba(168, 85, 247, 0.35), transparent 70%),
        radial-gradient(520px 420px at 60% 95%, rgba(236, 72, 153, 0.25), transparent 70%),
        linear-gradient(135deg, var(--tmk-night-1), var(--tmk-night-2)) !important;
}
.body--light .q-page.bg-image, .body--light #q-app .q-layout--standard:not(:has(.q-header)) .q-page {
    background:
        radial-gradient(520px 420px at 12% 18%, rgba(14, 165, 233, 0.25), transparent 70%),
        radial-gradient(560px 460px at 88% 22%, rgba(124, 58, 237, 0.22), transparent 70%),
        radial-gradient(520px 420px at 60% 95%, rgba(219, 39, 119, 0.18), transparent 70%),
        linear-gradient(135deg, #f0f9ff, #e0e7ff) !important;
}
.q-page.bg-image > .q-card,
#q-app .q-layout--standard:not(:has(.q-header)) .q-page .q-card {
    width: min(420px, calc(100vw - 32px)) !important;
    padding: 12px 8px 8px;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35) !important;
    backdrop-filter: blur(18px);
    color: #f8fafc;
}
.body--light .q-page.bg-image > .q-card,
.body--light #q-app .q-layout--standard:not(:has(.q-header)) .q-page .q-card {
    background: rgba(255, 255, 255, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12) !important;
    color: #0f172a;
}
.q-page.bg-image .text-h4 {
    font-size: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.q-page.bg-image .text-h4::before {
    content: "";
    width: 56px;
    height: 56px;
    margin-bottom: 8px;
    background: var(--tmk-logo) center / contain no-repeat;
    filter: drop-shadow(0 6px 18px rgba(168, 85, 247, 0.45));
}
.q-page.bg-image .text-h4::after {
    content: "TMK Tools RMM";
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.q-page.bg-image .q-card__section:first-child::after {
    content: "Supervision et télémaintenance · propulsé par Tactical RMM";
    display: block;
    text-align: center;
    font-size: 13px;
    opacity: 0.7;
    margin-top: 4px;
}
.q-page.bg-image .q-field--filled .q-field__control { background: rgba(255, 255, 255, 0.08) !important; }
.body--light .q-page.bg-image .q-field--filled .q-field__control { background: rgba(255, 255, 255, 0.75) !important; }
.q-page.bg-image .q-btn { height: 44px; font-weight: 600; }
