/*--全局样式--*/
/*--登录页、文件列表页、弹窗、按钮等通用组件样式--*/

:root {
    --primary: #4A6CF7;
    --primary-hover: #3B5DE7;
    --primary-light: #EEF2FF;
    --success: #10B981;
    --success-hover: #059669;
    --danger: #EF4444;
    --danger-hover: #DC2626;
    --warning: #F59E0B;
    --bg: #F0F2F5;
    --card: #FFFFFF;
    --text: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --border: #E5E7EB;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ========== 登录页 ========== */
body.login-page {
    min-width: 320px;
    background: #F7F9FC;
    overflow-x: hidden;
}

.login-page .login-wrapper {
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(430px, .88fr);
    background: #F7F9FC;
}

.login-visual {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    padding: clamp(28px, 3.4vw, 58px);
    color: #FFFFFF;
    isolation: isolate;
    background:
        radial-gradient(circle at 14% 62%, rgba(26, 205, 255, .24), transparent 29%),
        radial-gradient(circle at 88% 84%, rgba(154, 81, 255, .62), transparent 36%),
        linear-gradient(135deg, #0B4EE8 0%, #3158F5 46%, #7048F3 100%);
}

.login-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    opacity: .19;
    background-image: radial-gradient(rgba(255, 255, 255, .72) 1.15px, transparent 1.15px);
    background-size: 38px 38px;
    mask-image: linear-gradient(140deg, #000 0%, transparent 42%, #000 100%);
}

.login-visual::after {
    content: "";
    position: absolute;
    width: 72%;
    aspect-ratio: 1;
    right: -35%;
    top: 22%;
    z-index: -2;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
    box-shadow: 0 0 0 90px rgba(255, 255, 255, .025), 0 0 0 180px rgba(255, 255, 255, .018);
}

.login-visual-glow {
    position: absolute;
    z-index: -1;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 0 24px 10px rgba(255, 255, 255, .46);
}

.login-visual-glow-one {
    left: 51%;
    top: 47%;
}

.login-visual-glow-two {
    right: 14%;
    bottom: 20%;
    opacity: .72;
}

.login-brand {
    position: relative;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    width: fit-content;
    font-size: clamp(18px, 1.45vw, 25px);
    font-weight: 750;
    letter-spacing: .01em;
}

.login-brand-mark {
    display: grid;
    place-items: center;
    width: clamp(40px, 3.2vw, 56px);
    height: clamp(40px, 3.2vw, 56px);
    color: #FFFFFF;
    filter: drop-shadow(0 10px 18px rgba(10, 37, 138, .28));
}

.login-brand-mark svg {
    width: 100%;
    height: 100%;
}

.login-copy {
    position: relative;
    z-index: 3;
    width: min(630px, 68%);
    margin-top: clamp(150px, 28vh, 330px);
}

.login-copy h1 {
    max-width: 620px;
    margin: 0 0 25px;
    font-size: clamp(36px, 3.35vw, 62px);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.035em;
    text-wrap: balance;
    text-shadow: 0 10px 32px rgba(10, 39, 151, .2);
}

.login-copy p {
    font-size: clamp(16px, 1.5vw, 25px);
    line-height: 1.95;
    color: rgba(255, 255, 255, .92);
    letter-spacing: .01em;
}

.login-visual-canvas {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.visual-card {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: clamp(18px, 1.5vw, 28px);
    background: rgba(100, 123, 255, .22);
    box-shadow: 0 24px 60px rgba(16, 29, 129, .28), inset 0 1px rgba(255, 255, 255, .18);
    -webkit-backdrop-filter: blur(13px);
    backdrop-filter: blur(13px);
    animation: visualFloat 7s ease-in-out infinite;
}

.visual-sheet-card {
    top: 18%;
    right: 4%;
    width: 37%;
    aspect-ratio: 1.65;
    padding: 12% 5% 5%;
    transform: rotate(4deg);
}

.visual-card-icon {
    position: absolute;
    display: grid;
    place-items: center;
    width: clamp(48px, 4.4vw, 78px);
    aspect-ratio: 1;
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 24%;
    box-shadow: 0 18px 32px rgba(11, 30, 111, .24);
}

.visual-card-icon svg {
    width: 56%;
    height: 56%;
}

.visual-card-icon-sheet {
    top: -13%;
    left: -7%;
    background: linear-gradient(145deg, #5CE2B1, #19B882);
}

.sheet-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: 100%;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, .19);
    border-left: 1px solid rgba(255, 255, 255, .19);
}

.sheet-grid span {
    min-height: 15px;
    border-right: 1px solid rgba(255, 255, 255, .19);
    border-bottom: 1px solid rgba(255, 255, 255, .19);
}

.sheet-grid .sheet-grid-active {
    border: 2px solid rgba(255, 255, 255, .72);
    box-shadow: 0 0 14px rgba(255, 255, 255, .22);
}

.visual-file-card {
    left: 7%;
    bottom: 12%;
    display: flex;
    align-items: center;
    gap: clamp(18px, 2vw, 34px);
    width: 40%;
    min-height: 20%;
    padding: clamp(24px, 2.4vw, 42px);
    transform: rotate(-5deg);
    animation-delay: -2.5s;
}

.visual-folder {
    position: relative;
    flex: 0 0 30%;
    max-width: 118px;
    aspect-ratio: 1.25;
    border: 1px solid rgba(255, 255, 255, .56);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(174, 209, 255, .98), rgba(77, 122, 255, .95));
    box-shadow: 0 15px 25px rgba(13, 38, 144, .26), inset 0 1px rgba(255, 255, 255, .5);
}

.visual-folder::before {
    content: "";
    position: absolute;
    top: -15%;
    left: 8%;
    width: 43%;
    height: 23%;
    border: 1px solid rgba(255, 255, 255, .45);
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: #96B8FF;
}

.visual-folder i {
    position: absolute;
    inset: 16% 9% 9%;
    border-radius: 12px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .32), transparent 70%);
}

