/**
 * My Account — Full Account Page Stylesheet
 *
 * Styles the Rise-owned WooCommerce account experience:
 * shell, user header, tab navigation, sections, tables,
 * download cards, address cards, forms, login, and notices.
 *
 * Design tokens mirror the Rise Admin dashboard.
 *
 * @package Rise_Core
 * @since   1.1.0
 */

/* =============================================
   1. CSS Variables (Design Tokens)
   ============================================= */
.rise-account-page,
.rise-account {
    --rise-primary: #779ecb;
    --rise-primary-hover: #6a8dba;
    --rise-text: #1f2937;
    --rise-text-secondary: #6b7280;
    --rise-text-muted: #9ca3af;
    --rise-bg: #ffffff;
    --rise-bg-subtle: #f8f9fa;
    --rise-bg-hover: #f9fafb;
    --rise-border: #e8eaed;
    --rise-border-hover: #d0dae8;
    --rise-radius: 12px;
    --rise-radius-sm: 8px;
    --rise-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    --rise-shadow-hover: 0 4px 12px rgba(119, 158, 203, 0.12);
    --rise-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;

    /* Status colours */
    --rise-status-active-bg: #dcfce7;
    --rise-status-active-text: #166534;
    --rise-status-active-dot: #22c55e;
    --rise-status-processing-bg: #dbeafe;
    --rise-status-processing-text: #1e40af;
    --rise-status-processing-dot: #3b82f6;
    --rise-status-on-hold-bg: #fef3c7;
    --rise-status-on-hold-text: #92400e;
    --rise-status-on-hold-dot: #f59e0b;
    --rise-status-completed-bg: #dcfce7;
    --rise-status-completed-text: #166534;
    --rise-status-completed-dot: #22c55e;
    --rise-status-cancelled-bg: #f3f4f6;
    --rise-status-cancelled-text: #6b7280;
    --rise-status-cancelled-dot: #9ca3af;
    --rise-status-refunded-bg: #fef2f2;
    --rise-status-refunded-text: #991b1b;
    --rise-status-refunded-dot: #ef4444;
    --rise-status-failed-bg: #fef2f2;
    --rise-status-failed-text: #991b1b;
    --rise-status-failed-dot: #ef4444;
    --rise-status-pending-bg: #fef3c7;
    --rise-status-pending-text: #92400e;
    --rise-status-pending-dot: #f59e0b;
    --rise-status-expired-bg: #fef3c7;
    --rise-status-expired-text: #92400e;
    --rise-status-expired-dot: #f59e0b;
    --rise-status-suspended-bg: #f3f4f6;
    --rise-status-suspended-text: #6b7280;
    --rise-status-suspended-dot: #9ca3af;
}

/* =============================================
   2. Page Reset & Account Shell
   ============================================= */
.rise-account-page {
    margin: 0;
    padding: 0;
    font-family: var(--rise-font);
    color: var(--rise-text);
    line-height: 1.5;
    background: var(--rise-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.rise-account-page *,
.rise-account-page *::before,
.rise-account-page *::after {
    box-sizing: border-box;
}

.rise-account {
    display: flex;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
    min-height: calc(100vh - 53px); /* fill below topbar */
}

/* =============================================
   3. Top Bar (Full-Width Navigation)
   ============================================= */
.rise-topbar {
    border-bottom: 1px solid var(--rise-border);
    background: var(--rise-bg);
}

.rise-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75em 1.5em;
}

/* Logo */
.rise-topbar__logo,
.rise-topbar__logo:link,
.rise-topbar__logo:visited {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.rise-topbar__logo img {
    height: 32px !important;
    width: auto !important;
    display: block;
}

/* User cluster (right side) */
.rise-topbar__user {
    display: flex;
    align-items: center;
    gap: 0.75em;
}

.rise-topbar__user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
}

.rise-topbar__user-name {
    font-size: 0.8em;
    font-weight: 600;
    color: var(--rise-text);
    line-height: 1.3;
}

.rise-topbar__user-email {
    font-size: 0.7em;
    color: var(--rise-text-muted);
    line-height: 1.3;
}

/* Avatar */
.rise-topbar__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}


