* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #0d1b2a, #1b2a4a);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 40px 35px;
    width: 380px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.35);
}
.auth-brand {
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 25px;
    color: #0d233a;
}
.auth-brand span { color: #3b82f6; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 6px; }
.form-group input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
}
.form-group input:focus { border-color: #3498db; box-shadow: 0 0 0 3px rgba(52,152,219,0.15); }
.btn-primary-auth {
    width: 100%;
    padding: 12px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: 0.2s;
}
.btn-primary-auth:hover { background: #2563eb; }
.btn-primary-auth:disabled { background: #a9c9e0; cursor: not-allowed; }
.auth-switch { text-align: center; margin-top: 18px; font-size: 13px; color: #666; }
.auth-switch a { color: #3b82f6; font-weight: 600; text-decoration: none; }
.auth-msg { font-size: 13px; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; display: none; }
.auth-msg.error { background: #fdecea; color: #c0392b; display: block; }
.auth-msg.success { background: #eafaf1; color: #27ae60; display: block; }

/* Captcha Modal */
.captcha-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.55);
    align-items: center;
    justify-content: center;
    z-index: 5000;
}
.captcha-overlay.show { display: flex; }
.captcha-box {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    width: 340px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
}
.captcha-title { font-size: 14px; font-weight: 700; color: #333; margin-bottom: 12px; }
.captcha-close {
    position: absolute; top: 14px; right: 16px; cursor: pointer;
    color: #999; font-size: 18px; font-weight: bold;
}
.captcha-canvas-wrap { position: relative; border-radius: 6px; overflow: hidden; }
.captcha-canvas-wrap img.bg-img { display: block; width: 100%; }
.captcha-piece {
    position: absolute;
    top: 0; left: 0;
    cursor: grab;
    transition: left 0.05s linear;
}
.captcha-piece.dragging { cursor: grabbing; transition: none; }
.captcha-refresh {
    position: absolute; bottom: 8px; right: 8px;
    background: rgba(255,255,255,0.85); border-radius: 50%;
    width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 13px; color: #333;
}
.captcha-slider-track {
    position: relative;
    margin-top: 12px;
    height: 42px;
    background: #f2f4f7;
    border-radius: 6px;
    display: flex;
    align-items: center;
}
.captcha-slider-fill {
    position: absolute; left: 0; top: 0; height: 100%;
    background: #d7ecff; border-radius: 6px 0 0 6px;
    width: 0;
}
.captcha-slider-handle {
    position: absolute; left: 0; top: 0;
    width: 42px; height: 42px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    cursor: grab;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    font-size: 14px;
    color: #3b82f6;
    z-index: 2;
}
.captcha-slider-handle.dragging { cursor: grabbing; }
.captcha-slider-hint { position: absolute; width: 100%; text-align: center; font-size: 12px; color: #aaa; }
.captcha-status { margin-top: 10px; font-size: 13px; text-align: center; min-height: 18px; }
.captcha-status.ok { color: #27ae60; font-weight: 700; }
.captcha-status.fail { color: #e74c3c; font-weight: 700; }