.visual-card-copy {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    color: rgba(255, 255, 255, .94);
}

.visual-card-copy strong,
.visual-todo-card > strong {
    margin-bottom: 4px;
    font-size: clamp(14px, 1.2vw, 21px);
    font-weight: 650;
}

.visual-card-copy small {
    margin-bottom: 13px;
    font-size: clamp(10px, .9vw, 15px);
    color: rgba(255, 255, 255, .68);
}

.visual-card-copy i {
    display: block;
    width: 88%;
    height: 6px;
    margin-top: 7px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .2);
}

.visual-card-copy i:last-child {
    width: 62%;
}

.visual-todo-card {
    right: 8%;
    bottom: 7%;
    width: 31%;
    padding: clamp(20px, 2vw, 34px);
    transform: rotate(6deg);
    animation-delay: -4.2s;
}

.visual-todo-card > strong {
    display: block;
    margin-bottom: 16px;
}

.visual-todo-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    color: rgba(255, 255, 255, .9);
    font-size: clamp(10px, .95vw, 16px);
    white-space: nowrap;
}

.visual-todo-row i {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: clamp(17px, 1.35vw, 23px);
    aspect-ratio: 1;
    border: 1.5px solid rgba(255, 255, 255, .92);
    border-radius: 50%;
    color: #FFFFFF;
    font-size: .72em;
    font-style: normal;
}

.visual-todo-row.is-done {
    color: rgba(255, 255, 255, .48);
    text-decoration: line-through;
}

.visual-todo-row.is-done i {
    border-color: #42DEA5;
    background: #42DEA5;
    box-shadow: 0 0 13px rgba(66, 222, 165, .48);
}

@keyframes visualFloat {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -10px; }
}

.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(28px, 4.3vw, 76px);
    background:
        radial-gradient(circle at 94% 6%, rgba(79, 110, 247, .07), transparent 25%),
        #F7F9FC;
}