/* =============================================
   4. Sidebar Navigation (Vertical)
   ============================================= */
.rise-account__sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 220px;
    flex-shrink: 0;
    padding: 2.5em 0;
}

/* Top section — tab links */
.rise-account__nav-links {
    display: flex;
    flex-direction: column;
}

.rise-account__nav-item,
.rise-account__nav-item:link,
.rise-account__nav-item:visited {
    display: flex;
    align-items: center;
    gap: 0.65em;
    padding: 0.65em 1.25em;
    margin: 0 0.75em;
    font-size: 0.85em;
    font-weight: 500;
    color: var(--rise-text-secondary);
    text-decoration: none;
    border-radius: var(--rise-radius-sm);
    transition: all 0.15s ease;
    white-space: nowrap;
    position: relative;
}

.rise-account__nav-item:hover {
    color: var(--rise-text);
    background: var(--rise-bg-subtle);
    text-decoration: none;
}

.rise-account__nav-item--active,
.rise-account__nav-item--active:link,
.rise-account__nav-item--active:visited {
    color: var(--rise-primary);
    background: rgba(119, 158, 203, 0.08);
    font-weight: 600;
}

.rise-account__nav-item--active:hover {
    color: var(--rise-primary);
    background: rgba(119, 158, 203, 0.12);
}

/* Logout — pinned to bottom */
.rise-account__nav-logout,
.rise-account__nav-logout:link,
.rise-account__nav-logout:visited {
    color: var(--rise-text-muted);
    border-top: 1px solid var(--rise-border);
    border-radius: 0;
    margin: 0;
    padding: 1em 1.25em;
    margin-left: 0.75em;
    margin-right: 0.75em;
}

.rise-account__nav-logout:hover {
    color: var(--rise-text);
    background: transparent;
}

.rise-account__nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.rise-account__nav-icon svg {
    display: block;
}

.rise-account__nav-label {
    line-height: 1;
}

/* =============================================
   5. Content Area
   ============================================= */
.rise-account__content {
    flex: 1;
    min-width: 0;
    padding: 2.5em 2.5em;
    min-height: 200px;
}

/* =============================================
   6. Section Titles
   ============================================= */
.rise-account__section {
    margin-bottom: 2em;
}

.rise-account__section-header {
    margin-bottom: 1.25em;
}

.rise-account__section-title {
    font-size: 1.3em;
    font-weight: 700;
    margin: 0 0 1em !important;
    color: var(--rise-text);
    line-height: 1.3;
}

.rise-account__back-link,
.rise-account__back-link:link,
.rise-account__back-link:visited {
    display: inline-block;
    font-size: 0.85em;
    color: var(--rise-primary);
    text-decoration: none;
    margin-bottom: 0.5em;
    transition: color 0.2s ease;
}

.rise-account__back-link:hover {
    color: var(--rise-primary-hover);
    text-decoration: none;
}

.rise-account__muted {
    color: var(--rise-text-muted);
}

/* =============================================
   7. Tables (Orders, Subscriptions)
   ============================================= */
.rise-account__table {
    width: 100%;
    border-collapse: collapse;
    background: var(--rise-bg);
    border: 1px solid var(--rise-border);
    border-radius: var(--rise-radius);
    overflow: hidden;
    font-size: 0.875em;
}

.rise-account__table thead th {
    text-align: left;
    padding: 0.75em 1em;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--rise-text-secondary);
    background: var(--rise-bg-subtle);
    border-bottom: 1px solid var(--rise-border);
}

.rise-account__table tbody td {
    padding: 0.85em 1em;
    border-bottom: 1px solid #f3f4f6;
    color: var(--rise-text);
    vertical-align: middle;
}

.rise-account__table tbody tr:last-child td {
    border-bottom: none;
}

