/* DWC Subscription — Auth (Login / Register) Page */

:root {
    --dwc-blue:    #1a56db;
    --dwc-blue-lt: #eff6ff;
    --dwc-border:  #e2e8f0;
    --dwc-radius:  12px;
    --dwc-font:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --dwc-red:     #dc2626;
    --dwc-green:   #16a34a;
}

.dwc-auth-wrap {
    max-width: 460px;
    margin: 32px auto 64px;
    font-family: var(--dwc-font);
    color: #111827;
}

/* Tabs */
.dwc-auth-tabs {
    display: flex;
    border: 1px solid var(--dwc-border);
    border-radius: var(--dwc-radius);
    overflow: hidden;
    margin-bottom: 20px;
}
.dwc-auth-tab {
    flex: 1;
    padding: 13px;
    background: #f9fafb;
    border: none;
    font-size: .95rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.dwc-auth-tab:first-child { border-right: 1px solid var(--dwc-border); }
.dwc-auth-tab.dwc-tab-active {
    background: #fff;
    color: var(--dwc-blue);
}
.dwc-auth-tab:hover:not(.dwc-tab-active) { background: #f3f4f6; color: #374151; }

/* Card */
.dwc-auth-card {
    background: #fff;
    border: 1px solid var(--dwc-border);
    border-radius: var(--dwc-radius);
    padding: 36px 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
}

.dwc-auth-avatar {
    text-align: center;
    margin-bottom: 12px;
}
.dwc-avatar-img {
    width: 64px !important;
    height: 64px !important;
    border-radius: 50%;
    border: 3px solid var(--dwc-blue-lt);
}

.dwc-auth-title {
    font-size: 1.45rem;
    font-weight: 700;
    margin: 0 0 6px;
    text-align: center;
}
.dwc-auth-sub, .dwc-auth-email {
    text-align: center;
    color: #6b7280;
    font-size: .92rem;
    margin: 0 0 24px;
}

/* Form fields */
.dwc-auth-field {
    margin-bottom: 18px;
}
.dwc-auth-field label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: .875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.dwc-forgot {
    font-size: .8rem;
    font-weight: 400;
    color: var(--dwc-blue);
    text-decoration: none;
}
.dwc-forgot:hover { text-decoration: underline; }
.dwc-hint { font-weight: 400; color: #9ca3af; font-size: .8rem; }

.dwc-auth-field input[type="email"],
.dwc-auth-field input[type="text"],
.dwc-auth-field input[type="password"] {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: .95rem;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    background: #fff;
    color: #111827;
}
.dwc-auth-field input:focus {
    outline: none;
    border-color: var(--dwc-blue);
    box-shadow: 0 0 0 3px rgba(26,86,219,.12);
}
.dwc-auth-field input.dwc-field-invalid {
    border-color: var(--dwc-red);
    box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}
.dwc-auth-field input.dwc-field-valid {
    border-color: var(--dwc-green);
}

/* Password wrapper (input + toggle button) */
.dwc-pw-wrap {
    position: relative;
}
.dwc-pw-wrap input { padding-right: 44px; }
.dwc-pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color .15s;
}
.dwc-pw-toggle:hover { color: #374151; }

/* Password strength bar */
.dwc-pw-strength {
    height: 4px;
    border-radius: 2px;
    background: #e5e7eb;
    margin-top: 6px;
    overflow: hidden;
    position: relative;
}
.dwc-pw-strength::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    border-radius: 2px;
    transition: width .3s, background .3s;
    width: var(--strength-w, 0%);
    background: var(--strength-c, #e5e7eb);
}

/* Field error text */
.dwc-field-error {
    display: block;
    font-size: .8rem;
    color: var(--dwc-red);
    margin-top: 4px;
    min-height: 1em;
}

/* Remember me */
.dwc-auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .875rem;
    color: #374151;
    margin-bottom: 20px;
    cursor: pointer;
}
.dwc-auth-remember input { width: auto; }

/* Error / success notice */
.dwc-auth-error {
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    color: #991b1b;
    font-size: .88rem;
    margin-bottom: 16px;
}

/* Buttons */
.dwc-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: .95rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background .15s, transform .1s;
    font-family: var(--dwc-font);
    text-align: center;
}
.dwc-btn-primary {
    background: var(--dwc-blue);
    color: #fff !important;
    width: 100%;
    font-size: 1rem;
}
.dwc-btn-primary:hover  { background: #1447b0; transform: translateY(-1px); }
.dwc-btn-primary:active { transform: translateY(0); }
.dwc-btn-ghost {
    background: transparent;
    color: #6b7280;
    border: 1.5px solid var(--dwc-border);
    width: 100%;
}
.dwc-btn-ghost:hover { border-color: #9ca3af; color: #374151; }

.dwc-btn-spin, .dwc-btn-text { display: flex; align-items: center; justify-content: center; gap: 6px; }

/* Inline spinner */
@keyframes dwc-spin { to { transform: rotate(360deg); } }
.dwc-spinner-inline {
    display: inline-block;
    width: 15px; height: 15px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dwc-spin .7s linear infinite;
}

/* Switch link (e.g. "Already have an account?") */
.dwc-auth-switch {
    text-align: center;
    margin: 20px 0 0;
    font-size: .88rem;
    color: #6b7280;
}
.dwc-link-btn {
    background: none;
    border: none;
    color: var(--dwc-blue);
    font-weight: 600;
    font-size: inherit;
    cursor: pointer;
    padding: 0;
    font-family: var(--dwc-font);
}
.dwc-link-btn:hover { text-decoration: underline; }

/* Logged-in state */
.dwc-sub-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: .9rem;
    margin-bottom: 20px;
}
.dwc-sub-active { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.dwc-sub-none   { background: #fff7ed; border: 1px solid #fed7aa; color: #92400e; }
.dwc-sub-none a { color: inherit; font-weight: 600; }