.login-card {
    width: 100%;
    max-width: 500px;
    padding: clamp(38px, 3.25vw, 60px);
    border: 1px solid rgba(208, 216, 230, .9);
    border-radius: 24px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 24px 65px rgba(43, 58, 102, .12), 0 4px 14px rgba(43, 58, 102, .05);
}

.login-card-heading {
    margin-bottom: clamp(32px, 3vw, 46px);
    text-align: center;
}

.login-card h2 {
    margin-bottom: 8px;
    color: #17233D;
    font-size: clamp(31px, 2.3vw, 42px);
    line-height: 1.25;
    font-weight: 780;
    letter-spacing: -.025em;
}

.login-card .subtitle {
    color: #7D8AA3;
    font-size: clamp(14px, 1.05vw, 17px);
}

.login-card .form-group {
    margin-bottom: 22px;
}

.login-card .form-group label {
    margin-bottom: 9px;
    color: #25324A;
    font-size: 15px;
    font-weight: 620;
}

.login-card .form-group input {
    height: 56px;
    padding: 0 17px;
    border: 1.5px solid #D8E0ED;
    border-radius: 10px;
    background: #FFFFFF;
    color: #1D2940;
    font-size: 16px;
    box-shadow: 0 1px 2px rgba(24, 39, 75, .02);
}

.login-card .form-group input::placeholder {
    color: #A3AEC1;
}

.login-card .form-group input:hover {
    border-color: #B9C5D9;
}

.login-card .form-group input:focus {
    border-color: #4F6EF7;
    box-shadow: 0 0 0 4px rgba(79, 110, 247, .12);
}

.login-verification-row {
    --verification-height: 56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px 44px;
    gap: 8px;
    align-items: center;
}

.login-verification-row input {
    min-width: 0;
}