.rise-account__table tfoot th,
.rise-account__table tfoot td {
    padding: 0.75em 1em;
    border-top: 1px solid var(--rise-border);
    font-size: 0.9em;
}

.rise-account__table-right {
    text-align: right !important;
}

.rise-account__view-link,
.rise-account__view-link:link,
.rise-account__view-link:visited {
    font-size: 0.85em;
    font-weight: 500;
    color: var(--rise-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.rise-account__view-link:hover {
    color: var(--rise-primary-hover);
    text-decoration: none;
}

/* =============================================
   8. Order Status Badges
   ============================================= */
.rise-order-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 0.75em;
    font-weight: 600;
    white-space: nowrap;
}

.rise-order-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Active / Complete */
.rise-order-status--completed,
.rise-order-status--active {
    background: var(--rise-status-completed-bg);
    color: var(--rise-status-completed-text);
}
.rise-order-status--completed::before,
.rise-order-status--active::before {
    background: var(--rise-status-completed-dot);
}

/* Processing */
.rise-order-status--processing {
    background: var(--rise-status-processing-bg);
    color: var(--rise-status-processing-text);
}
.rise-order-status--processing::before {
    background: var(--rise-status-processing-dot);
}

/* On Hold / Pending */
.rise-order-status--on-hold,
.rise-order-status--pending,
.rise-order-status--pending-cancel,
.rise-order-status--expired {
    background: var(--rise-status-on-hold-bg);
    color: var(--rise-status-on-hold-text);
}
.rise-order-status--on-hold::before,
.rise-order-status--pending::before,
.rise-order-status--pending-cancel::before,
.rise-order-status--expired::before {
    background: var(--rise-status-on-hold-dot);
}

/* Cancelled / Suspended */
.rise-order-status--cancelled,
.rise-order-status--suspended {
    background: var(--rise-status-cancelled-bg);
    color: var(--rise-status-cancelled-text);
}
.rise-order-status--cancelled::before,
.rise-order-status--suspended::before {
    background: var(--rise-status-cancelled-dot);
}

/* Refunded / Failed */
.rise-order-status--refunded,
.rise-order-status--failed {
    background: var(--rise-status-refunded-bg);
    color: var(--rise-status-refunded-text);
}
.rise-order-status--refunded::before,
.rise-order-status--failed::before {
    background: var(--rise-status-refunded-dot);
}

/* =============================================
   9. Order Detail Page
   ============================================= */
.rise-order-detail {
    background: var(--rise-bg);
}

.rise-order-detail__meta {
    display: flex;
    align-items: center;
    gap: 1em;
    margin-bottom: 1.25em;
}

.rise-order-detail__date {
    font-size: 0.875em;
    color: var(--rise-text-secondary);
}

.rise-order-detail__qty {
    color: var(--rise-text-muted);
    font-size: 0.9em;
    margin-left: 4px;
}

/* =============================================
   10. Billing — Subscription Status Cards
   ============================================= */
.rise-billing__subs {
    display: flex;
    flex-direction: column;
    gap: 0.75em;
    margin-bottom: 2em;
}

.rise-billing__sub-card {
    background: var(--rise-bg);
    border: 1px solid var(--rise-border);
    border-radius: var(--rise-radius);
    padding: 1.25em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rise-billing__sub-card:hover {
    border-color: var(--rise-border-hover);
    box-shadow: var(--rise-shadow-hover);
}

.rise-billing__sub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75em;
    margin-bottom: 0.5em;
}

.rise-billing__sub-name {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--rise-text);
}

.rise-billing__sub-meta {
    display: flex;
    align-items: center;
    gap: 1.25em;
    font-size: 0.8em;
    color: var(--rise-text-secondary);
}

.rise-billing__sub-price {
    font-weight: 500;
    color: var(--rise-text);
}

.rise-billing__sub-next {
    color: var(--rise-text-muted);
}

.rise-billing__sub-actions {
    margin-top: 0.75em;
    padding-top: 0.75em;
    border-top: 1px solid #f3f4f6;
}

