@font-face { font-family: "Elms"; src: url("../fonts/elmssans.ttf"); font-weight: normal; font-style: normal; } *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } /* ── Variabili tema ── */ :root { --bg: black; --foreground: white; --foreground-secondary: #999999; --foreground-tertiary: #404040; --foreground-quaternary: #262626; --primary: #51d5ff; --secondary: rgb(81, 213, 255, 0.3); --tertiary: rgb(81, 213, 255, 0.18); --hover: #3b7de8; --active: #2f6dd4; --danger: #de090d; --warning: #ff8306; --success: #06ff13; --box-shadow: 0 8px 32px var(--tertiary), 0 0 0 1px var(--foreground-quaternary); } @media (prefers-color-scheme: light) { :root { --bg: white; --foreground: black; --foreground-secondary: rgb(60, 60, 67, 0.6); --foreground-tertiary: rgb(60, 60, 67, 0.3); --foreground-quaternary: rgb(60, 60, 67, 0.18); --primary: #00559d; --secondary: rgb(0, 85, 157, 0.3); --tertiary: rgb(0, 85, 157, 0.18); --hover: #056ac0; --active: #1355c1; --danger: #de090d; --warning: #ff8306; --success: #06ff13; --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--foreground-quaternary); } } /* ── Sfondo animato ── */ @keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } body { font-family: "Elms", sans-serif; min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--foreground); background-size: 400% 400%; animation: gradientShift 12s ease infinite; } /* ════════════════════════════════════════════════════════════ COMPONENTI CONDIVISI ════════════════════════════════════════════════════════════ */ .card { user-select: none; -webkit-user-select: none; background: var(--bg); border: none; border-radius: 16px; padding: 28px; box-shadow: var(--box-shadow); } .card-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; } .card-header h2 { font-size: 16px; font-weight: 500; color: var(--foreground); } .muted { font-size: 13px; color: var(--foreground-secondary); } .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; } .badge { font-size: 10px; padding: 2px 8px; border-radius: 10px; background: var(--primary); color: var(--bg); text-transform: uppercase; letter-spacing: 0.5px; } /* ── Input condiviso ── */ .input-group { user-select: none; -webkit-user-select: none; display: flex; flex-direction: column; gap: 6px; } .input-group label { font-size: 13px; color: var(--foreground-tertiary); letter-spacing: 0.3px; } .input-group input { width: 100%; padding: 12px 14px; background: var(--bg); border: 0.4px solid var(--foreground-tertiary); border-radius: 10px; color: var(--foreground); font-family: "Elms", sans-serif; font-size: 15px; outline: none; transition: border-color 0.2s; } .input-group input::placeholder { color: var(--foreground-tertiary); } .input-group input:focus { border-color: var(--primary); } .error-message { font-size: 13px; color: var(--danger); min-height: 18px; } /* ── Animazioni bottoni ── */ @keyframes btnPulse { 0% { box-shadow: 0 0 0 0 var(--secondary); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } } @keyframes btnSpin { to { transform: rotate(360deg); } } /* ── Bottone ghost (es. logout, revoca) ── */ .btn-ghost { padding: 8px 16px; background: transparent; color: var(--foreground); border: 0.4px solid var(--foreground-tertiary); border-radius: 10px; cursor: pointer; font-family: "Elms", sans-serif; font-size: 13px; transition: border-color 0.15s, color 0.15s; } .btn-ghost:hover { border-color: var(--danger); color: var(--danger); } /* ════════════════════════════════════════════════════════════ PAGINA LOGIN ════════════════════════════════════════════════════════════ */ .login-container { width: 100%; max-width: 400px; padding: 48px 40px; background: var(--bg); border: none; border-radius: 16px; box-shadow: var(--box-shadow); } .login-logo { font-size: 12px; font-weight: bold; letter-spacing: 4px; color: var(--primary); text-transform: uppercase; margin-bottom: 28px; } .login-container h1 { font-size: 26px; color: var(--foreground); margin-bottom: 6px; } .login-container > p { font-size: 14px; color: var(--foreground-secondary); margin-bottom: 32px; line-height: 1.5; } .login-form { display: flex; flex-direction: column; gap: 20px; } .btn-login { width: 100%; padding: 13px; background: var(--primary); color: var(--bg); border: none; border-radius: 10px; font-family: "Elms", sans-serif; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: opacity 0.2s, transform 0.15s; } .btn-login:hover { opacity: 0.85; transform: translateY(-1px); } .btn-login:active { opacity: 1; transform: translateY(0); animation: btnPulse 0.4s ease-out; } .btn-login:disabled { opacity: 0.5; cursor: not-allowed; transform: none; } .btn-spinner { width: 16px; height: 16px; border: 2px solid rgba(0, 0, 0, 0.25); border-top-color: var(--bg); border-radius: 50%; animation: btnSpin 0.7s linear infinite; display: none; flex-shrink: 0; } .btn-login.loading .btn-spinner { display: block; } .btn-login.loading .btn-label { opacity: 0.8; } /* ════════════════════════════════════════════════════════════ PAGINA PROFILO ════════════════════════════════════════════════════════════ */ body.page-profile { display: block; } .profile-shell { max-width: 960px; margin: 0 auto; padding: 32px 20px 80px; } /* ── Topbar ── */ .profile-topbar { display: flex; align-items: center; gap: 16px; padding-bottom: 24px; border-bottom: 0.4px solid var(--foreground-tertiary); margin-bottom: 32px; } .profile-brand { font-size: 12px; font-weight: bold; letter-spacing: 4px; color: var(--primary); text-transform: uppercase; flex-shrink: 0; } .profile-nav { display: flex; gap: 8px; flex: 1; } .nav-link { padding: 6px 14px; border-radius: 8px; border: 0.4px solid var(--foreground-tertiary); color: var(--foreground); text-decoration: none; font-size: 13px; transition: border-color 0.15s, transform 0.1s; } .nav-link:hover { border-color: var(--primary); transform: translateY(-1px); } /* ── Main grid ── */ .profile-main { display: grid; gap: 20px; } /* ── Hero ── */ .profile-hero { display: flex; align-items: center; gap: 20px; } .avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--primary); color: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: bold; flex-shrink: 0; } .hero-info h1 { font-size: 22px; color: var(--foreground); margin-bottom: 4px; } /* ── Sessioni ── */ .sessions-list { display: flex; flex-direction: column; gap: 10px; } .session-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 0.4px solid var(--foreground-tertiary); border-radius: 10px; background: var(--bg); transition: border-color 0.15s; } .session-row.is-current { border-color: var(--primary); } .session-info { flex: 1; min-width: 0; } .session-title { font-size: 14px; color: var(--foreground); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; } .session-meta { font-size: 12px; line-height: 1.6; color: var(--foreground-secondary); } .btn-revoke { padding: 6px 14px; background: transparent; color: var(--danger); border: 0.4px solid var(--foreground-tertiary); border-radius: 8px; cursor: pointer; font-family: "Elms", sans-serif; font-size: 12px; flex-shrink: 0; transition: background 0.15s, border-color 0.15s; } .btn-revoke:hover:not(:disabled) { background: rgba(222, 9, 13, 0.08); border-color: var(--danger); } .btn-revoke:disabled { opacity: 0.5; cursor: wait; } /* ── Griglia chiave/valore ── */ .kv-grid { display: grid; grid-template-columns: 180px 1fr; gap: 12px 20px; font-size: 13px; } .kv-grid dt { color: var(--foreground-tertiary); } .kv-grid dd { color: var(--foreground); } /* ── Toast ── */ .toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); padding: 12px 20px; border-radius: 10px; background: var(--foreground-quaternary); border: 0.4px solid var(--foreground-tertiary); color: var(--foreground); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; font-size: 13px; white-space: nowrap; } .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); } .toast.ok { border-color: var(--success); } .toast.err { border-color: var(--danger); } /* ── Responsive ── */ @media (max-width: 600px) { .profile-topbar { flex-wrap: wrap; gap: 12px; } .profile-nav { order: 3; width: 100%; } .profile-hero { flex-direction: column; text-align: center; } .kv-grid { grid-template-columns: 1fr; gap: 4px 0; } .kv-grid dt { margin-top: 12px; font-size: 11px; } .session-row { flex-direction: column; align-items: stretch; } .btn-revoke { width: 100%; text-align: center; } }