/* templates/proton/style.css - Proton Mail 风格 */
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f4f2ff;
    color: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
    -webkit-font-smoothing: antialiased;
    padding: 24px;
}

.card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    padding: 40px;
    margin-bottom: 40px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.brand-mark {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: #6d4aff;
}

.brand-mark svg {
    width: 100%;
    height: 100%;
}

.brand-text {
    font-size: 16px;
    font-weight: 650;
    color: #6d4aff;
    letter-spacing: -0.01em;
}

h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 600;
    color: #111827;
    letter-spacing: -0.02em;
}

.sub {
    margin: 0 0 30px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.field input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    font-size: 15px;
    color: #111827;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.field input::placeholder {
    color: #9ca3af;
}

.field input[readonly] {
    background: #f9fafb;
    color: #6b7280;
    cursor: default;
}

.field input:focus {
    border-color: #6d4aff;
    box-shadow: 0 0 0 3px rgba(109, 74, 255, 0.1);
}

.control {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.18s;
    display: grid;
    place-items: center;
}

.toggle-password:hover {
    color: #6d4aff;
}

.toggle-password svg {
    width: 18px;
    height: 18px;
}

.checkbox-group {
    margin-top: 20px;
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #6d4aff;
    cursor: pointer;
}

.checkbox-hint {
    margin: 6px 0 0 24px;
    font-size: 12px;
    color: #6b7280;
}

.checkbox-hint a {
    color: #6d4aff;
    text-decoration: none;
}

.checkbox-hint a:hover {
    text-decoration: underline;
}

.submit {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: #6d4aff;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    font-family: inherit;
}

.submit:hover {
    background: #5b3df5;
    transform: translateY(-1px);
}

.submit:active {
    transform: translateY(0);
}

.submit:disabled {
    opacity: 0.55;
    cursor: wait;
    transform: none;
}

.message {
    min-height: 20px;
    margin: 14px 0 0;
    font-size: 13px;
    color: #dc2626;
    text-align: center;
}

.links {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #6b7280;
}

.links p {
    margin: 0 0 12px;
}

.links a {
    color: #6d4aff;
    text-decoration: none;
}

.links a:hover {
    text-decoration: underline;
}

.divider {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 20px 0;
}

.footer {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    max-width: 420px;
    width: 100%;
}

.app-icons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.icon {
    width: 22px;
    height: 22px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.icon:hover {
    opacity: 1;
}

.footer-text {
    margin: 0 0 12px;
    font-weight: 500;
    color: #374151;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.footer-links a {
    color: #6d4aff;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-links span {
    color: #9ca3af;
}

.help-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s, transform 0.2s;
    z-index: 100;
}

.help-button:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.help-button svg {
    width: 16px;
    height: 16px;
    color: #6d4aff;
}

/* 响应式调整 */
@media (max-width: 480px) {
    body {
        padding: 16px;
        justify-content: flex-start;
    }
    
    .card {
        padding: 28px 20px;
        border-radius: 12px;
        box-shadow: none;
        background: transparent;
        margin-bottom: 20px;
    }
    
    .footer {
        background: transparent;
    }
    
    .help-button {
        bottom: 16px;
        right: 16px;
    }
}