.login-verification-preview {
    position: relative;
    display: grid;
    place-items: center;
    height: var(--verification-height);
    overflow: hidden;
    border: 1px solid #CED8E8;
    border-radius: 9px;
    background:
        repeating-linear-gradient(-18deg, rgba(79, 110, 247, .09) 0 2px, transparent 2px 9px),
        linear-gradient(135deg, #F2F5FF, #E8EDFA);
    color: #334C9A;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 22px;
    font-weight: 750;
    font-style: italic;
    letter-spacing: 5px;
    line-height: 1;
    text-indent: 5px;
    user-select: none;
}

.login-verification-preview::before,
.login-verification-preview::after {
    content: "";
    position: absolute;
    width: 110%;
    height: 1px;
    background: rgba(57, 86, 174, .34);
    transform: rotate(-13deg);
}

.login-verification-preview::after {
    background: rgba(123, 76, 213, .28);
    transform: rotate(16deg);
}

.login-verification-refresh {
    display: grid;
    place-items: center;
    width: 44px;
    height: var(--verification-height);
    padding: 0;
    border: 1px solid #D8E0ED;
    border-radius: 9px;
    background: #FFFFFF;
    color: #748198;
    cursor: pointer;
    transition: color .18s, border-color .18s, background-color .18s;
}

.login-verification-refresh:hover {
    border-color: #AEBDE0;
    background: #F4F6FF;
    color: #4F6EF7;
}

.login-verification-refresh:focus-visible {
    outline: 3px solid rgba(79, 110, 247, .3);
    outline-offset: 3px;
}

.login-verification-refresh svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-input-wrap {
    position: relative;
}

.password-input-wrap input {
    padding-right: 54px !important;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #7D8AA3;
    cursor: pointer;
    transition: color .18s, background-color .18s;
    transform: translateY(-50%);
}

.password-toggle:hover {
    color: #4F6EF7;
    background: #F2F5FF;
}

.password-toggle:focus-visible,
.login-card .login-submit:focus-visible {
    outline: 3px solid rgba(79, 110, 247, .3);
    outline-offset: 3px;
}

.password-toggle svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-toggle .eye-closed,
.password-toggle.is-visible .eye-open {
    display: none;
}

.password-toggle.is-visible .eye-closed {
    display: block;
}

.login-error {
    display: none;
    align-items: center;
    min-height: 42px;
    margin: -2px 0 16px;
    padding: 10px 12px;
    border: 1px solid #FECACA;
    border-radius: 9px;
    background: #FFF5F5;
    color: #C73434;
    font-size: 13px;
    line-height: 1.45;
}

.login-error.is-visible {
    display: flex;
}

.login-card .login-submit {
    height: 58px;
    margin-top: 5px;
    border-radius: 9px;
    background: linear-gradient(135deg, #3868F7, #2454EA);
    box-shadow: 0 12px 26px rgba(49, 88, 245, .23);
    font-size: 17px;
    font-weight: 650;
    letter-spacing: .08em;
}

.login-card .login-submit:hover {
    background: linear-gradient(135deg, #315FF0, #1E4CDA);
    box-shadow: 0 14px 30px rgba(49, 88, 245, .3);
    transform: translateY(-1px);
}

.login-card .login-submit:active {
    transform: translateY(0);
}

.login-card .login-submit .loading {
    display: none;
    width: 18px;
    height: 18px;
}

.login-card .login-submit.is-loading .loading {
    display: inline-block;
}

.login-card .login-submit:disabled {
    transform: none;
}

.login-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #E8EDF5;
    color: #7D8AA3;
    font-size: 14px;
}

.login-security-note svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: #4F6EF7;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ========== 表单组件 ========== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.15);
}

/* ========== 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-success {
    background: var(--success);
    color: #fff;
}
.btn-success:hover {
    background: var(--success-hover);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-danger:hover {
    background: var(--danger-hover);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.btn-lg {
    height: 48px;
    font-size: 16px;
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-sm {
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
}

/* ========== 顶部导航栏 ========== */
.navbar {
    height: 60px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .brand {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.navbar .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.navbar .user-info .nickname {
    font-weight: 500;
    color: var(--text);
}

/* ========== 文件列表容器 ========== */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 24px;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.toolbar .spacer {
    flex: 1;
}

/* ========== 文件列表表格 ========== */
.file-table {
    width: 100%;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.file-table table {
    width: 100%;
    border-collapse: collapse;
}

.file-table th,
.file-table td {
    text-align: left;
    padding: 14px 20px;
    font-size: 14px;
}

.file-table th {
    background: #F9FAFB;
    color: var(--text-secondary);
    font-weight: 500;
    border-bottom: 1px solid var(--border);
}

.file-table td {
    border-bottom: 1px solid #F3F4F6;
    color: var(--text);
}

.file-table tr:last-child td {
    border-bottom: none;
}

.file-table tr:hover td {
    background: #FAFBFF;
}

.file-table .file-name {
    font-weight: 500;
    color: var(--primary);
    cursor: pointer;
}
.file-table .file-name:hover {
    text-decoration: underline;
}

.file-table .actions {
    display: flex;
    gap: 8px;
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 64px 20px;
    color: var(--text-light);
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 15px;
}

/* ========== 弹窗 ========== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    width: 100%;
    max-width: 440px;
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.modal .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

/* ========== 提示消息 ========== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    box-shadow: var(--shadow);
    animation: toastIn 0.3s ease;
    transition: opacity 0.3s;
}

.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.info    { background: var(--primary); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ========== 加载动画 ========== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== 编辑器页面 ========== */
.editor-navbar {
    height: 50px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 1000;
}

.editor-navbar .file-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.editor-navbar .divider {
    width: 1px;
    height: 24px;
    background: var(--border);
}

#luckysheet-container {
    width: 100%;
    height: calc(100vh - 50px);
}

/* ========== 文件类型按钮 ========== */
.type-btn {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #D1D5DB;
    border-radius: 8px;
    background: var(--white);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}
.type-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.type-btn.active {
    border-color: var(--primary);
    background: #EEF2FF;
    color: var(--primary);
}

/* ========== 分组标签 ========== */
.group-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 22px;
    border-radius: 8px;
    border: 2px solid #D1D5DB;
    background: var(--white);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}
.group-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #F5F3FF;
}
.group-tag.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}
.group-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    background: #EEF2FF;
    color: #4F46E5;
    font-size: 12px;
    font-weight: 500;
}

