/* 重置全域變數與 Bootstrap 相容設定 */
:root {
    --auth-bg: #FFFFFF;
    --auth-surface: #F5F6F8;
    --auth-fg: #4a4a4a;
    --auth-accent: #FFCC33;
    --auth-text-muted: #888888;
}

.auth-view {
    width: 100%;
    min-height: 80vh;
    background-color: var(--auth-bg);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden; /* 🌟 鎖死畫面，防止原生鍵盤擠破版面 */
}

/* 導覽列與進度條 */
.auth-top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 20px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.btn-nav-text {
    color: var(--auth-text-muted);
    font-weight: 700;
    font-size: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}
.btn-nav-text.back-btn { font-size: 1.5rem; color: var(--auth-fg); font-weight: 900; }

.step-tracker-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px 20px 15px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.tracker-node {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-weight: 700; font-size: 1rem;
    background-color: var(--auth-surface);
    color: var(--auth-text-muted);
    border: 2px solid transparent;
    z-index: 2; flex-shrink: 0;
}
.tracker-node.active { background-color: var(--auth-accent); color: #4a4a4a; font-weight: 800; }
.tracker-node.completed { background-color: #4a4a4a; color: white; }
.tracker-line { flex: 1; height: 4px; background-color: var(--auth-surface); margin: 0 -2px; z-index: 1; }
.tracker-line.completed { background-color: #4a4a4a; }

/* 內容區與無陰影輸入框 */
.auth-content {
    flex: 1;
    padding: 0 20px 5px 20px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    overflow-y: auto; /* 🌟 內容過長時允許內部滾動 */
    scroll-behavior: smooth;
}

.brand-logo { width: 168px; margin-top: 25px; margin-bottom: 0px; }
.taxi-hero { width: 200px; margin-bottom: 30px; }

.auth-title { font-weight: 900; font-size: 1.8rem; margin-bottom: 5px; color: #4a4a4a; }
.auth-subtitle { color: var(--auth-text-muted); font-weight: 600; margin-bottom: 5px; }

.phone-input-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 10px;
}

.input-massive {
    width: 100%;
    height: 60px;
    background-color: var(--auth-surface);
    border: 2px solid transparent;
    border-radius: 16px;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--auth-fg);
    text-align: center;
    margin-bottom: 20px;
    box-shadow: none !important;
    transition: all 0.2s;
}

.phone-input-wrapper .input-massive { margin-bottom: 0; }
.input-massive:focus { outline: none; border-color: var(--auth-fg); background-color: #FFF; }

.input-massive.auth-active-input {
    border-color: var(--auth-accent);
    background-color: #FFF;
    box-shadow: 0 0 0 4px rgba(255, 204, 51, 0.2) !important;
}

.btn-massive {
    width: 100%;
    height: 60px;
    background-color: var(--auth-accent);
    color: #4a4a4a;
    font-size: 1.2rem;
    font-weight: 900;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    margin-top: auto;
    margin-bottom: 41px;
    box-shadow: none !important;
    flex-shrink: 0;
}

/* 6 宮格密碼扁平化 */
.pin-label { font-weight: 800; text-align: left; margin-bottom: 5px; color: #4a4a4a; }
.pin-grid {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 1px;
    padding: 5px;
    border: 2px solid transparent;
    border-radius: 16px;
    transition: opacity 0.2s, border-color 0.2s, background-color 0.2s;
}
.pin-grid.inactive { opacity: 0.3; }

.pin-grid.auth-active-input {
    border-color: var(--auth-accent);
    background-color: rgba(255, 204, 51, 0.05);
}

.pin-box {
    flex: 1;
    aspect-ratio: 1 / 1.1;
    border-radius: 12px;
    background-color: var(--auth-surface);
    border: 2px solid transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: 800;
    color: #4a4a4a;
}
.pin-box.active { border-color: var(--auth-fg); background-color: #FFF; }
.pin-box.filled { background-color: #4a4a4a; color: #FFF; border-color: #4a4a4a; }

.option-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.btn-option {
    flex: 1 1 calc(33% - 10px);
    background-color: var(--auth-surface);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 15px 5px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; cursor: pointer;
}
.btn-option.w-50 { flex: 1 1 calc(50% - 10px); }
.btn-option i { font-size: 1.8rem; color: var(--auth-text-muted); }
.opt-label { font-size: 0.9rem; font-weight: 700; color: var(--auth-text-muted); }
.opt-val { font-size: 2.25rem; font-weight: 900; color: #4a4a4a; }

.btn-option.selected { background-color: #4a4a4a; border-color: #4a4a4a; }
.btn-option.selected i, .btn-option.selected .opt-label, .btn-option.selected .opt-val { color: #FFF; }

.btn-taxi-red.selected { background-color: #DC3545; border-color: #DC3545; }
.btn-taxi-green.selected { background-color: #198754; border-color: #198754; }
.btn-taxi-blue.selected { background-color: #0D6EFD; border-color: #0D6EFD; }

.plate-section { margin-top: 0px; margin-bottom: 20px; text-align: left; }
.helper-text-bottom { text-align: center; font-size: 0.9rem; color: var(--auth-text-muted); font-weight: 600; margin-bottom: 15px; }

/* 🌟 Auth 專屬獨立數字鍵盤 (推擠式設計，不覆蓋畫面) */
.auth-numpad {
    background-color: #FFFFFF;
    padding: 15px 15px 45px 15px; 
    border-radius: 24px 24px 0 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.08);
    flex-shrink: 0; /* 確保鍵盤不會被壓縮 */
    
    /* 滑動特效：透過 margin 負值隱藏，展開時變回 0 將上方內容推上去 */
    margin-bottom: -400px;
    transition: margin-bottom 0.3s cubic-bezier(0.175, 0.885, 0.32, 1);
}
.auth-numpad.active {
    margin-bottom: 0;
}

.auth-numpad-key {
    background-color: var(--auth-surface);
    border-radius: 16px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: #4a4a4a;
    cursor: pointer;
    user-select: none;
    touch-action: none;
    transition: all 0.1s;
}
.auth-numpad-key:active { transform: scale(0.95); background-color: #E5E7EB; }
.auth-numpad-key.action { background-color: #333; color: #FFF; }
.auth-numpad-key.action:active { background-color: #4a4a4a; }
.auth-numpad-key.done { background-color: var(--auth-accent); color: #4a4a4a; }