/* style_login.css - 登录页面专用样式
   适用于：login.php
   设计目标：医疗专业感、自适应手机/平板/桌面、清晰友好
*/

/* ---------- 全局重置与字体 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, system-ui, -apple-system, 'Helvetica Neue', sans-serif;
    background: linear-gradient(145deg, #e9f0f9 0%, #dae6f2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    color: #1a2b3c;
}

/* 可选背景装饰（医院风格） */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.03"><path fill="%232c7da0" d="M50 0 L100 50 L50 100 L0 50 Z"/></svg>');
    background-size: 60px 60px;
    pointer-events: none;
}

/* ---------- 登录卡片容器 ---------- */
.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    width: 100%;
    max-width: 660px;
    padding: 2.5rem 2rem;
    border-radius: 48px;
    box-shadow: 0 30px 60px rgba(11, 57, 84, 0.2),
                0 10px 25px rgba(0, 40, 70, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    animation: fadeSlideUp 0.6s ease;
}

@keyframes fadeSlideUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- 标题 ---------- */
.login-container h2 {
    font-size: 1.9rem;
    font-weight: 600;
    color: #0b3954;
    margin-bottom: 0.3rem;
    text-align: center;
    letter-spacing: -0.5px;
    line-height: 1.3;
}

/* 可添加一个副标题或装饰线 */
.login-container h2::after {
    content: '';
    display: block;
    width: 70px;
    height: 4px;
    background: linear-gradient(90deg, #2c7da0, #52b788);
    margin: 0.8rem auto 0;
    border-radius: 4px;
}

/* ---------- 错误信息 ---------- */
.error {
    background: #ffe8e6;
    color: #c44536;
    padding: 0.8rem 1.2rem;
    border-radius: 40px;
    margin: 1.5rem 0 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    border-left: 5px solid #e63946;
    box-shadow: 0 4px 8px rgba(228, 57, 70, 0.1);
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

/* ---------- 表单 ---------- */
form {
    margin-top: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* 输入框 */
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #d9e8f2;
    border-radius: 60px;
    font-size: 1.5rem;
    background: white;
    transition: all 0.2s ease;
    outline: none;
    color: #1f3a4b;
    font-weight: 400;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: #2c7da0;
    box-shadow: 0 0 0 4px rgba(44, 125, 160, 0.2);
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: #9bb7d0;
    font-weight: 300;
}

/* 登录按钮 */
button[type="submit"] {
    background: #2c7da0;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 60px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 18px rgba(44, 125, 160, 0.3);
    letter-spacing: 1px;
    margin-top: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

button[type="submit"]:hover {
    background: #1e5f7a;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(44, 125, 160, 0.4);
}

button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(44, 125, 160, 0.4);
}

/* ---------- 辅助信息 ---------- */
.help-links {
    margin-top: 1.8rem;
    text-align: center;
    font-size: 0.9rem;
    color: #4f6f8f;
}

.help-links a {
    color: #2c7da0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    margin: 0 0.3rem;
}

.help-links a:hover {
    color: #1e5f7a;
    text-decoration: underline;
}

/* 添加一个小图标或装饰 */
.hospital-badge {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin: 1.5rem 0 0.5rem;
    color: #7f9eb5;
    font-size: 0.9rem;
    border-top: 1px dashed #cbddee;
    padding-top: 1.5rem;
}

.hospital-badge i {
    color: #2c7da0;
    font-size: 1rem;
}

/* ---------- 响应式设计：手机自适应 ---------- */

/* 小屏手机 (宽度 < 480px) */
@media (max-width: 480px) {
    body {
        padding: 0.8rem;
        background: linear-gradient(145deg, #dae6f2, #c2d6e8);
    }

    .login-container {
        padding: 2rem 1.2rem;
        border-radius: 36px;
        box-shadow: 0 20px 40px rgba(11, 57, 84, 0.2);
    }

    .login-container h2 {
        font-size: 1.6rem;
    }

    .login-container h2::after {
        width: 50px;
        height: 3px;
    }

    input[type="text"],
    input[type="password"] {
        padding: 0.9rem 1.2rem;
        font-size: 0.95rem;
    }

    button[type="submit"] {
        padding: 0.9rem 1.5rem;
        font-size: 1.1rem;
    }

    .error {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
}

/* 超小屏 (宽度 < 360px) */
@media (max-width: 360px) {
    .login-container {
        padding: 1.5rem 1rem;
    }

    .login-container h2 {
        font-size: 1.4rem;
    }

    button[type="submit"] {
        font-size: 1rem;
    }
}

/* 平板尺寸 (宽度 481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .login-container {
        max-width: 400px;
        padding: 2.2rem 1.8rem;
    }
}

/* 确保在大屏幕上不显得过于宽大 */
@media (min-width: 1200px) {
    .login-container {
        max-width: 460px;
        padding: 2.8rem 2.5rem;
    }
}

/* ---------- 可选的深色模式适配 ---------- */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(145deg, #1a2f3f, #13212e);
    }

    .login-container {
        background: rgba(30, 45, 60, 0.95);
        backdrop-filter: blur(8px);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .login-container h2 {
        color: #e0f0fa;
    }

    input[type="text"],
    input[type="password"] {
        background: #1f3a4b;
        border-color: #2a4a60;
        color: #f0f7fc;
    }

    input[type="text"]::placeholder,
    input[type="password"]::placeholder {
        color: #5f8aa8;
    }

    .help-links {
        color: #a0bedb;
    }

    .help-links a {
        color: #7bc4e0;
    }

    .hospital-badge {
        color: #a0bedb;
        border-top-color: #2a4a60;
    }
}