/* assets/login.css —— 登录页面专属样式 */

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
    background-attachment: fixed;
    display: flex; justify-content: center; align-items: center;
    height: 100vh; margin: 0;
    transition: background 0.3s, color 0.3s;
}
.box {
    background: #ffffff; padding: 40px; border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    width: 420px; position: relative;
    transition: background 0.3s, box-shadow 0.3s;
}
.theme-toggle-btn {
    position: absolute; top: 20px; right: 20px;
    background: none; border: none; cursor: pointer;
    font-size: 16px; color: #64748b; padding: 6px 10px;
    border-radius: 6px; transition: background 0.2s;
}
.header-title { text-align: center; margin-bottom: 25px; }
.header-title h2 { margin: 0 0 8px 0; color: #0f172a; font-size: 22px; }
.header-title p { margin: 0; color: #64748b; font-size: 13px; }
.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; color: #334155; font-size: 14px; font-weight: 600; }
input[type="text"], input[type="password"] {
    width: 100%; padding: 12px 15px;
    border: 1px solid #cbd5e1; border-radius: 8px;
    font-size: 14px; background: #f8fafc; color: #1e293b;
    transition: all 0.3s; outline: none;
}
input[type="text"]:focus, input[type="password"]:focus {
    border-color: #2563eb; background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}
button[type="submit"] {
    width: 100%; padding: 14px; background: #2563eb;
    border: none; color: white; border-radius: 8px;
    font-size: 16px; font-weight: 600; cursor: pointer;
    margin-top: 10px; transition: background 0.2s;
    box-shadow: 0 4px 6px -1px rgba(37,99,235,0.2);
}
button[type="submit"]:hover { background: #1d4ed8; }
button[type="submit"]:disabled {
    background: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
    box-shadow: none;
}
.error {
    color: #dc2626; font-size: 13px; margin-bottom: 20px;
    background: #fef2f2; padding: 12px 16px;
    border-radius: 8px; border: 1px solid #fecaca;
}
.footer-info {
    text-align: center; margin-top: 25px; font-size: 12px;
    color: #94a3b8; border-top: 1px solid #e2e8f0; padding-top: 15px;
}

/* ============================================================
 * 拖动滑块验证
 * ============================================================ */
.drag-captcha-wrapper {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

.drag-track {
    position: relative;
    height: 46px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    overflow: hidden;
    box-sizing: border-box;
    transition: border-color 0.2s, background 0.2s;
}
.drag-track.dragging {
    border-color: #3b82f6;
    background: #eff6ff;
}
.drag-track.verified {
    border-color: #22c55e;
    background: #f0fdf4;
}

.drag-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
    pointer-events: none;
    opacity: 0.18;
    transition: opacity 0.2s;
}
.drag-track.verified .drag-progress {
    background: linear-gradient(90deg, #86efac, #22c55e);
    opacity: 0.3;
}

.drag-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 13px;
    color: #94a3b8;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
    transition: color 0.2s;
    font-weight: 500;
}
.drag-track.dragging .drag-text { color: #2563eb; }
.drag-track.verified .drag-text {
    color: #16a34a;
    font-weight: 600;
}

.drag-handle {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 46px;
    height: 38px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    cursor: grab;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
    touch-action: none;
}
.drag-handle:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}
.drag-handle.dragging {
    cursor: grabbing;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.5);
}
.drag-handle.verified {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.4);
    cursor: default;
    font-size: 20px;
}

.drag-tip {
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    margin-top: 8px;
    transition: color 0.2s;
}
.drag-track.dragging + .drag-tip { color: #2563eb; }
.drag-track.verified + .drag-tip { color: #16a34a; }

/* ============================================================
 * 登录页面专属暗色模式
 * ============================================================ */
html.dark-mode .box { background: #111827 !important; border: 1px solid #1f2937 !important; box-shadow: 0 20px 40px rgba(0,0,0,0.6) !important; }
html.dark-mode .footer-info { border-top-color: #1f2937 !important; color: #6b7280 !important; }

/* 暗色模式：拖动滑块 */
html.dark-mode .drag-track {
    background: #1f2937 !important;
    border-color: #374151 !important;
}
html.dark-mode .drag-track.dragging {
    border-color: #3b82f6 !important;
    background: #1e3a8a !important;
}
html.dark-mode .drag-track.verified {
    border-color: #16a34a !important;
    background: #064e3b !important;
}
html.dark-mode .drag-text { color: #6b7280 !important; }
html.dark-mode .drag-track.dragging .drag-text { color: #60a5fa !important; }
html.dark-mode .drag-track.verified .drag-text { color: #86efac !important; }
html.dark-mode .drag-tip { color: #6b7280 !important; }
html.dark-mode .drag-track.dragging + .drag-tip { color: #60a5fa !important; }
html.dark-mode .drag-track.verified + .drag-tip { color: #86efac !important; }