* { box-sizing: border-box; }
:root { color-scheme: dark; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #0b1020; color: #eef2ff; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at top left, #1b2a4a 0, #0b1020 48rem); }
.container { width: min(1100px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 32px; }
.hero { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.brand-mark { display: grid; place-items: center; width: 60px; height: 60px; flex: 0 0 60px; border-radius: 18px; background: linear-gradient(135deg, #8b5cf6, #38bdf8); color: white; font-weight: 900; letter-spacing: -1px; font-size: 21px; box-shadow: 0 12px 40px #38bdf822; }
.hero-copy { min-width: 0; }
.eyebrow { margin: 0 0 6px; color: #93c5fd; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 0; font-size: clamp(30px, 5vw, 40px); letter-spacing: -.04em; }
.subtitle { margin: 6px 0 0; color: #a5b4fc; }
.server-status { display: flex; align-items: center; gap: 9px; margin-left: auto; padding: 10px 13px; border: 1px solid #34d39930; border-radius: 99px; color: #a7f3d0; background: #064e3b30; white-space: nowrap; font-size: 12px; font-weight: 700; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 12px #34d39980; }
.main-nav { display: flex; gap: 8px; padding: 5px; width: fit-content; border: 1px solid #ffffff12; border-radius: 14px; background: #11182799; margin-bottom: 32px; }
.nav-link { padding: 10px 15px; border-radius: 10px; color: #94a3b8; text-decoration: none; font-size: 13px; font-weight: 700; }
.nav-link:hover, .nav-link.active { color: #f8fafc; background: #33415599; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-heading h2 { margin: 0; font-size: 23px; letter-spacing: -.03em; }
.refresh-info { display: flex; align-items: center; gap: 12px; color: #64748b; font-size: 11px; }
.panel { border: 1px solid #ffffff14; border-radius: 20px; background: #111a2dcc; box-shadow: 0 20px 70px #0002; }
.system-banner { display: flex; align-items: center; gap: 16px; padding: 20px 22px; margin-bottom: 14px; }
.system-avatar { display: grid; place-items: center; flex: 0 0 46px; height: 46px; border-radius: 15px; background: #6366f11c; color: #a5b4fc; font-size: 26px; }
.system-details { min-width: 0; }
.system-details h3, .upload-panel h3 { margin: 0 0 5px; font-size: 16px; }
.muted { color: #94a3b8; }
.system-details p { margin: 0; font-size: 12px; }
.system-uptime { margin-left: auto; display: flex; flex-direction: column; gap: 5px; text-align: right; font-size: 11px; }
.system-uptime strong { color: #e2e8f0; font-size: 14px; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { padding: 19px; min-width: 0; }
.metric-top { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.metric-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; font-size: 22px; }
.cpu-icon { color: #c4b5fd; background: #8b5cf622; }.ram-icon { color: #7dd3fc; background: #0ea5e922; }.disk-icon { color: #6ee7b7; background: #10b98122; }.temp-icon { color: #fcd34d; background: #f59e0b22; }
.metric-label { color: #cbd5e1; font-size: 12px; font-weight: 700; }
.metric-value { display: flex; align-items: baseline; gap: 4px; margin-bottom: 16px; }
.metric-value strong { font-size: 32px; letter-spacing: -.05em; font-weight: 750; }
.metric-value span { color: #94a3b8; font-size: 13px; }
.meter { height: 6px; overflow: hidden; border-radius: 99px; background: #ffffff12; }
.meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8b5cf6, #38bdf8); transition: width .4s ease; }
#ram-meter { background: linear-gradient(90deg, #0ea5e9, #38bdf8); } #disk-meter { background: linear-gradient(90deg, #059669, #6ee7b7); }
.metric-detail { min-height: 16px; margin: 12px 0 0; color: #94a3b8; font-size: 11px; overflow-wrap: anywhere; }
.temp-note { min-height: 6px; color: #fcd34d; font-size: 11px; }
.dashboard-note { color: #64748b; font-size: 11px; line-height: 1.6; margin: 14px 2px 0; }
.status { min-height: 18px; margin: 12px 0 0; font-size: 13px; color: #a5b4fc; }.status.error { color: #fca5a5; }
.button-secondary { color: #cbd5e1; background: #ffffff10; border: 1px solid #ffffff14; border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; white-space: nowrap; }
.page-section[hidden] { display: none !important; }
.page-section { animation: page-in .22s ease-out; }
@keyframes page-in { from { opacity: .65; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.intro-note { margin: 0; }
.home-banner { margin-bottom: 18px; }
.home-banner .system-uptime strong { display: flex; align-items: center; gap: 8px; }
.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.app-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-height: 235px; padding: 23px; overflow: hidden; border: 1px solid #ffffff14; border-radius: 20px; background: linear-gradient(145deg, #17233bdf, #111827e8); color: #eef2ff; text-decoration: none; box-shadow: 0 18px 50px #0002; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.app-tile::after { content: ""; position: absolute; width: 170px; height: 170px; right: -70px; top: -75px; border-radius: 50%; background: var(--tile-glow, #6366f1); opacity: .12; filter: blur(2px); pointer-events: none; }
.app-tile[href]:hover { transform: translateY(-3px); border-color: #93c5fd70; background: linear-gradient(145deg, #1e2d4a, #111827); }
.app-tile:focus-visible { outline: 2px solid #60a5fa; outline-offset: 3px; }
.tile-files { --tile-glow: #8b5cf6; }.tile-monitoring { --tile-glow: #0ea5e9; }
.tile-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 19px; border-radius: 14px; background: #8b5cf626; color: #c4b5fd; font-size: 28px; }
.tile-monitoring .tile-icon { background: #0ea5e926; color: #7dd3fc; }
.tile-tag { margin-bottom: 7px; color: #93c5fd; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.app-tile strong { margin-bottom: 8px; font-size: 21px; letter-spacing: -.03em; }
.tile-description { max-width: 38ch; color: #a5b4c7; font-size: 13px; line-height: 1.6; }
.tile-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin-top: auto; padding-top: 22px; color: #c4b5fd; font-size: 12px; font-weight: 750; }
.tile-monitoring .tile-footer { color: #7dd3fc; }
.files-section { margin-top: 0; scroll-margin-top: 20px; }
.upload-panel { padding: 22px; margin-bottom: 14px; }.upload-panel h3 { margin-bottom: 15px; }
.drop-zone { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 16px; border: 1px dashed #64748b; border-radius: 16px; background: #0b102080; cursor: pointer; text-align: center; }
.drop-zone:hover, .drop-zone.dragging { border-color: #60a5fa; background: #1d4ed81c; }.drop-zone input { max-width: 100%; margin-top: 8px; color: #cbd5e1; }
.upload-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: #2563eb2b; color: #93c5fd; font-size: 25px; }
#file-name { color: #94a3b8; font-size: 13px; }
#upload-button { width: 100%; margin-top: 12px; color: white; background: linear-gradient(90deg, #7c3aed, #2563eb); border: 0; border-radius: 11px; padding: 12px 18px; font: inherit; font-weight: 750; cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }.files-list { display: grid; gap: 10px; }
.file-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border: 1px solid #ffffff12; border-radius: 16px; background: #111a2dcc; }
.file-info { min-width: 0; }.file-name { overflow-wrap: anywhere; margin: 0 0 5px; font-weight: 700; }.file-meta { margin: 0; color: #94a3b8; font-size: 12px; }
.file-actions { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }.file-actions a, .file-actions button { display: inline-flex; align-items: center; justify-content: center; padding: 9px 12px; border: 0; border-radius: 10px; font: inherit; font-size: 12px; font-weight: 700; text-decoration: none; cursor: pointer; }
.download-link { color: white; background: #2563eb; }.qr-button { color: #e2e8f0; background: #ffffff12; }.delete-button { color: #fecaca; background: #7f1d1d66; }
footer { padding-top: 38px; text-align: center; color: #64748b; font-size: 12px; }
@media (max-width: 900px) { .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tile-grid { grid-template-columns: 1fr; }.app-tile { min-height: 215px; }.container { padding-top: 28px; }.hero { flex-wrap: wrap; }.server-status { margin-left: 0; }.section-heading { align-items: flex-start; }.dashboard-heading { flex-direction: column; }.refresh-info { width: 100%; justify-content: space-between; }.system-banner { flex-wrap: wrap; }.system-uptime { width: 100%; margin-left: 62px; text-align: left; }.metrics-grid { gap: 10px; }.metric-card { padding: 14px; }.metric-value strong { font-size: 28px; }.file-card { align-items: flex-start; flex-direction: column; }.file-actions { width: 100%; } }


/* Authentification et gestion des comptes — v0.4 */
[hidden] { display: none !important; }
.auth-screen { width: min(520px, 100%); margin: 8vh auto; padding: clamp(24px, 5vw, 42px); text-align: center; }
.auth-mark { margin: 0 auto 22px; }
.auth-screen h1 { font-size: clamp(28px, 5vw, 38px); }
.auth-screen .subtitle { margin-bottom: 26px; }
.auth-form { display: grid; gap: 16px; margin-top: 24px; text-align: left; }
.auth-form > label, .user-create-form > label, .user-edit-grid > label { display: grid; gap: 7px; color: #cbd5e1; font-size: 13px; font-weight: 650; }
.auth-form input, .user-create-form input, .user-create-form select, .user-edit-grid input:not([type="checkbox"]), .user-edit-grid select {
  width: 100%; min-width: 0; border: 1px solid #ffffff24; border-radius: 10px; padding: 12px 13px;
  background: #080e1d; color: #f8fafc; font: inherit; outline: none;
}
.auth-form input:focus, .user-create-form input:focus, .user-create-form select:focus, .user-edit-grid input:focus, .user-edit-grid select:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px #3b82f633; }
.auth-form button, .user-create-form > button { color: white; background: linear-gradient(90deg, #7c3aed, #2563eb); }
.setup-notice { padding: 12px 14px; border-radius: 10px; background: #1d4ed81a; color: #bfdbfe; font-size: 13px; line-height: 1.5; }
.header-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; margin-left: auto; }
.account-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.server-status { margin-left: 0; }
.current-user { color: #cbd5e1; font-size: 12px; }
.profile-link { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border: 1px solid transparent; border-radius: 9px; text-decoration: none; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.profile-link::before { content: "♙"; color: #a5b4fc; font-size: 14px; }
.profile-link:hover, .profile-link.active { color: #f8fafc; background: #33415599; border-color: #ffffff14; }
.profile-link:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }
.main-nav [hidden], .tile-grid [hidden] { display: none !important; }
.user-create-form { display: grid; gap: 16px; }
.permissions-fieldset { display: flex; flex-wrap: wrap; gap: 12px 18px; margin: 0; padding: 14px; border: 1px solid #ffffff20; border-radius: 12px; }
.permissions-fieldset legend { padding: 0 6px; color: #94a3b8; font-size: 12px; }
.permission-check { display: inline-flex; align-items: center; gap: 7px; color: #cbd5e1; font-size: 13px; cursor: pointer; }
.permission-check input { width: 16px; height: 16px; accent-color: #8b5cf6; }
.users-heading { margin-top: 36px; }
.users-list { display: grid; gap: 14px; }
.user-card { display: grid; gap: 18px; }
.user-card h3 { margin: 0 0 5px; overflow-wrap: anywhere; }
.user-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.user-edit-grid .permissions-fieldset { grid-column: 1 / -1; }
.user-edit-grid .permissions-fieldset[hidden] { display: none !important; }
.user-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.user-actions button { color: #e2e8f0; background: #ffffff12; border: 1px solid #ffffff14; }
.user-actions .delete-button { color: #fecaca; background: #7f1d1d66; }
@media (max-width: 700px) {
  .hero { align-items: flex-start; flex-wrap: wrap; }
  .header-actions { width: 100%; justify-content: flex-start; margin-left: 0; }.account-stack { align-items: flex-start; }
  .user-edit-grid { grid-template-columns: 1fr; }
  .user-edit-grid .permissions-fieldset { grid-column: auto; }
}

.tile-admin { --tile-glow: #a78bfa; }
.tile-admin .tile-icon { background: #8b5cf626; color: #c4b5fd; }
.tile-admin .tile-footer { color: #c4b5fd; }

.empty-tiles { padding: 22px; margin-top: 16px; color: #cbd5e1; line-height: 1.6; }