/* ========== 响应式 ========== */
@media (max-width: 1100px) {
    .login-page .login-wrapper {
        grid-template-columns: minmax(0, 1fr) minmax(410px, .86fr);
    }

    .login-copy {
        width: 82%;
    }

    .visual-sheet-card {
        top: 17%;
        width: 39%;
        opacity: .78;
    }

    .visual-file-card {
        width: 46%;
    }

    .visual-todo-card {
        width: 36%;
    }
}

@media (max-width: 860px) {
    .login-page .login-wrapper {
        display: block;
        min-height: 100vh;
        min-height: 100svh;
        background: #F7F9FC;
    }

    .login-visual {
        min-height: 310px;
        padding: 26px 30px 76px;
    }

    .login-brand {
        gap: 10px;
        font-size: 19px;
    }

    .login-brand-mark {
        width: 42px;
        height: 42px;
    }

    .login-copy {
        width: 100%;
        margin-top: 50px;
        text-align: center;
    }

    .login-copy h1 {
        max-width: none;
        margin-bottom: 14px;
        font-size: clamp(30px, 6vw, 42px);
    }

    .login-copy p {
        font-size: 15px;
        line-height: 1.75;
    }

    .login-visual-canvas {
        display: none;
    }

    .login-form-panel {
        position: relative;
        z-index: 5;
        min-height: auto;
        margin-top: -44px;
        padding: 0 22px calc(36px + env(safe-area-inset-bottom));
        background: transparent;
    }

    .login-card {
        max-width: 520px;
        padding: 40px;
        border-radius: 22px;
    }
}

@media (min-width: 861px) and (max-height: 820px) {
    .login-copy {
        margin-top: 88px;
    }

    .login-form-panel {
        align-items: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .login-card {
        padding-top: 28px;
        padding-bottom: 28px;
    }

    .login-card-heading {
        margin-bottom: 22px;
    }

    .login-card h2 {
        font-size: 31px;
    }

    .login-card .form-group {
        margin-bottom: 14px;
    }

    .login-card .form-group input {
        height: 50px;
    }

    .login-verification-row {
        --verification-height: 50px;
    }

    .login-card .login-submit {
        height: 52px;
    }

    .login-security-note {
        margin-top: 18px;
        padding-top: 16px;
    }
}

@media (max-width: 520px) {
    .login-visual {
        min-height: 255px;
        padding: 22px 20px 62px;
    }

    .login-brand {
        font-size: 17px;
    }

    .login-brand-mark {
        width: 38px;
        height: 38px;
    }

    .login-copy {
        margin-top: 36px;
    }

    .login-copy h1 {
        margin-bottom: 10px;
        font-size: 29px;
    }

    .login-copy p {
        font-size: 13px;
    }

    .login-form-panel {
        margin-top: -34px;
        padding-right: 14px;
        padding-left: 14px;
    }

    .login-card {
        padding: 32px 22px 26px;
        border-radius: 20px;
    }

    .login-card-heading {
        margin-bottom: 28px;
    }

    .login-card h2 {
        font-size: 29px;
    }

    .login-card .form-group {
        margin-bottom: 18px;
    }

    .login-card .form-group input {
        height: 54px;
        font-size: 16px;
    }

    .login-verification-row {
        --verification-height: 54px;
        grid-template-columns: minmax(0, 1fr) 86px 42px;
        gap: 6px;
    }

    .login-verification-refresh {
        width: 42px;
    }

    .login-card .login-submit {
        height: 55px;
    }

    .login-security-note {
        margin-top: 24px;
        padding-top: 21px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .visual-card,
    .loading {
        animation: none;
    }

    .btn,
    .form-group input,
    .password-toggle {
        transition: none;
    }
}

@media (max-width: 640px) {
    .container { padding: 16px 12px; }
    .file-table th, .file-table td { padding: 10px 12px; }
    .toolbar { gap: 8px; }
    .navbar { padding: 0 12px; }
}
