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

        button, input, select, textarea {
            font-family: inherit;
        }

        body {
            font-family: 'Noto Sans TC', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
            font-size: 14px;
            line-height: 1.6;
            background: linear-gradient(135deg, #ffd1dc 0%, #ffb6c1 50%, #ffc0cb 100%);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: hidden;
        }

        /* 動態背景效果 */
        body::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 1%, transparent 1%);
            background-size: 50px 50px;
            animation: backgroundMove 20s linear infinite;
            will-change: transform;
            z-index: 0;
        }

        @keyframes backgroundMove {
            0% {
                transform: translate(0, 0);
            }

            100% {
                transform: translate(50px, 50px);
            }
        }

        /* 錯誤訊息樣式 */
        .error-message {
            background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
            color: #fff;
            padding: 12px 16px;
            border-radius: 10px;
            margin-bottom: 20px;
            font-size: 14px;
            text-align: center;
            box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
            animation: shake 0.5s ease-in-out, fadeIn 0.3s ease-out;
        }

        @keyframes shake {

            0%,
            100% {
                transform: translateX(0);
            }

            10%,
            30%,
            50%,
            70%,
            90% {
                transform: translateX(-5px);
            }

            20%,
            40%,
            60%,
            80% {
                transform: translateX(5px);
            }
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* 登入卡片容器 */
        .login-container {
            position: relative;
            z-index: 1;
            width: 100%;
            max-width: 420px;
            padding: 20px;
            animation: fadeInUp 0.8s ease-out;
        }

        @keyframes fadeInUp {
            from {
                transform: translateY(30px);
            }

            to {
                transform: translateY(0);
            }
        }

        /* 登入卡片 - 玻璃質感 */
        .login-card {
            background: rgba(255, 255, 255, 0.45);
            backdrop-filter: blur(20px) saturate(180%);
            -webkit-backdrop-filter: blur(20px) saturate(180%);
            border-radius: 20px;
            padding: 45px 40px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
            border: 1px solid rgba(255, 255, 255, 0.25);
            position: relative;
            overflow: hidden;
        }

        .login-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(90deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.1) 100%);
        }

        /* 標題區域 */
        .login-header {
            text-align: center;
            margin-bottom: 35px;
        }

        /* Logo 動畫效果 */
        .navbar-brand {
            display: inline-block;
            margin-bottom: 15px;
            animation: logoFloat 3s ease-in-out infinite;
            transition: transform 0.3s ease;
        }

        .navbar-brand:hover {
            animation-play-state: paused;
            transform: scale(1.05);
        }

        .navbar-brand img {
            height: 80px;
            width: auto;
            filter: drop-shadow(0 4px 12px rgba(255, 105, 180, 0.3));
            transition: filter 0.3s ease;
        }

        .navbar-brand:hover img {
            filter: drop-shadow(0 6px 20px rgba(255, 105, 180, 0.5));
        }

        @keyframes logoFloat {
            0%, 100% {
                transform: translateY(0px);
            }
            50% {
                transform: translateY(-10px);
            }
        }

        .login-header h1 {
            font-size: 28px;
            font-weight: 600;
            background: linear-gradient(135deg, #d6336c 0%, #c2255c 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 8px;
        }

        .login-header p {
            font-size: 14px;
            color: #777;
        }

        /* 表單組 */
        .form-group {
            margin-bottom: 24px;
            position: relative;
        }

        .form-group label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: #555;
            margin-bottom: 8px;
            transition: color 0.3s;
        }

        .form-group input {
            width: 100%;
            height: 48px;
            padding: 12px 16px;
            font-size: 14px;
            border: 1px solid rgba(255, 255, 255, 0.5);
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.5);
            color: #333;
            transition: all 0.3s ease;
            outline: none;
            font-family: inherit;
        }

        .form-group input::placeholder {
            color: #999;
        }

        .form-group input:focus {
            border-color: rgba(255, 255, 255, 0.8);
            box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
            background: rgba(255, 255, 255, 0.7);
        }

        .form-group input:focus+label {
            color: #c2255c;
        }

        /* 按鈕樣式 */
        .btn-login {
            width: 100%;
            height: 52px;
            background: linear-gradient(135deg, #ff69b4 0%, #ff1493 100%);
            border: none;
            border-radius: 10px;
            color: #fff;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-top: 10px;
            position: relative;
            overflow: hidden;
        }

        .btn-login::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transition: left 0.5s;
        }

        .btn-login:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(255, 105, 180, 0.4);
        }

        .btn-login:hover::before {
            left: 100%;
        }

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

        /* IP 資訊顯示 */
        .ip-info {
            text-align: center;
            margin: 20px 0 10px;
            padding: 10px;
            background: rgba(255, 255, 255, 0.3);
            border-radius: 8px;
            font-size: 12px;
            color: #777;
        }

        /* 白名單網路的信任裝置提示與快速登入 */
        .trust-hint {
            margin: -12px 0 8px;
            font-size: 12px;
            color: #8a4b63;
            text-align: center;
        }

        .quick-login {
            margin-top: 16px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .quick-login-title {
            text-align: center;
            color: #999;
            font-size: 13px;
            margin-bottom: 4px;
        }

        .btn-quick-login {
            width: 100%;
            padding: 10px 16px;
            border: 1px solid rgba(255, 20, 147, 0.35);
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.6);
            color: #c2255c;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            font-family: inherit;
        }

        .btn-quick-login span {
            color: #777;
            font-weight: 400;
            margin-left: 6px;
        }

        .btn-quick-login:hover {
            background: rgba(255, 255, 255, 0.85);
        }

        /* 隱藏舊的登入背景 */
        .old-login-bg {
            display: none;
        }

        /* 響應式設計 */
        /* 平板裝置 (768px 以下) */
        @media (max-width: 768px) {
            body {
                padding: 10px;
            }

            .login-container {
                max-width: 100%;
                padding: 15px;
            }

            .login-card {
                padding: 40px 30px;
                border-radius: 18px;
            }

            .navbar-brand img {
                height: 70px;
            }

            .login-header h1 {
                font-size: 26px;
            }

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

            .form-group {
                margin-bottom: 20px;
            }

            .form-group input {
                height: 46px;
                font-size: 16px;
                /* iOS 避免自動縮放 */
            }

            .btn-login {
                height: 50px;
                font-size: 15px;
            }
        }

        /* 手機裝置 (480px 以下) */
        @media (max-width: 480px) {
            body {
                background: linear-gradient(135deg, #ffd1dc 0%, #ffb6c1 50%, #ffc0cb 100%);
                padding: 5px;
            }

            body::before {
                background-size: 30px 30px;
                /* 縮小背景點陣 */
            }

            .login-container {
                padding: 10px;
                max-width: 100%;
            }

            .login-card {
                padding: 30px 20px;
                border-radius: 15px;
                box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
            }

            .error-message {
                padding: 10px 14px;
                font-size: 13px;
                margin-bottom: 18px;
            }

            .login-header {
                margin-bottom: 25px;
            }

            .navbar-brand {
                margin-bottom: 12px;
            }

            .navbar-brand img {
                height: 60px;
            }

            .login-header h1 {
                font-size: 22px;
                margin-bottom: 6px;
            }

            .login-header p {
                font-size: 12px;
            }

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

            .form-group label {
                font-size: 12px;
                margin-bottom: 6px;
            }

            .form-group input {
                height: 44px;
                padding: 10px 14px;
                font-size: 16px;
                /* iOS 避免自動縮放 */
                border-radius: 8px;
            }

            .btn-login {
                height: 46px;
                font-size: 15px;
                border-radius: 8px;
            }

            .ip-info {
                margin: 15px 0 8px;
                padding: 8px;
                font-size: 11px;
            }
        }

        /* 小螢幕手機 (360px 以下) */
        @media (max-width: 360px) {
            .login-card {
                padding: 25px 16px;
            }

            .navbar-brand img {
                height: 50px;
            }

            .login-header h1 {
                font-size: 20px;
            }

            .login-header p {
                font-size: 11px;
            }

            .form-group input {
                height: 42px;
                padding: 8px 12px;
                font-size: 16px;
            }

            .btn-login {
                height: 44px;
                font-size: 14px;
            }
        }

        /* 橫向模式優化 */
        @media (max-height: 600px) and (orientation: landscape) {
            body {
                padding: 5px;
            }

            .login-container {
                padding: 10px;
            }

            .login-card {
                padding: 20px 30px;
            }

            .login-header {
                margin-bottom: 15px;
            }

            .login-header h1 {
                font-size: 20px;
                margin-bottom: 4px;
            }

            .login-header p {
                font-size: 11px;
            }

            .form-group {
                margin-bottom: 12px;
            }

            .form-group input {
                height: 38px;
                font-size: 14px;
            }

            .btn-login {
                height: 40px;
                font-size: 14px;
                margin-top: 5px;
            }

            .ip-info {
                margin: 10px 0 5px;
                padding: 6px;
            }
        }

        /* 舊樣式相容性 */
        body,
        td,
        th {
            font-size: 14px;
            color: #666666;
        }

        a:link {
            color: #ff69b4;
        }

        a:visited {
            color: #ff1493;
        }

        a:hover {
            color: #c71585;
        }

        a:active {
            color: #c71585;
        }

        /* LINE 登入按鈕樣式 */
        .btn-line-login,
        .btn-line-login:link,
        .btn-line-login:visited {
            display: block;
            width: 100%;
            height: 52px;
            background: #06C755;
            border: none;
            border-radius: 10px;
            color: #fff !important;
            font-size: 16px;
            font-weight: 600;
            text-decoration: none;
            text-align: center;
            line-height: 52px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .btn-line-login:hover,
        .btn-line-login:active {
            background: #05B34C;
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(6, 199, 85, 0.4);
            color: #fff !important;
        }

        .btn-line-login:active {
            transform: translateY(0);
        }

        @media (max-width: 480px) {
            .btn-line-login {
                height: 46px;
                line-height: 46px;
                font-size: 15px;
                border-radius: 8px;
            }
        }
    

/* ===== 登入背景裝飾（2026-10，比照 WebPOS 光球；各系統不同圖案） ===== */
body::after {
    content: ''; position: absolute; z-index: 0; pointer-events: none;
    width: 360px; height: 360px; border-radius: 50%;
    left: calc(50% - 330px); top: calc(50% - 280px);
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .7), rgba(244, 114, 182, .32) 55%, transparent 72%);
    filter: blur(2px);
}

/* adm2026 → POS 自動登入連結（2026-10-15） */
.adm-sso-login { text-align: center; margin-top: 12px; font-size: 14px; }
.adm-sso-login a { color: #be185d; text-decoration: none; }
.adm-sso-login a:hover { text-decoration: underline; }