/* =============================================
   10b. Settings — Section Spacing
   ============================================= */
.rise-settings__section {
    margin-bottom: 2em;
}

.rise-settings__section:last-child {
    margin-bottom: 0;
}

/* =============================================
   11. Subscription Detail View
   ============================================= */
.rise-sub-detail {
    background: var(--rise-bg);
    border: 1px solid var(--rise-border);
    border-radius: var(--rise-radius);
    padding: 1.5em;
}

.rise-sub-detail__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75em;
    margin-bottom: 1.25em;
    padding-bottom: 1.25em;
    border-bottom: 1px solid #f3f4f6;
}

.rise-sub-detail__title {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 !important;
    color: var(--rise-text);
}

.rise-sub-detail__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1em;
    margin-bottom: 1.25em;
}

.rise-sub-detail__meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rise-sub-detail__meta-label {
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--rise-text-muted);
}

.rise-sub-detail__meta-value {
    font-size: 0.85em;
    font-weight: 500;
    color: var(--rise-text);
}

.rise-sub-detail__actions {
    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
    padding-top: 1.25em;
    border-top: 1px solid #f3f4f6;
}

.rise-sub-detail__action-btn,
.rise-sub-detail__action-btn:link,
.rise-sub-detail__action-btn:visited {
    display: inline-flex;
    align-items: center;
    padding: 0.45em 1.1em;
    font-size: 0.8em;
    font-weight: 500;
    border-radius: var(--rise-radius-sm);
    text-decoration: none;
    border: 1px solid var(--rise-border);
    background: var(--rise-bg);
    color: var(--rise-text);
    transition: all 0.2s ease;
    cursor: pointer;
}

.rise-sub-detail__action-btn:hover {
    border-color: var(--rise-border-hover);
    background: var(--rise-bg-hover);
    text-decoration: none;
}

.rise-sub-detail__action-btn--danger,
.rise-sub-detail__action-btn--danger:link,
.rise-sub-detail__action-btn--danger:visited {
    color: #991b1b;
    border-color: #fecaca;
}

.rise-sub-detail__action-btn--danger:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

/* =============================================
   12. Settings Cards (Profile, Password, Billing)
   ============================================= */
.rise-settings__card {
    background: var(--rise-bg);
    border: 1px solid var(--rise-border);
    border-radius: var(--rise-radius);
    padding: 1.25em;
    margin-bottom: 1em;
}

.rise-settings__card:last-child {
    margin-bottom: 0;
}

.rise-settings__card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75em;
    padding-bottom: 0.75em;
    border-bottom: 1px solid #f3f4f6;
}

.rise-settings__card-title {
    font-size: 0.95em;
    font-weight: 600;
    margin: 0 !important;
    color: var(--rise-text);
}

