.wma-box {
    --wma-purple: #87699F;
    --wma-purple-dark: #6d527f;
    --wma-red: #EC4F53;
    --wma-yellow: #FDD700;
    --wma-text: #1a1a1a;
    --wma-muted: #6b7280;
    --wma-border: #e5e7eb;
    --wma-bg: #ffffff;

    max-width: 380px;
    margin: 1.5rem auto;
    padding: 1.5rem 1.5rem 1.35rem;
    background: var(--wma-bg);
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(135, 105, 159, 0.1), 0 1px 3px rgba(0, 0, 0, 0.04);
    font-family: "Poppins", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--wma-text);
    box-sizing: border-box;
    position: relative;
}

.wma-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 3px;
    background: linear-gradient(90deg, var(--wma-red) 0%, var(--wma-yellow) 50%, var(--wma-purple) 100%);
    border-radius: 0 0 3px 3px;
}

.wma-box *,
.wma-box *::before,
.wma-box *::after {
    box-sizing: border-box;
}

.wma-box .wma-tabs {
    display: flex;
    gap: 0;
    margin: 0 0 1.1rem;
    background: transparent;
    padding: 0;
    border-bottom: 1px solid var(--wma-border);
}

.wma-box button.wma-tab,
.wma-box .wma-tab {
    flex: 1;
    padding: 0.6rem 0.5rem !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    font-family: inherit !important;
    color: var(--wma-muted) !important;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    letter-spacing: 0.1px;
    line-height: 1.3 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    text-transform: none !important;
    margin: 0 !important;
    margin-bottom: -1px !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    min-width: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.wma-box button.wma-tab:hover,
.wma-box .wma-tab:hover {
    color: var(--wma-text) !important;
    background: transparent !important;
    transform: none !important;
}

.wma-box button.wma-tab-active,
.wma-box .wma-tab-active {
    color: var(--wma-purple) !important;
    font-weight: 600 !important;
    border-bottom-color: var(--wma-purple) !important;
    background: transparent !important;
}

.wma-box .wma-alert {
    display: none;
    padding: 0.6rem 0.8rem;
    border-radius: 7px;
    margin-bottom: 0.9rem;
    font-size: 0.8rem;
    line-height: 1.4;
}

.wma-box .wma-alert-error {
    display: block;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-left: 3px solid var(--wma-red);
}

.wma-box .wma-alert-success {
    display: block;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-left: 3px solid #10b981;
}

.wma-box .wma-form {
    display: none;
}

.wma-box .wma-form-active {
    display: block;
}

.wma-box .wma-field {
    margin-bottom: 0.9rem;
}

.wma-box .wma-field-inline {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.wma-box .wma-field-inline label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--wma-muted);
    cursor: pointer;
    margin: 0;
    font-weight: 400;
}

.wma-box .wma-field-inline input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: var(--wma-purple);
}

.wma-box .wma-field label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--wma-text);
    letter-spacing: 0.1px;
}

.wma-box .wma-field input[type="text"],
.wma-box .wma-field input[type="email"],
.wma-box .wma-field input[type="password"] {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--wma-border);
    border-radius: 7px;
    font-size: 0.88rem;
    font-family: inherit;
    background: var(--wma-bg);
    color: var(--wma-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    height: auto;
    line-height: 1.4;
    box-shadow: none;
}

.wma-box .wma-field input:focus {
    outline: none;
    border-color: var(--wma-purple);
    box-shadow: 0 0 0 2px rgba(135, 105, 159, 0.15);
}

.wma-box .wma-hint {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.7rem;
    color: var(--wma-muted);
    line-height: 1.4;
}

.wma-box .wma-strength {
    margin-top: 0.4rem;
}

.wma-box .wma-strength-bar {
    height: 3px;
    background: #f3f0f7;
    border-radius: 2px;
    overflow: hidden;
}

.wma-box .wma-strength-bar span {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--wma-red);
    transition: width 0.3s ease, background 0.3s ease;
    border-radius: 2px;
}

.wma-box .wma-strength-label {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.wma-box button.wma-submit,
.wma-box .wma-submit {
    width: 100% !important;
    padding: 0.7rem 1rem !important;
    background: var(--wma-purple) !important;
    background-color: var(--wma-purple) !important;
    background-image: none !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    letter-spacing: 0.2px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    margin: 0.5rem 0 0 !important;
    line-height: 1.3 !important;
    height: auto !important;
    min-height: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    text-transform: none !important;
    display: block;
}

.wma-box button.wma-submit:hover:not(:disabled),
.wma-box .wma-submit:hover:not(:disabled) {
    background: var(--wma-purple-dark) !important;
    background-color: var(--wma-purple-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(135, 105, 159, 0.25) !important;
}

.wma-box button.wma-submit:disabled,
.wma-box .wma-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.wma-box .wma-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wma-spin 0.7s linear infinite;
}

.wma-box .wma-submit.wma-loading .wma-submit-label {
    visibility: hidden;
}

.wma-box .wma-submit.wma-loading .wma-spinner {
    display: block;
}

@keyframes wma-spin {
    to { transform: rotate(360deg); }
}

.wma-logged {
    text-align: center;
}

.wma-logged p {
    margin: 0 0 0.5rem;
    font-size: 0.88rem;
    color: var(--wma-text);
}

.wma-link,
.wma-logout-link {
    color: var(--wma-purple);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.wma-link:hover,
.wma-logout-link:hover {
    color: var(--wma-red);
    text-decoration: underline;
}

@media (max-width: 520px) {
    .wma-box {
        margin: 1rem;
        padding: 1.25rem;
    }
    .wma-box::before {
        left: 1.25rem;
        right: 1.25rem;
    }
}
