/* The dashboard keeps its existing layout; these selectors belong to the authentication view. */
html[data-drive-auth] { color-scheme: light; }
#drive-entry[hidden], #drive-entry [hidden], #app[hidden] { display: none !important; }
html[data-drive-auth], html[data-drive-auth] body { margin: 0; min-height: 100%; background: #f6f8fc; }
.drive-decoration { display: none; }
html[data-drive-auth] .drive-decoration { display: block; color: #172341; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; }
html[data-drive-auth] body { background: radial-gradient(ellipse at 20% 44%, #eaf0ff 0, transparent 49%), #f6f8fc; }
html[data-drive-auth] #app { min-height: 100svh; }
.drive-header { position: absolute; z-index: 2; top: 34px; left: max(48px, calc((100vw - 1240px) / 2)); right: max(48px, calc((100vw - 1240px) / 2)); display: flex; justify-content: space-between; align-items: center; }
.drive-brand { display: flex; align-items: center; gap: 12px; font-size: 23px; font-weight: 650; letter-spacing: .05em; }
.drive-brand img { width: 40px; height: 40px; }
.drive-header-note { color: #8b94a6; font-size: 13px; letter-spacing: .06em; }
.drive-showcase { position: absolute; z-index: 1; top: 50%; left: max(64px, calc((100vw - 1208px) / 2)); width: 520px; transform: translateY(-47%); pointer-events: none; }
.drive-eyebrow { display: inline-flex; align-items: center; gap: 9px; color: #7483a6; font-size: 11px; font-weight: 600; letter-spacing: .2em; }
.drive-eyebrow > span { width: 6px; height: 6px; border-radius: 50%; background: #8199f4; }
.drive-showcase h2 { margin: 21px 0 20px; font-size: clamp(36px, 3.65vw, 52px); line-height: 1.37; letter-spacing: -.045em; font-weight: 650; }
.drive-showcase h2 > span { color: #5d79ef; }
.drive-showcase > p { margin: 0; color: #8a94a8; font-size: 15px; line-height: 1.9; letter-spacing: .025em; }
.drive-file-scene { position: relative; width: 490px; height: 260px; margin-top: 16px; }
.drive-orbit { position: absolute; border: 1px solid #e0e7f5; border-radius: 50%; transform: rotate(-16deg); }
.drive-orbit-one { width: 402px; height: 185px; left: 18px; top: 42px; }
.drive-orbit-two { width: 287px; height: 129px; left: 73px; top: 69px; border-style: dashed; opacity: .8; }
.drive-folder { position: absolute; width: 168px; height: 133px; top: 68px; left: 124px; transform: rotate(-9deg); }
.drive-folder-back { position: absolute; inset: 0; border-radius: 11px 15px 13px 13px; background: #7f9bff; box-shadow: 0 20px 35px #7b96e520; }
.drive-folder-back::before { content: ''; position: absolute; top: -12px; left: 0; width: 71px; height: 25px; border-radius: 10px 12px 0 0; background: #7f9bff; }
.drive-paper { position: absolute; left: 16px; right: 14px; top: -7px; height: 103px; border: 1px solid #e7ecfa; border-radius: 9px; background: linear-gradient(140deg, #fff, #f0f4ff); transform: rotate(9deg); padding: 21px; box-sizing: border-box; }
.drive-paper i { display: block; height: 5px; background: #dfe6f8; border-radius: 4px; margin-bottom: 10px; }
.drive-paper i:nth-child(2) { width: 78%; }.drive-paper i:nth-child(3) { width: 55%; }
.drive-folder-front { position: absolute; inset: 29px -6px -4px 0; border: 1px solid #a4b9ff; border-radius: 13px; background: linear-gradient(130deg, #bdceff, #8aa9ff); transform: skewX(-8deg); display: grid; place-items: center; box-shadow: 0 20px 35px #8ca2e51a; }
.drive-folder-front svg { width: 65px; height: 48px; color: #edf3ff; transform: skewX(8deg); }
.drive-file { position: absolute; z-index: 2; width: 199px; height: 68px; box-sizing: border-box; display: flex; align-items: center; gap: 11px; padding: 12px 14px; background: #ffffffed; border: 1px solid #e8edf7; border-radius: 13px; box-shadow: 0 13px 35px #3448790b; }
.drive-file-photo { top: 20px; left: 234px; transform: rotate(6deg); }
.drive-file-doc { top: 169px; left: 10px; transform: rotate(-5deg); }
.drive-file-icon { flex-shrink: 0; width: 36px; height: 40px; border-radius: 9px; display: grid; place-items: center; }.drive-file-icon svg { width: 24px; height: 24px; }
.drive-file-icon.photo { background: #edf7f1; color: #69a788; }.drive-file-icon.doc { background: #edf2ff; color: #7189d5; }
.drive-file strong { display: block; font-size: 12px; font-weight: 600; letter-spacing: .02em; }.drive-file div > span { display: block; margin-top: 5px; font-size: 9px; color: #a0a8b8; }
.drive-file > b { margin-left: auto; font-size: 13px; font-weight: 400; color: #aab5c8; }
.drive-spark { position: absolute; color: #9aace1; }.drive-spark-one { left: 51px; top: 61px; font-size: 22px; }.drive-spark-two { left: 346px; top: 202px; font-size: 25px; color: #bdc9e5; }
.drive-showcase-caption { display: flex; align-items: center; gap: 8px; color: #9aa5b8; font-size: 11px; letter-spacing: .06em; margin-top: 9px; }.drive-showcase-caption > span { width: 20px; height: 1px; background: #bcc7dd; }
.drive-footer { position: absolute; z-index: 1; bottom: 29px; left: max(48px, calc((100vw - 1240px) / 2)); right: max(48px, calc((100vw - 1240px) / 2)); display: flex; justify-content: space-between; color: #a8b0bf; font-size: 10px; letter-spacing: .12em; }
html[data-drive-auth] .drive-auth-root { box-sizing: border-box; min-height: 100svh; height: auto !important; width: 100%; padding: 120px max(64px, calc((100vw - 1208px) / 2)) 100px; display: grid !important; grid-template-columns: minmax(0, 1fr) 432px; gap: 64px; justify-content: initial !important; align-items: center !important; background: none !important; }
html[data-drive-auth] .drive-auth-root[hidden] { display: none !important; }
html[data-drive-auth] .drive-auth-card { grid-column: 2; width: 432px !important; max-width: 100% !important; margin: 0 !important; border: 1px solid #e9edf5 !important; border-radius: 23px !important; background: #fff !important; box-shadow: 0 16px 60px #1c315e05 !important; color: #26334e !important; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif !important; }
html[data-drive-auth] .drive-fields { padding: 36px 36px 12px !important; }
.drive-form-emblem { width: 44px; height: 44px; border-radius: 13px; background: #eef2ff url('./cloud.svg') center/26px 26px no-repeat; margin-bottom: 24px; }
html[data-drive-auth] .drive-form-title { margin: 0 !important; font-size: 27px !important; line-height: 1.4 !important; font-weight: 650 !important; text-align: left !important; letter-spacing: -.025em; color: #24314a !important; }
html[data-drive-auth] .drive-form-subtitle { margin: 8px 0 28px !important; font-size: 12px !important; font-weight: 400 !important; text-align: left !important; color: #9aA3b3 !important; }
html[data-drive-auth] .drive-submit { height: 48px; border-radius: 10px; font-size: 14px; font-weight: 500; box-shadow: 0 5px 12px #4865ed16; }
html[data-drive-auth] .drive-submit::after { content: '→'; position: absolute; right: 18px; color: #dce3ff; font-size: 17px; }
html[data-drive-auth] .drive-form-footer { background: transparent !important; padding: 16px 36px 29px !important; font-size: 11px; color: #9aa4b6 !important; border-radius: 0 0 23px 23px; }
html[data-drive-auth] .drive-form-footer a { color: #7886a0 !important; text-decoration: none; }.drive-form-footer a:hover { color: #4865ed !important; }
.drive-noscript { position: relative; z-index: 4; max-width: 380px; padding: 24px; margin: 160px auto; color: #4c5c79; background: #fff; border-radius: 16px; }
@media (max-width: 1100px) {
  .drive-showcase { width: 380px; left: 40px; }.drive-file-scene { transform: scale(.81); transform-origin: left top; height: 222px; }
  .drive-showcase h2 { font-size: 38px; }.drive-showcase > p { font-size: 13px; }
  html[data-drive-auth] .drive-auth-root { padding-left: 40px; padding-right: 40px; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; }
  html[data-drive-auth] .drive-auth-card { width: 400px !important; }
}
@media (max-width: 860px) {
  .drive-showcase { display: none; }.drive-header { top: 27px; left: 28px; right: 28px; }
  html[data-drive-auth] .drive-auth-root { display: flex !important; justify-content: center !important; padding: 110px 24px 90px; }
  .drive-footer { left: 28px; right: 28px; }.drive-header-note { font-size: 11px; }
}
@media (max-width: 480px) {
  html[data-drive-auth] body { background: radial-gradient(ellipse at 30% 20%, #edf2ff, transparent 60%), #f8faff; }
  .drive-header { left: 24px; right: 24px; top: 27px; }.drive-brand { font-size: 20px; gap: 10px; }.drive-brand img { width: 34px; height: 34px; }.drive-header-note { display: none; }
  html[data-drive-auth] .drive-auth-root { align-items: flex-start !important; padding: 122px 20px 88px; }
  html[data-drive-auth] .drive-auth-card { width: 100% !important; border-radius: 19px !important; }
  html[data-drive-auth] .drive-fields { padding: 29px 25px 9px !important; }
  html[data-drive-auth] .drive-form-title { font-size: 25px !important; }
  html[data-drive-auth] .drive-form-footer { padding: 16px 25px 26px !important; }.drive-form-emblem { margin-bottom: 22px; }
  .drive-footer { display: none; }
}
@media (max-height: 740px) and (min-width: 861px) {
  .drive-showcase { transform: translateY(-42%); }.drive-showcase h2 { font-size: 37px; margin-bottom: 12px; }.drive-showcase > p { font-size: 12px; }
  .drive-file-scene { transform: scale(.83); transform-origin: left top; height: 220px; }.drive-eyebrow { font-size: 10px; }
  html[data-drive-auth] .drive-auth-root { padding-top: 110px; padding-bottom: 75px; }
}
@media (prefers-reduced-motion: reduce) { .drive-decoration *, .drive-auth-card * { scroll-behavior: auto !important; } }

/* Hide the loaded app and its teleported dialogs before logout awaits network. */
#drive-transition { display: none; }
html[data-drive-transition] body > :not(#drive-transition) { visibility: hidden !important; }
html[data-drive-transition] #drive-transition { display: flex; position: fixed; inset: 0; z-index: 2147483647; flex-direction: column; align-items: center; justify-content: center; gap: 16px; margin: 0; background: #f6f8fc; color: #69748a; font: 14px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
#drive-transition img { width: 44px; height: 44px; }
#drive-transition p { margin: 0; }

/* Standalone form controls; the authenticated application keeps its own controls. */
#drive-entry *, #drive-challenge * { box-sizing: border-box; }
#drive-entry .drive-fields { margin: 0; }
#drive-entry .drive-field { margin-top: 22px; }
#drive-entry .drive-field > label { display: block; margin-bottom: 9px; color: #69748a; font-size: 12px; }
#drive-entry .drive-field::before { display: none !important; }
#drive-entry input:not([type=checkbox]) { display: block; width: 100%; height: 48px; padding: 0 13px; border: 1px solid #e5eaf3; border-radius: 10px; background: #fafbfe; font: inherit; font-size: 13px; color: #33405c; outline: none; transition: border-color .15s, box-shadow .15s; }
#drive-entry input::placeholder { color: #a3acbd; }
#drive-entry input:not([type=checkbox]):focus { border-color: #728bee; background: #fff; box-shadow: 0 0 0 3px #4865ed10; }
#drive-entry input[readonly] { opacity: .7; }
#drive-entry .drive-password { position: relative; }
#drive-entry .drive-password input { padding-right: 44px; }
#drive-entry .drive-reveal { position: absolute; right: 3px; top: 3px; width: 42px; height: 42px; padding: 11px; background: transparent; border: 0; color: #9aa7bf; cursor: pointer; border-radius: 8px; }
#drive-entry .drive-reveal svg { width: 20px; height: 20px; }
#drive-entry button:focus-visible, #drive-entry a:focus-visible { outline: 2px solid #728bee; outline-offset: 3px; }
#drive-entry .drive-primary { display: block; width: 100%; position: relative; margin-top: 26px; border: 1px solid #4865ed; background: #4865ed; color: #fff; cursor: pointer; }
#drive-entry .drive-primary:hover { background: #3f59df; }
#drive-entry .drive-primary:disabled { cursor: wait; opacity: .6; }
#drive-entry .drive-primary[aria-busy=true]::after { content: ''; width: 13px; height: 13px; border: 2px solid #ffffff60; border-top-color: #fff; border-radius: 50%; top: 15px; animation: drive-spin .8s linear infinite; }
#drive-entry .drive-code-group { display: flex; gap: 10px; }
#drive-entry .drive-code-group input { min-width: 0; flex: 1; }
#drive-entry .drive-code-group button { min-width: 76px; padding: 0 12px; border: 1px solid #dbe3fa; border-radius: 10px; background: #eef2ff; color: #4865ed; font-size: 12px; cursor: pointer; }
#drive-entry .drive-code-group button:disabled { opacity: .6; cursor: default; }
#drive-entry .drive-entry-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#drive-entry .drive-entry-footer > span:first-child { display: flex; gap: 16px; }
#drive-entry .drive-entry-footer a { white-space: nowrap; }
#drive-entry .drive-terms { display: flex; align-items: center; gap: 5px; margin-top: 20px; font-size: 11px; color: #7f8ca4; }
#drive-entry .drive-terms input { accent-color: #4865ed; }
#drive-entry .drive-terms a { color: #4865ed; text-decoration: none; }
#drive-entry .drive-message { color: #bd4c60; background: #fff3f5; border-radius: 8px; padding: 11px 12px; font-size: 12px; line-height: 1.7; margin: 20px 0 0; overflow-wrap: anywhere; }
#drive-entry .drive-message[data-success=true] { color: #41846a; background: #edf7f1; }
#drive-challenge { border: 1px solid #e5eaf3; border-radius: 16px; max-width: calc(100vw - 32px); width: 360px; padding: 24px; background: #fff; color: #33405c; }
#drive-challenge::backdrop { background: #1c315e50; }
#drive-challenge h2 { margin: 0 0 20px; font-size: 18px; }
#drive-challenge-widget { min-height: 90px; }
#drive-challenge-close { margin-top: 18px; border: 1px solid #e5eaf3; border-radius: 8px; padding: 8px 16px; background: #fafbfe; cursor: pointer; }
#drive-challenge-message { font-size: 12px; color: #bd4c60; }
@keyframes drive-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #drive-entry .drive-primary[aria-busy=true]::after { animation: none; } }