.rise-settings__edit-link,
.rise-settings__edit-link:link,
.rise-settings__edit-link:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--rise-radius-sm);
    color: var(--rise-text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.rise-settings__edit-link:hover {
    color: var(--rise-primary);
    background: var(--rise-bg-subtle);
    text-decoration: none;
}

.rise-settings__edit-link svg {
    display: block;
}

.rise-settings__card-body {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.rise-settings__field {
    display: flex;
    align-items: baseline;
    gap: 1em;
}

.rise-settings__field-label {
    font-size: 0.8em;
    font-weight: 600;
    color: var(--rise-text-muted);
    min-width: 60px;
    flex-shrink: 0;
}

.rise-settings__field-value {
    font-size: 0.875em;
    color: var(--rise-text);
}

.rise-settings__address {
    font-style: normal;
    font-size: 0.875em;
    color: var(--rise-text-secondary);
    line-height: 1.6;
}

.rise-settings__empty {
    font-size: 0.85em;
    color: var(--rise-text-muted);
    font-style: italic;
    margin: 0;
}

/* =============================================
   13. Form Overrides (Edit Account, Edit Address)
   ============================================= */
.rise-account__form-wrap {
    background: var(--rise-bg);
    border: 1px solid var(--rise-border);
    border-radius: var(--rise-radius);
    padding: 1.5em;
}

/* WC form field rows */
.rise-account__form-wrap .woocommerce-form-row,
.rise-account__form-wrap .form-row {
    margin-bottom: 1.25em;
}

.rise-account__form-wrap label {
    display: block;
    font-size: 0.8em;
    font-weight: 600;
    color: var(--rise-text);
    margin-bottom: 0.35em;
}

.rise-account__form-wrap label .required {
    color: #ef4444;
}

.rise-account__form-wrap input[type="text"],
.rise-account__form-wrap input[type="email"],
.rise-account__form-wrap input[type="password"],
.rise-account__form-wrap input[type="tel"],
.rise-account__form-wrap select,
.rise-account__form-wrap textarea {
    width: 100%;
    padding: 0.6em 0.85em;
    font-size: 0.875em;
    font-family: var(--rise-font);
    border: 1px solid var(--rise-border);
    border-radius: var(--rise-radius-sm);
    background: var(--rise-bg);
    color: var(--rise-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.rise-account__form-wrap input[type="text"]:focus,
.rise-account__form-wrap input[type="email"]:focus,
.rise-account__form-wrap input[type="password"]:focus,
.rise-account__form-wrap input[type="tel"]:focus,
.rise-account__form-wrap select:focus,
.rise-account__form-wrap textarea:focus {
    border-color: var(--rise-primary);
    box-shadow: 0 0 0 3px rgba(119, 158, 203, 0.15);
}

/* Inline fields (WC uses form-row-first / form-row-last) */
.rise-account__form-wrap .form-row-first,
.rise-account__form-wrap .form-row-last {
    width: 48%;
    display: inline-block;
    vertical-align: top;
}

.rise-account__form-wrap .form-row-first {
    margin-right: 4%;
}

.rise-account__form-wrap .form-row-wide {
    width: 100%;
}

/* Save / Submit button */
.rise-account__form-wrap button[type="submit"],
.rise-account__form-wrap .woocommerce-Button,
.rise-account__form-wrap input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65em 2em;
    font-size: 0.875em;
    font-weight: 600;
    font-family: var(--rise-font);
    background: var(--rise-primary);
    color: #fff;
    border: none;
    border-radius: var(--rise-radius-sm);
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 0.5em;
}

.rise-account__form-wrap button[type="submit"]:hover,
.rise-account__form-wrap .woocommerce-Button:hover,
.rise-account__form-wrap input[type="submit"]:hover {
    background: var(--rise-primary-hover);
}

/* Fieldset (password section in edit-account) */
.rise-account__form-wrap fieldset {
    border: 1px solid var(--rise-border);
    border-radius: var(--rise-radius-sm);
    padding: 1.25em;
    margin: 1.5em 0;
}

.rise-account__form-wrap fieldset legend {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--rise-text);
    padding: 0 0.5em;
}

/* ── Edit profile mode: hide password fieldset ── */
.rise-account__form-wrap--hide-password fieldset {
    display: none;
}

/* ── Change password mode: hide profile fields ── */
/* Hide only the direct form-row children of the form (not those inside the fieldset) */
.rise-account__form-wrap--hide-profile form > p.woocommerce-form-row {
    display: none;
}

/* Hide the .clear divs between profile fields */
.rise-account__form-wrap--hide-profile form > div.clear {
    display: none;
}

/* Remove fieldset border/padding so password fields appear standalone */
.rise-account__form-wrap--hide-profile fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.rise-account__form-wrap--hide-profile fieldset legend {
    display: none;
}

/* =============================================
   14. Empty States
   ============================================= */
.rise-account__empty-state {
    text-align: center;
    padding: 3em 1.5em;
    background: var(--rise-bg);
    border: 1px solid var(--rise-border);
    border-radius: var(--rise-radius);
}

.rise-account__empty-state h3 {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 0.5em !important;
    color: var(--rise-text);
}

.rise-account__empty-state p {
    font-size: 0.875em;
    color: var(--rise-text-secondary);
    margin: 0 0 1.25em;
}

.rise-account__cta-btn,
.rise-account__cta-btn:link,
.rise-account__cta-btn:visited {
    display: inline-flex;
    align-items: center;
    padding: 0.6em 1.5em;
    font-size: 0.85em;
    font-weight: 600;
    background: var(--rise-primary);
    color: #fff !important;
    border: none;
    border-radius: var(--rise-radius-sm);
    text-decoration: none;
    transition: background 0.2s ease;
}

.rise-account__cta-btn:hover {
    background: var(--rise-primary-hover);
    color: #fff !important;
    text-decoration: none;
}

/* =============================================
   15. Login Form
   ============================================= */
/* Override flex layout for login state — center the form */
.rise-account--login {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 3em 1em 2em;
}

/* Logo above login card */
.rise-account__login-logo {
    text-align: center;
    margin-bottom: 1.75em;
}

.rise-account__login-logo a {
    display: inline-block;
    text-decoration: none;
}

.rise-account__login-logo img {
    height: 36px !important;
    width: auto !important;
    display: block;
}

/* Login card */
.rise-account__login {
    width: 100%;
    max-width: 380px;
    background: var(--rise-bg);
    border: 1px solid var(--rise-border);
    border-radius: var(--rise-radius);
    padding: 2em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* "Login" heading */
.rise-account__login h2,
.rise-account__login .woocommerce-form-login h2 {
    font-size: 0.95em;
    font-weight: 500;
    margin: 0 0 1.25em !important;
    color: var(--rise-text-secondary);
    text-align: left;
}

/* Kill any inner form/fieldset borders from WC or theme */
.rise-account__login form,
.rise-account__login .woocommerce-form {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.rise-account__login .woocommerce-form-row,
.rise-account__login .form-row {
    margin-bottom: 1.25em;
}

.rise-account__login label {
    display: block;
    font-size: 0.8em;
    font-weight: 600;
    color: var(--rise-text);
    margin-bottom: 0.35em;
}

.rise-account__login label .required {
    color: #ef4444;
}

.rise-account__login input[type="text"],
.rise-account__login input[type="email"],
.rise-account__login input[type="password"] {
    width: 100% !important;
    padding: 0.7em 0.85em;
    font-size: 0.875em;
    font-family: var(--rise-font);
    border: 1px solid var(--rise-border);
    border-radius: var(--rise-radius-sm);
    background: var(--rise-bg-subtle);
    color: var(--rise-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.rise-account__login input[type="text"]:focus,
.rise-account__login input[type="email"]:focus,
.rise-account__login input[type="password"]:focus {
    border-color: var(--rise-primary);
    background: var(--rise-bg);
    box-shadow: 0 0 0 3px rgba(119, 158, 203, 0.12);
}

/* Submit button */
.rise-account__login button[type="submit"],
.rise-account__login .woocommerce-Button,
.rise-account__login .woocommerce-button,
.rise-account__login .button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75em 1.5em;
    font-size: 0.875em;
    font-weight: 600;
    font-family: var(--rise-font);
    background: var(--rise-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--rise-radius-sm);
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 0.5em;
}

.rise-account__login button[type="submit"]:hover,
.rise-account__login .woocommerce-Button:hover,
.rise-account__login .woocommerce-button:hover,
.rise-account__login .button:hover {
    background: var(--rise-primary-hover) !important;
}

/* Remember me */
.rise-account__login .woocommerce-form-login__rememberme {
    font-size: 0.8em;
    color: var(--rise-text-secondary);
}

/* Lost password link */
.rise-account__login .woocommerce-LostPassword {
    margin-top: 1.25em;
    text-align: center;
}

.rise-account__login .woocommerce-LostPassword a,
.rise-account__login .woocommerce-LostPassword a:link,
.rise-account__login .woocommerce-LostPassword a:visited {
    font-size: 0.8em;
    color: var(--rise-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.rise-account__login .woocommerce-LostPassword a:hover {
    color: var(--rise-primary);
}

/* Hide WC registration form (single login only) */
.rise-account__login .u-column2,
.rise-account__login .col-2 {
    display: none;
}

/* =============================================
   16. WooCommerce Notices
   ============================================= */
.rise-account .woocommerce-message,
.rise-account .woocommerce-info,
.rise-account .woocommerce-error {
    padding: 0.85em 1.25em;
    margin: 0 0 1.25em;
    border-radius: var(--rise-radius-sm);
    font-size: 0.85em;
    line-height: 1.5;
    list-style: none;
    border: 1px solid;
}

.rise-account .woocommerce-message {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

.rise-account .woocommerce-info {
    background: #dbeafe;
    border-color: #bfdbfe;
    color: #1e40af;
}

.rise-account .woocommerce-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.rise-account .woocommerce-message::before,
.rise-account .woocommerce-info::before,
.rise-account .woocommerce-error::before {
    display: none;
}

.rise-account .woocommerce-error li {
    list-style: none;
}

/* =============================================
   17. Responsive
   ============================================= */
@media (max-width: 768px) {
    /* Stack sidebar above content on mobile */
    .rise-account {
        flex-direction: column;
        min-height: auto;
    }

    .rise-account__sidebar {
        flex-direction: row;
        align-items: center;
        width: 100%;
        border-bottom: 1px solid var(--rise-border);
        padding: 0.5em 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .rise-account__sidebar::-webkit-scrollbar {
        display: none;
    }

    .rise-account__nav-links {
        flex-direction: row;
    }

    .rise-account__nav-item,
    .rise-account__nav-item:link,
    .rise-account__nav-item:visited {
        padding: 0.55em 0.85em;
        margin: 0 0.25em;
        font-size: 0.8em;
    }

    /* Logout inline on mobile */
    .rise-account__nav-logout,
    .rise-account__nav-logout:link,
    .rise-account__nav-logout:visited {
        border-top: none;
        border-radius: var(--rise-radius-sm);
        padding: 0.55em 0.85em;
        margin: 0 0.25em;
        margin-left: auto;
    }

    .rise-account__nav-icon {
        width: 16px;
        height: 16px;
    }

    .rise-account__nav-icon svg {
        width: 16px;
        height: 16px;
    }

    .rise-account__content {
        padding: 1.5em 0.75em;
    }

    /* Settings field labels stack */
    .rise-settings__field {
        flex-direction: column;
        gap: 0.15em;
    }

    /* Table horizontal scroll */
    .rise-account__table {
        display: block;
        overflow-x: auto;
    }

    /* Billing sub cards */
    .rise-billing__sub-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .rise-billing__sub-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25em;
    }

    /* Form inline rows stack */
    .rise-account__form-wrap .form-row-first,
    .rise-account__form-wrap .form-row-last {
        width: 100%;
        display: block;
        margin-right: 0;
    }

    /* Top bar */
    .rise-topbar__inner {
        padding: 0.6em 0.75em;
    }

    .rise-topbar__user-info {
        display: none;
    }
}

@media (max-width: 480px) {
    .rise-topbar__logo img {
        height: 26px;
    }

    /* Hide nav labels on very small screens — icons only */
    .rise-account__nav-label {
        display: none;
    }

    .rise-account__nav-item,
    .rise-account__nav-item:link,
    .rise-account__nav-item:visited {
        padding: 0.55em;
        margin: 0 0.15em;
    }

    .rise-account__nav-logout,
    .rise-account__nav-logout:link,
    .rise-account__nav-logout:visited {
        padding: 0.55em;
        margin: 0 0.15em;
        margin-left: auto;
    }

    .rise-account__content {
        padding: 1.25em 0.5em;
    }

    .rise-account__login {
        padding: 1.25em;
    }

    .rise-account__form-wrap {
        padding: 1em;
    }
}
