:root {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #f7f8ff;
    background: #0b1026;
    font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    min-height: 100vh;
    background: radial-gradient(circle at 15% 15%, rgba(72, 83, 210, .38), transparent 34%),
                radial-gradient(circle at 85% 20%, rgba(135, 67, 213, .34), transparent 32%),
                linear-gradient(135deg, #0b1026 0%, #15163c 52%, #20164b 100%);
    color: #f7f8ff;
}
button, input, textarea { font: inherit; }
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.page-wrap { width: min(1040px, calc(100% - 36px)); margin: 0 auto; flex: 1; padding: 46px 0 30px; position: relative; z-index: 1; }
.ambient { position: fixed; width: 280px; height: 280px; border-radius: 50%; filter: blur(90px); opacity: .22; pointer-events: none; }
.ambient-one { background: #536dfe; top: 10%; left: -100px; }
.ambient-two { background: #b34cf4; bottom: 0; right: -100px; }
.glass-card, .panel { background: rgba(255,255,255,.075); border: 1px solid rgba(255,255,255,.13); box-shadow: 0 24px 80px rgba(0,0,0,.25); backdrop-filter: blur(18px); }
.login-card { width: min(460px, 100%); margin: 5vh auto; padding: 42px; border-radius: 28px; }
.brand-mark { width: 62px; height: 62px; display: grid; place-items: center; font-size: 28px; border-radius: 20px; background: linear-gradient(135deg,#5d79ff,#a34eea); box-shadow: 0 12px 30px rgba(105,91,255,.35); margin-bottom: 26px; }
.eyebrow { color: #aeb9ff; letter-spacing: .16em; font-size: 10px; font-weight: 800; }
h1 { font-size: clamp(30px,5vw,42px); letter-spacing: -.04em; margin: 10px 0; }
h1 span, .brand-name span { background: linear-gradient(90deg,#91a6ff,#d5a0ff); color: transparent; background-clip: text; }
.subtitle, .welcome p { color: #b9bfdc; line-height: 1.65; margin: 0 0 28px; }
.form-group { display: flex; flex-direction: column; gap: 9px; margin: 18px 0; }
label { color: #e6e8ff; font-size: 13px; font-weight: 700; }
input, textarea { width: 100%; border: 1px solid rgba(190,198,255,.2); background: rgba(7,11,31,.48); border-radius: 13px; color: white; padding: 14px 15px; outline: none; transition: border .2s, box-shadow .2s; }
input:focus, textarea:focus { border-color: #8998ff; box-shadow: 0 0 0 3px rgba(115,131,255,.14); }
input::placeholder, textarea::placeholder { color: #777f9f; }
textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
.button { border: 0; border-radius: 12px; padding: 13px 17px; font-weight: 750; cursor: pointer; transition: transform .18s, filter .18s, background .18s; }
.button:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.08); }
.button:disabled { opacity: .4; cursor: not-allowed; }
.primary { color: white; background: linear-gradient(100deg,#526fff,#8a4de0); box-shadow: 0 10px 25px rgba(91,94,244,.23); }
.secondary { color: white; background: linear-gradient(100deg,#6750d9,#a34ed0); }
.soft { color: #dfe3ff; background: rgba(128,140,255,.17); border: 1px solid rgba(164,174,255,.2); }
.outline, .ghost { color: #d5d9f5; background: transparent; border: 1px solid rgba(190,198,255,.25); }
.full { width: 100%; margin-top: 10px; display: flex; justify-content: center; gap: 12px; }
.fine-print { color: #8991b5; font-size: 11px; line-height: 1.5; text-align: center; margin: 20px 0 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0 28px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand, .user-chip { display: flex; align-items: center; gap: 12px; }
.brand-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg,#5d79ff,#a34eea); }
.brand-name { font-size: 18px; font-weight: 850; }
.brand-caption { color: #929abd; font-size: 9px; letter-spacing: .13em; margin-top: 3px; }
.user-chip { padding: 7px 9px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 15px; }
.avatar { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: linear-gradient(135deg,#697fff,#bd67df); }
.user-details { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.user-details strong { font-size: 12px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-details small { color: #9ba4c7; font-size: 10px; }
.small { padding: 8px 11px; font-size: 11px; }
.welcome { padding: 38px 0 25px; }
.welcome h1 { font-size: clamp(28px,4vw,38px); }
.welcome p { margin: 0; }
.workspace { display: grid; gap: 17px; }
.panel { border-radius: 21px; padding: 24px; }
.intro-panel { display: flex; align-items: center; gap: 17px; }
.panel-icon { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 15px; background: rgba(126,135,255,.18); font-size: 22px; }
.panel h2 { margin: 4px 0 5px; font-size: 19px; }
.panel p { margin: 0; color: #aeb6d6; font-size: 13px; line-height: 1.6; }
.algorithm-tags { display: flex; gap: 7px; margin-left: auto; }
.algorithm-tags span, .status-pill { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: #cdd3ff; padding: 7px 10px; border: 1px solid rgba(165,174,255,.22); border-radius: 99px; background: rgba(117,130,255,.12); }
.section-heading, .result-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.status-pill { display: flex; align-items: center; gap: 7px; color: #9ce9cb; letter-spacing: 0; }
.status-pill i { width: 6px; height: 6px; border-radius: 50%; background: #5ce2a8; box-shadow: 0 0 10px #5ce2a8; }
.field-note, .result-meta { color: #8993b8; font-size: 11px; line-height: 1.5; }
.action-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin: 22px 0; }
.alert { padding: 12px 14px; border-radius: 12px; margin: 15px 0; font-size: 12px; line-height: 1.5; }
.alert.error { background: rgba(255,93,122,.12); color: #ffb2c0; border: 1px solid rgba(255,93,122,.25); }
.alert.success { background: rgba(65,218,160,.1); color: #9bf0ce; border: 1px solid rgba(65,218,160,.23); }
.result-box { padding: 18px; border-radius: 16px; background: rgba(5,9,27,.38); border: 1px solid rgba(185,194,255,.13); }
.result-heading { margin-bottom: 13px; }
.result-heading h3 { margin: 4px 0 0; font-size: 15px; }
.result-text { min-height: 115px; background: rgba(255,255,255,.035); }
.notice-panel { border: 1px solid rgba(255,197,104,.22); background: rgba(255,197,104,.07); padding: 17px 20px; border-radius: 15px; color: #ffe0a7; font-size: 12px; line-height: 1.6; }
.notice-panel p { color: #c9bdd0; margin: 5px 0 0; }
.site-footer { text-align: center; color: #707a9f; font-size: 10px; padding: 18px; }
.not-found { padding: 50px; text-align: center; }
@media (max-width: 700px) {
    .page-wrap { width: min(100% - 24px, 560px); padding-top: 20px; }
    .login-card { margin: 4vh auto; padding: 27px 22px; border-radius: 22px; }
    .topbar { align-items: flex-start; flex-direction: column; }
    .user-chip { width: 100%; }
    .user-details { flex: 1; }
    .welcome { padding: 28px 0 20px; }
    .panel { padding: 18px; }
    .intro-panel { align-items: flex-start; flex-wrap: wrap; }
    .algorithm-tags { margin-left: 65px; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .action-grid { grid-template-columns: repeat(2,1fr); }
    .action-grid .button { min-height: 50px; padding: 10px; font-size: 12px; }
}
@media (max-width: 380px) {
    .action-grid { grid-template-columns: 1fr; }
    .user-chip .small { margin-left: auto; }
}
