﻿* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Microsoft JhengHei', 'PingFang TC', sans-serif;
    background-color: #f0f2f5;
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: env(safe-area-inset-bottom);
}

.header {
    background: linear-gradient(135deg, #0f3490, #1a56db, #2563eb);
    color: white;
    padding: 24px 16px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 50%);
}

.header-inner {
    position: relative;
    z-index: 1;
}

.header-logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.header-subtitle {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 6px;
    letter-spacing: 2px;
}

.container {
    max-width: 460px;
    margin: -12px auto 0;
    padding: 0 14px 20px;
    position: relative;
    z-index: 2;
}

.card {
    background: #fff;
    border-radius: 14px;
    padding: 20px 18px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 0 1px rgba(0,0,0,0.08);
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2ff;
    letter-spacing: 0.5px;
}

.merchant-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 8px;
}

.merchant-row:last-child {
    margin-bottom: 0;
}

.merchant-row .label {
    font-size: 12px;
    color: #64748b;
}

.merchant-row .value {
    font-size: 14px;
    font-weight: 600;
}

.merchant-row .value.danger {
    color: #dc2626;
}

.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 13px;
    color: #475569;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.form-label .required {
    color: #ef4444;
    margin-left: 2px;
}

.form-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    color: #1e293b;
    background: #fff;
    transition: all 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

.form-input::placeholder {
    color: #94a3b8;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1a56db, #2563eb);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
    margin-bottom: 4px;
}

.submit-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.footer {
    text-align: center;
    padding: 20px 16px 16px;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.8;
}

.footer .secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 12px;
    margin-bottom: 8px;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 320px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { transform: scale(0.92) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
    padding: 24px 20px 0;
    text-align: center;
}

.modal-header .modal-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.modal-header .modal-title {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
}

.modal-body {
    padding: 10px 24px 24px;
    font-size: 14px;
    color: #475569;
    line-height: 1.8;
    text-align: center;
    white-space: pre-line;
}

.modal-footer {
    border-top: 1px solid #f1f5f9;
}

.modal-btn {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    background: none;
    font-size: 16px;
    font-weight: 600;
    color: #2563eb;
    cursor: pointer;
}

.modal-btn:active {
    background: #f8fafc;
}
