﻿/* ================================
DYIL Login CSS（企業紅色系）
================================ */

/* ===== 色彩變數（品牌紅） ===== */
:root {
    --primary-900: #7A0C0C;
    --primary-700: #B71C1C;
    --primary-500: #E53935;
    --primary-300: #F28B82;
    --primary-100: #FDECEA;
    --bg: linear-gradient(135deg, #fff5f5, #ffffff);
    --white: #ffffff;
    --text-main: #2f2f2f;
    --text-muted: #666;
    --text-sub: #8a6b6b;
    --shadow-rgb: 229, 57, 53;
}

/* ===== 全域 ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: "Noto Sans TC","Microsoft JhengHei",sans-serif;
  
    color: var(--text-main);
}

/* ===== 外層 ===== */
.login-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ===== Header（品牌） ===== */
.login-header {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    width: auto;
    max-width: 90%; /* 不超過螢幕 */
    height: auto;
    max-height: 50px; /* 桌機上限 */
}

.company-cn {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-500);
}

.company-en {
    font-size: 12px;
    color: #999;
    letter-spacing: 1px;
}

/* ===== 卡片 ===== */
.card {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border-radius: 14px;
    border: 1px solid rgba(229,57,53,0.2);
    padding: 36px 28px;
    backdrop-filter: blur(6px);
    box-shadow: 0 8px 24px rgba(var(--shadow-rgb), 0.18);
}

/* ===== 標題 ===== */
.title {
    font-weight: 700;
    text-align: center;
    color: var(--primary-500);
    font-size: 26px;
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    color: var(--text-sub);
    margin-bottom: 28px;
    font-size: 14px;
}

/* ===== 表單 ===== */
.field {
    margin-bottom: 16px;
}

.label {
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--text-muted);
}

/* ===== Input ===== */
.input {
    width: 100%;
    border: 1px solid var(--primary-300);
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    outline: none;
    background: var(--white);
    transition: all 0.2s ease;
}

    .input:focus {
        border-color: var(--primary-500);
        box-shadow: 0 0 0 2px rgba(229,57,53,0.2);
        transform: translateY(-1px);
    }

/* ===== 密碼顯示 ===== */
.input-wrap {
    position: relative;
}

.toggle-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 12px;
    color: var(--primary-700);
}

/* ===== 驗證碼 ===== */
.row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.captcha-input {
    flex: 1;
}

.captcha-img {
    height: 42px;
    border-radius: 8px;
    border: 1px solid var(--primary-300);
    cursor: pointer;
    transition: 0.2s;
}

    .captcha-img:hover {
        transform: scale(1.05);
    }

.hint {
    font-size: 12px;
    margin-top: 6px;
    color: var(--primary-700);
}

/* ===== 按鈕 ===== */
.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #E53935, #C62828);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(229,57,53,0.3);
}

    .btn:hover {
        background: linear-gradient(135deg, #C62828, #B71C1C);
    }

    .btn[disabled] {
        opacity: .6;
        cursor: not-allowed;
    }

/* ===== 連結 ===== */
.link {
    color: var(--primary-500);
    text-decoration: none;
}

    .link:hover {
        text-decoration: underline;
    }

/* ===== Alert ===== */
.alert {
    padding: 12px;
    border-radius: 10px;
    background: #fdecea;
    border: 1px solid #f5c6cb;
    color: #b71c1c;
    font-size: 13px;
    margin-bottom: 14px;
    display: none;
}

    .alert.show {
        display: block;
    }

/* ===== RWD ===== */
@media (max-width: 480px) {
    .card {
        padding: 24px 18px;
    }

    .captcha-img {
        width: 100%;
        height: 44px;
    }
}

@media (max-width: 360px) {
    .title {
        font-size: 22px;
    }
}

