/* ========================================
 * CUSTOMER PORTAL STYLES - CLEAN VERSION
 * Black & Gold Theme - No Duplicates
 * ======================================== */

/* Global: prevent theme from underlining portal links */
.ssm-customer-portal a,
.ssm-portal-header a,
.ssm-portal-nav a,
.ssm-portal-content a.button,
.ssm-portal-content a.ssm-btn {
    text-decoration: none !important;
}

/* ========================================
 * LOGIN FORM
 * ======================================== */
.ssm-portal-login {
    max-width: 450px;
    margin: 60px auto;
    padding: 20px;
}

.ssm-login-box {
    background: #fff;
    border: 2px solid var(--ssm-primary);
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.ssm-login-box h2 {
    margin: 0 0 10px;
    font-size: 28px;
    color: #000;
    text-align: center;
}

.ssm-login-box > p {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 15px;
}

/* Form Fields */
.ssm-login-box .login-username,
.ssm-login-box .login-password {
    margin-bottom: 20px;
}

.ssm-login-box .login-remember {
    margin: 15px 0;
}

.ssm-login-box label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #000;
    font-size: 14px;
}

.ssm-login-box .login-remember label {
    display: flex;
    align-items: center;
    font-weight: 400;
    cursor: pointer;
    margin-bottom: 0;
}

.ssm-login-box input[type="text"],
.ssm-login-box input[type="password"],
.ssm-login-box input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.ssm-login-box input[type="text"]:focus,
.ssm-login-box input[type="password"]:focus,
.ssm-login-box input[type="email"]:focus {
    border-color: var(--ssm-primary);
    outline: none;
}

.ssm-login-box input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

/* Login Button - FIXED */
.ssm-login-box .login-submit {
    margin: 25px 0 0 0;
    text-align: center;
}

.ssm-login-box input[type="submit"],
.ssm-login-box .button,
.ssm-login-box .button-primary {
    width: 100%;
    padding: 16px 20px;
    background: var(--ssm-primary);
    color: var(--ssm-on-primary);
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    text-align: center;
    line-height: .6;
    display: block;
    margin: 0 auto;
}

.ssm-login-box input[type="submit"]:hover,
.ssm-login-box .button:hover,
.ssm-login-box .button-primary:hover {
    background: #000;
    color: var(--ssm-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 190, 21, 0.4);
}

/* Links */
.ssm-login-links {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.ssm-login-links a {
    color: var(--ssm-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    font-size: 14px;
}

.ssm-login-links a:hover {
    color: #000;
}

/* Messages */
.ssm-login-error {
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    color: #991b1b;
    font-weight: 500;
}

.ssm-login-success {
    background: #f0fdf4;
    border-left: 4px solid #16a34a;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    color: #15803d;
    font-weight: 500;
}

/* Hide Unwanted Elements */
.jetpack-protect-math,
#jetpack-protect-math,
.jetpack_protect_math,
.wp-social-login-widget {
    display: none !important;
}

/* ========================================
 * PORTAL CONTAINER
 * ======================================== */
.ssm-customer-portal {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ========================================
 * PORTAL HEADER
 * ======================================== */
.ssm-portal-header {
    /* v1.2.125 — de-gradient. Prior treatment washed from pure #000 to
       --ssm-dark, producing a dark blob with a gradient shine and giving
       the nav pills a variable background to sit on (see nav-pill rule
       below). Flat --ssm-dark: one deterministic color for the whole band,
       nav pills get a stable background to contrast against, brand red
       still reads as an accent on hover/active. */
    background: var(--ssm-dark);
    color: var(--ssm-on-dark, #fff);
    padding: 30px 40px;
    border-radius: 8px 8px 0 0;
    /* v1.2.117 — downgraded from 4px solid var(--ssm-primary). The bright
       brand-primary band between the header and content SCREAMS on any
       palette (the pilot operator's red band, demo-site's gold band). Replaced with a
       subtle palette-neutral separator derived from --ssm-on-dark. Operator
       can restore the loud version via ssm_portal_custom_css if they want. */
    border-bottom: 1px solid color-mix(in srgb, var(--ssm-on-dark) 15%, transparent);
    margin-bottom: 0;
}

.ssm-portal-welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ssm-portal-welcome .ssm-welcome-text h1 {
    margin: 0;
    font-size: 32px;
    /* v1.2.67: was var(--ssm-primary) — dark-on-dark for any dark-brand
       operator. Now uses --ssm-on-dark, the luminance-picked contrast-safe
       foreground for the header's dark gradient (same mechanism as the
       inactive nav tabs and the email-header h1). */
    color: var(--ssm-on-dark);
}

.ssm-portal-welcome .ssm-welcome-text p {
    margin: 5px 0 0;
    /* v1.2.117: was hardcoded #fff. Uses palette-picked on-dark so a
       light `--ssm-dark` operator still reads. Opacity preserved for the
       subtle separation from the header background. */
    color: var(--ssm-on-dark, #fff);
    opacity: 0.9;
}

.ssm-portal-welcome .ssm-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    /* v1.2.117: alpha of the readable-on foreground instead of hardcoded
       white. Palette-symmetric: on dark bg the overlay is white-alpha
       (subtle lightening), on light bg it becomes black-alpha (subtle
       darkening). */
    background: color-mix(in srgb, var(--ssm-on-dark) 10%, transparent);
    color: var(--ssm-on-dark, #fff);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s;
}

.ssm-portal-welcome .ssm-logout:hover {
    background: color-mix(in srgb, var(--ssm-on-dark) 20%, transparent);
}

/* Navigation Tabs */
.ssm-portal-nav {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.ssm-portal-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    /* v1.2.125 — SOLID lighter shade of the header, not a translucent
       overlay. Prior: color-mix(--ssm-on-dark 12%, TRANSPARENT). The
       transparent stop revealed the header gradient variance across the
       pill's width, producing the "dark-on-dark unreadable pill" the product owner
       named. Now: color-mix mixes with --ssm-dark (SOLID) — computes to
       a single deterministic color per palette:
         the pilot operator (dark green + white on-dark) → solid muted lighter green
         demo-site (navy dark + white on-dark) → solid muted lighter navy
         Hostile synthetic (light dark + black on-dark) → solid muted darker
       All seven nav elements (Dashboard, My Rental, Billing, Cards &
       Autopay, Profile, Documents, Rent Another Unit) pass WCAG AA on
       every operator palette because the pill background is now a single
       fixed color with the header's own fixed color as its immediate
       ancestor — no gradient variance to fight, no translucency to
       reveal, no dark-on-dark. */
    background: color-mix(in srgb, var(--ssm-on-dark) 15%, var(--ssm-dark));
    color: var(--ssm-on-dark) !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s;
}

.ssm-portal-nav a .dashicons {
    font-size: 20px !important;
    width: 20px !important;
    height: 20px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1 !important;
}

/* Ensure dashicons font family is used */
.ssm-portal-nav a .dashicons,
.ssm-customer-portal .dashicons {
    font-family: dashicons !important;
    speak: none;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* SVG nav icons */
.ssm-portal-nav a .ssm-nav-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    width: 20px;
    height: 20px;
}

.ssm-portal-nav a:hover {
    background: var(--ssm-primary);
    color: var(--ssm-on-primary) !important;
    text-decoration: none !important;
}

.ssm-portal-nav a.active {
    background: var(--ssm-primary);
    color: var(--ssm-on-primary) !important;
    text-decoration: none !important;
}

.ssm-portal-nav a.ssm-rent-another {
    background: var(--ssm-primary) !important;
    color: var(--ssm-on-primary) !important;
}

/* ========================================
 * PORTAL CONTENT
 * ======================================== */
.ssm-portal-content {
    background: #fff;
    padding: 40px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Dashboard Grid */
.ssm-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.ssm-dashboard-card {
    background: #f9f9f9;
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 25px;
    display: flex;
    gap: 20px;
}

.ssm-card-icon {
    width: 60px;
    height: 60px;
    background: var(--ssm-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ssm-card-icon .dashicons {
    font-size: 30px;
    /* v1.2.99: was color: #000 on var(--ssm-primary) circle — same dark-glyph-
       on-dark-fill bug class as .ssm-document-icon. Fixed to on-primary. */
    color: var(--ssm-on-primary, #fff);
    width: 30px;
    height: 30px;
    line-height: 1;
}

.ssm-card-content {
    flex: 1;
}

.ssm-card-content h3 {
    margin: 0 0 15px;
    font-size: 18px;
    color: #000;
}

.ssm-rental-details {
    margin-bottom: 15px;
}

.ssm-unit-number {
    font-size: 24px;
    font-weight: 700;
    color: #000;
}

.ssm-unit-size,
.ssm-location {
    color: #666;
    margin-top: 5px;
}

.ssm-balance-amount {
    font-size: 36px;
    font-weight: 700;
    color: var(--ssm-primary);
    margin-bottom: 5px;
}

.ssm-due-date {
    color: #666;
    margin-bottom: 15px;
}

/* Status Badges */
.ssm-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* Pay Now Button - replaces status badge for past due accounts */
.ssm-pay-now-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    /* v1.2.125 — flat #dc3545. Hover uses filter:brightness for the darker
       state so we don't need a second color declaration. */
    background: #dc3545;
    color: #fff !important;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
    transition: all 0.2s ease;
    animation: pulse-pay 2s ease-in-out infinite;
}

.ssm-pay-now-btn:hover {
    /* v1.2.125 — same base color, darker via filter. Keeps the flat rule. */
    background: #dc3545;
    filter: brightness(0.9);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
    transform: translateY(-1px);
    color: #fff !important;
    text-decoration: none;
}

@keyframes pulse-pay {
    0%, 100% { box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3); }
    50% { box-shadow: 0 2px 12px rgba(220, 53, 69, 0.6); }
}

.ssm-status-active {
    background: #d4edda;
    color: #155724;
}

.ssm-status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.ssm-status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.ssm-status-details {
    color: #666;
    font-size: 14px;
}

.ssm-status-details div {
    margin-top: 5px;
}

.ssm-action-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ssm-action-links a {
    color: var(--ssm-primary);
    text-decoration: none;
    font-weight: 600;
}

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

/* ========================================
 * BUTTONS
 * ======================================== */
.ssm-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-size: 15px;
    transition: all 0.3s;
}

.ssm-btn-primary {
    background: var(--ssm-primary);
    color: var(--ssm-on-primary);
}

.ssm-btn-primary:hover {
    background: #000;
    color: #fff;
}

/* v1.2.97: was `background: #000; color: var(--ssm-primary);` which produced
   dark-navy-on-black on demo-site (~1.2:1 contrast) — internal screenshots
   caught it on View Document / Save Changes / Change Password. Now uses the
   Dark brand token + on_dark readable foreground (emitted by
   SSM_Shop_Manager_Customizations::emit_frontend_branding_vars() at wp_head).
   Guaranteed readable on any operator brand. Same pattern as the v1.2.94
   email button + v1.2.96 password-reset button fixes. */
.ssm-btn-secondary {
    background: var(--ssm-dark, #000);
    color: var(--ssm-on-dark, #fff) !important;
}

.ssm-btn-secondary:hover {
    background: #333;
    color: #fff !important;
}

/* ========================================
 * TABLES
 * ======================================== */
.ssm-recent-payments {
    margin-top: 40px;
}

.ssm-recent-payments h2 {
    margin: 0 0 20px;
    font-size: 24px;
    color: #000;
}

.ssm-payments-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.ssm-payments-table thead {
    background: #f9f9f9;
}

.ssm-payments-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #000;
    border-bottom: 2px solid var(--ssm-primary);
}

.ssm-payments-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.ssm-view-all {
    display: inline-block;
    margin-top: 20px;
    color: var(--ssm-primary);
    font-weight: 600;
    text-decoration: none;
}

.ssm-view-all:hover {
    text-decoration: underline;
}

/* ========================================
 * RENTAL DETAIL
 * ======================================== */
.ssm-rental-detail {
    padding: 20px;
}

.ssm-rental-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.ssm-rental-header h2 {
    margin: 0;
    font-size: 32px;
    color: #000;
}

.ssm-rental-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.ssm-rental-info-card {
    background: #f9f9f9;
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 25px;
}

.ssm-rental-info-card h3 {
    margin: 0 0 20px;
    font-size: 20px;
    color: #000;
    border-bottom: 2px solid var(--ssm-primary);
    padding-bottom: 10px;
}

.ssm-info-table {
    width: 100%;
}

.ssm-info-table tr {
    border-bottom: 1px solid #eee;
}

.ssm-info-table td {
    color: #333;
    padding: 12px 8px;
}

.ssm-info-table td:first-child {
    color: #666;
    width: 40%;
    padding-left: 5px;
    padding-right: 5px;
}

.ssm-info-table td:last-child {
    padding-left: 5px;
    padding-right: 5px;
}

.ssm-access-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ssm-access-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.ssm-access-list li:last-child {
    border-bottom: none;
}

.ssm-access-list .dashicons {
    color: var(--ssm-primary);
}

/* ========================================
 * PAYMENTS SECTION
 * ======================================== */
.ssm-payments-section {
    padding: 20px;
}

.ssm-payments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.ssm-payments-header h2 {
    margin: 0;
    font-size: 28px;
    color: #000;
}

.ssm-payment-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px solid var(--ssm-primary);
}

.ssm-summary-item {
    text-align: center;
}

.ssm-summary-label {
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 5px;
}

.ssm-summary-value {
    font-size: 20px;
    font-weight: 700;
    color: #000;
}

/* ========================================
 * PROFILE FORM
 * ======================================== */
.ssm-profile-section {
    padding: 20px;
}

.ssm-profile-section h2 {
    margin: 0 0 30px;
    font-size: 28px;
    color: #000;
}

.ssm-form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.ssm-form-section:last-child {
    border-bottom: none;
}

.ssm-form-section h3 {
    margin: 0 0 20px;
    font-size: 20px;
    color: #000;
}

.ssm-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.ssm-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #000;
}

.ssm-form-field input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    box-sizing: border-box;
}

.ssm-form-field input:focus {
    border-color: var(--ssm-primary);
    outline: none;
}

.ssm-form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.ssm-form-actions .ssm-btn,
.ssm-form-actions button.ssm-btn {
    background: #000 !important;
    color: var(--ssm-primary) !important;
    border: none !important;
}

.ssm-form-actions .ssm-btn:hover,
.ssm-form-actions button.ssm-btn:hover {
    background: #333 !important;
    color: #fff !important;
}

/* ========================================
 * DOCUMENTS
 * ======================================== */
.ssm-documents-section {
    padding: 20px;
}

.ssm-documents-section h2 {
    margin: 0 0 30px;
    font-size: 28px;
    color: #000;
}

.ssm-documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.ssm-document-card {
    background: #f9f9f9;
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}

.ssm-document-icon {
    width: 80px;
    height: 80px;
    background: var(--ssm-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.ssm-document-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    /* v1.2.99: was hardcoded color: #000 — on any dark brand primary that
       renders black-on-navy (demo-site: navy circle + black glyph, ~1.2:1
       contrast). Now uses the on-primary readable foreground emitted by
       SSM_Shop_Manager_Customizations::emit_frontend_branding_vars(). Same
       fix pattern as v1.2.94 email button + v1.2.97 .ssm-btn-secondary. */
    color: var(--ssm-on-primary, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ssm-document-info h3 {
    margin: 0 0 10px;
    font-size: 20px;
    color: #000;
}

.ssm-document-info p {
    color: #666;
    margin-bottom: 20px;
}

/* ========================================
 * NOTICES
 * ======================================== */
.ssm-notice {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.ssm-notice-success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

/* ========================================
 * RESPONSIVE
 * ======================================== */
@media (max-width: 768px) {
    .ssm-customer-portal {
        margin: 0;
        padding: 0;
        max-width: 100%;
    }

    .ssm-portal-header {
        padding: 15px;
        border-radius: 0;
    }
    
    .ssm-portal-welcome {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .ssm-portal-welcome .ssm-welcome-text h1 {
        font-size: 24px;
    }
    
    .ssm-portal-nav {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ssm-portal-content {
        padding: 15px;
        border-radius: 0;
    }
    
    .ssm-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .ssm-payments-header,
    .ssm-rental-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .ssm-form-actions {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .ssm-portal-login {
        margin: 30px auto;
        padding: 15px;
    }
    
    .ssm-login-box {
        padding: 30px 20px;
    }
    
    .ssm-login-box h2 {
        font-size: 24px;
    }
}
.ssm-info-table strong {
    color: #000;
    font-weight: 600;
}

/* ========================================
 * MULTI-UNIT DASHBOARD STYLES
 * ======================================== */

/* Summary Cards Row - HORIZONTAL LAYOUT */
.ssm-dashboard-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.ssm-summary-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.ssm-summary-card.ssm-summary-alert {
    border-color: #d63638;
    /* v1.2.125 — flat rose-tinted white, no wash. */
    background: #fff5f5;
}

.ssm-summary-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    /* v1.2.125 — flat brand primary. Dropped the cross-brand gold blend
       (#e5ad0e) — the operator's chosen brand color reads on its own; a
       forced amber wash contradicts palette-agnostic surfaces. */
    background: var(--ssm-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ssm-summary-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    /* v1.2.99: same dark-glyph-on-dark-fill fix — the gradient starts at
       var(--ssm-primary) so black glyph fails on dark brands. */
    color: var(--ssm-on-primary, #fff);
}

.ssm-summary-alert .ssm-summary-icon {
    /* v1.2.125 — flat alert red. */
    background: #d63638;
}

.ssm-summary-alert .ssm-summary-icon .dashicons {
    color: #fff;
}

.ssm-summary-content {
    flex: 1;
}

.ssm-summary-number {
    font-size: 32px;
    font-weight: 700;
    color: #000;
    line-height: 1.1;
    margin-bottom: 4px;
}

.ssm-summary-label {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Pay Balance Button in Summary Card */
.ssm-summary-content .ssm-btn {
    margin-top: 12px;
    padding: 8px 16px;
    font-size: 13px;
}

.ssm-summary-content .ssm-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 4px;
}

.ssm-pay-balance-btn {
    display: block !important;
    text-align: center;
    margin-top: 12px !important;
}

/* Units Section */
.ssm-units-section {
    margin-bottom: 30px;
}

.ssm-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ssm-section-header h2 {
    margin: 0;
    font-size: 22px;
    color: #000;
}

/* Units Grid */
.ssm-units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Unit Card */
.ssm-unit-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ssm-unit-card:hover {
    border-color: var(--ssm-primary);
    box-shadow: 0 4px 15px rgba(247, 190, 21, 0.15);
}

.ssm-unit-card.ssm-unit-due {
    border-color: #d63638;
}

.ssm-unit-card-header {
    background: #000;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ssm-unit-number-large {
    font-size: 24px;
    font-weight: 700;
}

.ssm-unit-card-body {
    padding: 20px;
}

.ssm-unit-detail {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ssm-unit-detail:last-child {
    border-bottom: none;
}

.ssm-detail-label {
    color: #666;
    font-size: 14px;
}

.ssm-detail-value {
    font-weight: 600;
    color: #000;
    font-size: 14px;
}

.ssm-text-danger {
    color: #d63638 !important;
}

.ssm-unit-card-footer {
    padding: 15px 20px;
    background: #f9f9f9;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* No Rentals Card */
.ssm-no-rentals-card,
.ssm-no-rental {
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 50px 30px;
    text-align: center;
}

.ssm-no-rental p {
    color: #666;
    margin-bottom: 15px;
}

.ssm-no-rental .ssm-btn {
    margin: 10px 5px;
}

.ssm-no-rentals-icon {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 15px;
}

.ssm-no-rentals-icon .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
}

.ssm-no-rentals-card h3 {
    margin: 0 0 10px;
    color: #333;
}

.ssm-no-rentals-card p {
    color: #666;
    margin-bottom: 20px;
}

/* Button sizes */
.ssm-btn-sm {
    padding: 8px 16px !important;
    font-size: 13px !important;
}

/* Rental Selection Cards */
.ssm-unit-select-card {
    display: block;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
    transition: all 0.2s;
}

.ssm-unit-select-card:hover {
    border-color: var(--ssm-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.ssm-unit-select-number {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin-bottom: 10px;
}

.ssm-unit-select-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #666;
    font-size: 14px;
}

/* Rental nav */
.ssm-rental-nav {
    margin-bottom: 20px;
}

.ssm-back-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.ssm-back-link:hover {
    color: #000;
}

/* Responsive */
@media (max-width: 768px) {
    .ssm-dashboard-summary {
        grid-template-columns: 1fr;
    }
    
    .ssm-units-grid {
        grid-template-columns: 1fr;
    }
    
    .ssm-section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .ssm-unit-card-footer {
        flex-direction: column;
    }
    
    .ssm-unit-card-footer .ssm-btn {
        width: 100%;
        text-align: center;
    }
}

/* ========================================
 * PAYMENT SUMMARY GRID
 * ======================================== */
.ssm-payment-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.ssm-payment-summary-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
}

.ssm-psc-label {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.ssm-psc-value {
    font-size: 28px;
    font-weight: 700;
    color: #000;
}

/* Note: Dashboard Summary styles are defined earlier in the file */

/* Improved Unit Cards */
.ssm-unit-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.ssm-unit-card:hover {
    border-color: var(--ssm-primary);
    box-shadow: 0 8px 25px rgba(247, 190, 21, 0.2);
    transform: translateY(-2px);
}

.ssm-unit-card.ssm-unit-due {
    border-color: #d63638;
}

.ssm-unit-card.ssm-unit-due:hover {
    box-shadow: 0 8px 25px rgba(214, 54, 56, 0.2);
}

.ssm-unit-card-header {
    /* v1.2.125 — flat brand-dark. Matches the portal header rhythm. */
    background: var(--ssm-dark);
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ssm-unit-number-large {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.ssm-status-badge.ssm-status-active {
    background: #00a32a;
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ssm-unit-card-body {
    padding: 20px;
}

.ssm-unit-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ssm-unit-detail:last-child {
    border-bottom: none;
}

.ssm-detail-label {
    color: #666;
    font-size: 14px;
}

.ssm-detail-value {
    font-weight: 600;
    color: #000;
    font-size: 14px;
    text-align: right;
}

.ssm-unit-card-footer {
    padding: 15px 20px;
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Section Headers */
.ssm-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.ssm-section-header h2 {
    margin: 0;
    font-size: 24px;
    color: #000;
    font-weight: 700;
}

/* Payment Table Improvements */
.ssm-payments-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.ssm-payments-table thead {
    background: #f5f5f5;
}

.ssm-payments-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ssm-payments-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.ssm-payments-table tbody tr:hover {
    background: #fafafa;
}

.ssm-payments-table tbody tr:last-child td {
    border-bottom: none;
}

/* Responsive for payment grid */
@media (max-width: 768px) {
    .ssm-payment-summary-grid {
        grid-template-columns: 1fr;
    }
    
    .ssm-payments-table {
        display: block;
        overflow-x: auto;
    }
}
/* ========================================
 * NOTIFICATION PREFERENCES
 * ======================================== */
.ssm-section-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.ssm-notification-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ssm-checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    border: 2px solid transparent;
}

.ssm-checkbox-option:hover {
    background: #f0f0f0;
}

.ssm-checkbox-option:has(input:checked) {
    background: #fffdf5;
    border-color: var(--ssm-primary);
}

.ssm-checkbox-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--ssm-primary);
}

.ssm-checkbox-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ssm-checkbox-label strong {
    font-size: 15px;
    color: #1d2327;
}

.ssm-checkbox-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.ssm-notice-info {
    background: #f0f6fc;
    border-left: 3px solid #72aee6;
    padding: 10px 15px;
    border-radius: 0 4px 4px 0;
}

/* =============================================
   Charges Breakdown Section
   ============================================= */
.ssm-charges-section {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 2px solid var(--ssm-primary);
}

.ssm-charges-section .ssm-section-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.ssm-charges-section .ssm-section-header h2 {
    margin: 0;
    font-size: 20px;
    color: #000;
}

.ssm-charges-table-wrapper {
    overflow-x: auto;
}

.ssm-charges-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ssm-charges-table th {
    background: #000;
    color: var(--ssm-primary);
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ssm-charges-table td {
    padding: 14px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.ssm-charges-table tbody tr:hover {
    background: #fafafa;
}

.ssm-text-right {
    text-align: right !important;
}

.ssm-charge-type {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.ssm-charge-type-rent {
    background: #e8f4fd;
    color: #0073aa;
}

.ssm-charge-type-late_fee {
    background: #fef0f0;
    color: #d63638;
}

.ssm-charge-type-admin_fee {
    background: #fff8e1;
    color: #996800;
}

.ssm-charge-type-lien_fee {
    background: #fef0f0;
    color: #8b0000;
}

.ssm-charge-type-other {
    background: #f0f0f0;
    color: #666;
}

.ssm-charge-desc {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 4px;
}

.ssm-charge-amount {
    font-weight: 600;
    color: #d63638;
    font-size: 15px;
}

.ssm-past-due {
    color: #d63638;
}

.ssm-past-due-badge {
    display: inline-block;
    background: #d63638;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 5px;
}

.ssm-charges-total {
    background: #f9f9f9;
}

.ssm-charges-total td {
    padding: 16px 15px;
    font-size: 16px;
    border-top: 2px solid #000;
    border-bottom: none;
}

.ssm-charges-total td:last-child {
    color: #d63638;
    font-size: 20px;
}

.ssm-charges-action {
    margin-top: 20px;
    text-align: center;
}

.ssm-charges-action .ssm-btn {
    padding: 14px 40px;
    font-size: 16px;
}

/* =============================================
   Make Payment Page Styles (Branding)
   ============================================= */
.ssm-saved-card-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #fff;
    border: 2px solid #eee;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.ssm-saved-card-option:hover {
    border-color: var(--ssm-primary);
    background: #fffdf5;
}

.ssm-card-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.ssm-card-brand {
    font-weight: 700;
    font-size: 15px;
}

.ssm-card-last4 {
    font-family: 'Courier New', monospace;
    font-size: 15px;
    letter-spacing: 1px;
}

.ssm-card-expiry {
    color: #666;
    font-size: 13px;
}

.ssm-card-default-badge {
    background: var(--ssm-primary);
    color: var(--ssm-on-primary);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Pay button in saved card - branded style (high specificity) */
.ssm-customer-portal .ssm-pay-now-btn,
.ssm-make-payment-section .ssm-pay-now-btn,
.ssm-saved-card-option .ssm-pay-now-btn,
button.ssm-pay-now-btn,
.ssm-pay-now-btn {
    background: var(--ssm-primary) !important;
    background-color: var(--ssm-primary) !important;
    color: var(--ssm-on-primary) !important;
    border: none !important;
    border-color: var(--ssm-primary) !important;
    padding: 12px 24px !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    font-size: 14px !important;
    text-decoration: none !important;
}

.ssm-customer-portal .ssm-pay-now-btn:hover,
.ssm-make-payment-section .ssm-pay-now-btn:hover,
.ssm-saved-card-option .ssm-pay-now-btn:hover,
button.ssm-pay-now-btn:hover,
.ssm-pay-now-btn:hover {
    background: #daa810 !important;
    background-color: #daa810 !important;
    color: #000 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(247, 190, 21, 0.4) !important;
}

.ssm-pay-now-btn:disabled {
    background: #ccc !important;
    background-color: #ccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Pay via Checkout button - branded secondary style */
/* v1.2.97: same dark-on-dark fix as base .ssm-btn-secondary (:511 above).
   Was color: var(--ssm-primary) on background: #000 — illegible on Pine
   Ridge navy. Now on_dark readable foreground. */
.ssm-btn-secondary.ssm-btn-large,
.ssm-checkout-payment .ssm-btn-secondary {
    background: var(--ssm-dark, #000) !important;
    color: var(--ssm-on-dark, #fff) !important;
    border: 2px solid var(--ssm-dark, #000) !important;
    padding: 15px 30px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    width: 100% !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
}

.ssm-btn-secondary.ssm-btn-large:hover,
.ssm-checkout-payment .ssm-btn-secondary:hover {
    background: #333 !important;
    color: #fff !important;
    border-color: var(--ssm-primary) !important;
}

.ssm-payment-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.ssm-payment-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #ddd;
}

.ssm-payment-divider span {
    background: #f9f9f9;
    padding: 0 15px;
    position: relative;
    color: #666;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
}

/* Balance Summary Box on Make Payment page */
.ssm-balance-summary {
    background: #fff8e1;
    border: 2px solid var(--ssm-primary);
    border-radius: 12px;
    padding: 25px;
}

.ssm-balance-summary h3 {
    margin: 0 0 10px 0;
    color: #000;
    font-size: 16px;
}

.ssm-balance-total {
    font-size: 42px;
    font-weight: 800;
    color: #d63638;
    line-height: 1.1;
}

.ssm-balance-breakdown {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.ssm-balance-breakdown h4 {
    font-size: 13px;
    color: #666;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ssm-balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px !important;
    border-bottom: 1px dashed #ddd;
}

.ssm-balance-item:last-child {
    border-bottom: none;
}

.ssm-balance-unit {
    font-weight: 600;
    font-size: 14px !important;
    color: #333 !important;
}

.ssm-balance-unit small {
    font-weight: 400;
    color: #666;
    margin-left: 5px;
    font-size: 12px !important;
}

.ssm-balance-amount {
    color: #d63638 !important;
    font-weight: 600;
    font-size: 14px !important;
}

/* Payment Options Box */
.ssm-payment-options {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 25px;
}

.ssm-payment-options h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #000;
}

.ssm-saved-cards-payment p,
.ssm-checkout-payment p {
    margin: 0 0 15px 0;
    color: #333;
}

.ssm-checkout-note {
    margin-top: 10px !important;
    color: #666 !important;
    text-align: center;
}

/* Make Payment Section Layout */
.ssm-make-payment-section {
    max-width: 700px;
}

.ssm-section-header-back {
    margin-bottom: 20px;
}

.ssm-back-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s;
}

.ssm-back-link:hover {
    color: var(--ssm-primary);
}

.ssm-payment-form-container {
    display: grid;
    gap: 30px;
}

.ssm-advance-payment-note {
    background: #f0f0f0;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
}

.ssm-advance-payment-note p {
    margin: 0;
    color: #666;
}

/* ========================================
 * MOBILE HAMBURGER MENU STYLES
 * ======================================== */

/* Hide mobile header on desktop */
.ssm-mobile-header {
    display: none !important;
}

/* Hide mobile logout on desktop */
.ssm-logout-mobile {
    display: none !important;
}

/* ========================================
 * MOBILE RESPONSIVE STYLES (max-width: 768px)
 * ======================================== */

@media screen and (max-width: 768px) {
    /* Full-width container on mobile */
    .ssm-customer-portal {
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
    }

    /* Portal Header Mobile */
    .ssm-customer-portal .ssm-portal-header {
        padding: 15px !important;
        border-radius: 0 !important;
    }
    
    /* Welcome section on mobile - always visible */
    .ssm-customer-portal .ssm-portal-welcome {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 5px !important;
    }
    
    .ssm-customer-portal .ssm-portal-welcome .ssm-welcome-text h1 {
        font-size: 20px !important;
        line-height: 1.3 !important;
        margin: 0 !important;
    }
    
    .ssm-customer-portal .ssm-portal-welcome .ssm-welcome-text p {
        font-size: 13px !important;
        margin: 0 !important;
        opacity: 0.8 !important;
    }
    
    /* Hide desktop logout */
    .ssm-customer-portal .ssm-logout-desktop {
        display: none !important;
    }
    
    /* Show mobile header bar - BELOW welcome section */
    .ssm-customer-portal .ssm-mobile-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding-top: 15px !important;
        margin-top: 15px !important;
        border-top: 1px solid rgba(247, 190, 21, 0.3) !important;
    }
    
    /* Hamburger button */
    .ssm-customer-portal .ssm-hamburger-btn {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        background: rgba(247, 190, 21, 0.15) !important;
        border: 1px solid rgba(247, 190, 21, 0.4) !important;
        cursor: pointer !important;
        padding: 10px 14px !important;
        border-radius: 6px !important;
        transition: background 0.2s !important;
    }
    
    .ssm-customer-portal .ssm-hamburger-btn:hover,
    .ssm-customer-portal .ssm-hamburger-btn:active {
        background: rgba(247, 190, 21, 0.25) !important;
    }
    
    /* Hamburger icon - 3 bars */
    .ssm-hamburger-icon {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        width: 20px !important;
        height: 14px !important;
    }
    
    .ssm-hamburger-icon span {
        display: block !important;
        width: 100% !important;
        height: 2px !important;
        /* v1.2.67: was var(--ssm-primary) — dark bars on dark mobile
           header. Now --ssm-on-dark (contrast-safe against the header bg). */
        background: var(--ssm-on-dark) !important;
        border-radius: 2px !important;
        transition: all 0.3s ease !important;
    }
    
    /* Hamburger animation when active */
    .ssm-hamburger-btn.active .ssm-hamburger-icon span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px) !important;
    }
    
    .ssm-hamburger-btn.active .ssm-hamburger-icon span:nth-child(2) {
        opacity: 0 !important;
    }
    
    .ssm-hamburger-btn.active .ssm-hamburger-icon span:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -4px) !important;
    }
    
    /* Portal Menu text */
    .ssm-hamburger-text {
        /* v1.2.67: was var(--ssm-primary) — dark-on-dark mobile header. */
        color: var(--ssm-on-dark) !important;
        font-weight: 600 !important;
        font-size: 14px !important;
    }
    
    /* Mobile logout button */
    .ssm-customer-portal .ssm-logout-mobile {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        padding: 10px 14px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        color: #fff !important;
        text-decoration: none !important;
        border-radius: 6px !important;
        font-weight: 600 !important;
        font-size: 13px !important;
        transition: background 0.2s !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
    }
    
    .ssm-customer-portal .ssm-logout-mobile:hover {
        background: rgba(255, 255, 255, 0.2) !important;
        color: #fff !important;
    }
    
    .ssm-logout-mobile .dashicons {
        font-size: 16px !important;
        width: 16px !important;
        height: 16px !important;
    }
    
    /* CRITICAL: Navigation - Hidden by default on mobile */
    .ssm-customer-portal .ssm-portal-nav {
        display: none !important;
        flex-direction: column !important;
        gap: 8px !important;
        margin-top: 15px !important;
        padding-top: 15px !important;
        border-top: 1px solid rgba(247, 190, 21, 0.3) !important;
    }
    
    /* Show nav when open class is added */
    .ssm-customer-portal .ssm-portal-nav.open {
        display: flex !important;
    }
    
    .ssm-customer-portal .ssm-portal-nav a {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding: 12px 15px !important;
        font-size: 14px !important;
        text-align: left !important;
        border-radius: 6px !important;
        gap: 10px !important;
        min-height: auto !important;
        white-space: nowrap !important;
    }
    
    .ssm-customer-portal .ssm-portal-nav a .dashicons,
    .ssm-customer-portal .ssm-portal-nav a .ssm-nav-icon {
        font-size: 20px !important;
        width: 20px !important;
        height: 20px !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }
    
    .ssm-customer-portal .ssm-portal-nav a.ssm-rent-another {
        margin-top: 5px !important;
    }
    
    .ssm-customer-portal .ssm-portal-nav a.ssm-rent-another .dashicons {
        margin-right: 0 !important;
    }
    
    /* Portal Content Mobile */
    .ssm-customer-portal .ssm-portal-content {
        padding: 15px !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    
    /* Dashboard Grid Mobile */
    .ssm-dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .ssm-dashboard-card {
        padding: 20px !important;
        flex-direction: column !important;
        text-align: center !important;
    }
    
    .ssm-card-icon {
        margin: 0 auto 15px !important;
    }
    
    /* Summary Cards Mobile */
    .ssm-dashboard-summary {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .ssm-summary-card {
        padding: 20px;
        flex-direction: row;
        align-items: center;
    }
    
    .ssm-summary-icon {
        width: 50px;
        height: 50px;
        min-width: 50px;
    }
    
    .ssm-summary-icon .dashicons {
        font-size: 24px;
        width: 24px;
        height: 24px;
    }
    
    .ssm-summary-number {
        font-size: 26px;
    }
    
    /* Unit Cards Mobile */
    .ssm-units-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .ssm-unit-card-header {
        padding: 15px;
    }
    
    .ssm-unit-number-large {
        font-size: 22px;
    }
    
    .ssm-unit-card-body {
        padding: 15px;
    }
    
    .ssm-unit-card-footer {
        padding: 12px 15px;
        flex-direction: column;
        gap: 8px;
    }
    
    .ssm-unit-card-footer .ssm-btn {
        width: 100%;
        text-align: center;
        padding: 12px 16px;
    }
    
    /* Rental Grid Mobile */
    .ssm-rental-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .ssm-rental-info-card {
        padding: 20px;
    }
    
    /* Tables Mobile - Horizontal Scroll */
    .ssm-payments-table,
    .ssm-charges-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Charges Section Mobile - full-width flush */
    .ssm-charges-section {
        border-radius: 0 !important;
        margin-left: -15px !important;
        margin-right: -15px !important;
        padding: 20px 15px !important;
        border-left: none !important;
        border-right: none !important;
    }
    
    .ssm-payments-table th,
    .ssm-payments-table td,
    .ssm-charges-table th,
    .ssm-charges-table td {
        min-width: 100px;
        white-space: nowrap;
    }
    
    /* Payment Summary Grid */
    .ssm-payment-summary-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Forms Mobile */
    .ssm-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .ssm-form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .ssm-form-actions .ssm-btn {
        width: 100%;
        text-align: center;
    }
    
    /* Saved Cards Mobile */
    .ssm-saved-card-option {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .ssm-card-info {
        justify-content: center;
    }
    
    /* Balance Summary Mobile */
    .ssm-balance-summary {
        padding: 20px;
    }
    
    .ssm-balance-total {
        font-size: 32px;
    }
    
    /* Section Headers Mobile */
    .ssm-section-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .ssm-section-header h2 {
        font-size: 20px;
    }
}

/* Extra Small Screens */
@media (max-width: 480px) {
    .ssm-portal-header {
        padding: 15px 12px;
    }
    
    .ssm-portal-welcome .ssm-welcome-text h1 {
        font-size: 20px;
    }
    
    /* Still 2 columns but smaller padding on very small screens */
    .ssm-portal-nav {
        gap: 8px !important;
    }
    
    .ssm-portal-nav a {
        padding: 12px 8px !important;
        font-size: 11px !important;
        min-height: 65px;
    }
    
    .ssm-portal-nav a .dashicons,
    .ssm-portal-nav a .ssm-nav-icon {
        font-size: 20px !important;
        width: 20px !important;
        height: 20px !important;
    }
    
    .ssm-portal-content {
        padding: 12px;
    }
    
    .ssm-summary-card {
        padding: 15px;
    }
    
    .ssm-summary-number {
        font-size: 22px;
    }
    
    .ssm-summary-label {
        font-size: 11px;
    }
    
    /* No Rentals Card */
    .ssm-no-rentals-card {
        padding: 30px 20px;
    }
    
    .ssm-no-rentals-icon .dashicons {
        font-size: 40px;
        width: 40px;
        height: 40px;
    }
    
    /* Buttons */
    .ssm-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .ssm-btn-sm {
        padding: 10px 14px !important;
        font-size: 12px !important;
    }
}

/* Landscape Phone Orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .ssm-portal-nav {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    .ssm-portal-nav a {
        min-height: 55px;
        padding: 10px 8px !important;
    }
    
    .ssm-portal-nav a.ssm-rent-another {
        grid-column: auto;
    }
}
/* ========================================
 * UNIT STATUS BANNERS
 * ======================================== */

/* Base banner styles */
.ssm-unit-status-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 8px 8px 0 0;
    margin: -1px -1px 0 -1px;
    border-bottom: none;
}

.ssm-unit-has-banner .ssm-unit-card-header {
    border-radius: 0;
}

.ssm-banner-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}

.ssm-banner-content {
    flex: 1;
}

.ssm-banner-content strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.ssm-banner-content p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    opacity: 0.9;
}

/* Status banners — v1.2.125: all flat solids, no washes. One color per
   status, one line each. */

/* Move-out banner - Yellow/Warning */
.ssm-banner-moveout {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-bottom: none;
}
.ssm-banner-moveout strong { color: #856404; }
.ssm-banner-moveout p { color: #856404; }

/* Late payment banner - Orange */
.ssm-banner-late {
    background: #ffe0b2;
    border: 1px solid #ff9800;
    border-bottom: none;
}
.ssm-banner-late strong { color: #e65100; }
.ssm-banner-late p { color: #e65100; }

/* Pre-lien banner - Red/Warning */
.ssm-banner-prelien {
    background: #ffcdd2;
    border: 1px solid #f44336;
    border-bottom: none;
}
.ssm-banner-prelien strong { color: #c62828; }
.ssm-banner-prelien p { color: #c62828; }

/* Lien banner - Dark Red */
.ssm-banner-lien {
    background: #e53935;
    border: 1px solid #c62828;
    border-bottom: none;
}
.ssm-banner-lien strong { color: #fff; }
.ssm-banner-lien p { color: rgba(255,255,255,0.9); }
.ssm-banner-lien .ssm-banner-icon { filter: brightness(0) invert(1); }

/* Locked-out banner - Dark Gray/Black */
.ssm-banner-locked {
    background: #2b2b2b;
    border: 1px solid #000;
    border-bottom: none;
}
.ssm-banner-locked strong { color: #fff; }
.ssm-banner-locked p { color: rgba(255,255,255,0.85); }
.ssm-banner-locked .ssm-banner-icon { filter: brightness(0) invert(1); }

/* Need to Lock banner - Coral/Orange warning */
.ssm-banner-needtolock {
    background: #d35400;
    border: 1px solid #c0392b;
    border-bottom: none;
}
.ssm-banner-needtolock strong { color: #fff; }
.ssm-banner-needtolock p { color: rgba(255,255,255,0.9); }
.ssm-banner-needtolock .ssm-banner-icon { filter: brightness(0) invert(1); }

/* Need to Unlock banner - Teal/Green positive */
.ssm-banner-needtounlock {
    background: #00b894;
    border: 1px solid #00a884;
    border-bottom: none;
}
.ssm-banner-needtounlock strong { color: #fff; }
.ssm-banner-needtounlock p { color: rgba(255,255,255,0.9); }
.ssm-banner-needtounlock .ssm-banner-icon { filter: brightness(0) invert(1); }

/* Auction banner - Critical Red with pulse */
.ssm-banner-auction {
    background: #b71c1c;
    border: 1px solid #5d0000;
    border-bottom: none;
    animation: auction-pulse 2s ease-in-out infinite;
}
.ssm-banner-auction strong { color: #fff; font-size: 15px; }
.ssm-banner-auction p { color: rgba(255,255,255,0.95); }
.ssm-banner-auction .ssm-banner-icon { filter: brightness(0) invert(1); }

@keyframes auction-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(183, 28, 28, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(183, 28, 28, 0); }
}

/* Status badge variations */
.ssm-status-moveout {
    background: #fff3cd !important;
    color: #856404 !important;
    border: 1px solid #ffc107;
}

.ssm-status-late {
    background: #ffe0b2 !important;
    color: #e65100 !important;
    border: 1px solid #ff9800;
}

.ssm-status-need-to-lock {
    background: #e17055 !important;
    color: #fff !important;
}

.ssm-status-pre-lien {
    background: #ffcdd2 !important;
    color: #c62828 !important;
    border: 1px solid #f44336;
}

.ssm-status-lien {
    background: #ef5350 !important;
    color: #fff !important;
}

.ssm-status-locked-out {
    background: #424242 !important;
    color: #fff !important;
}

.ssm-status-need-to-unlock {
    background: #00cec9 !important;
    color: #fff !important;
}

.ssm-status-auction {
    background: #b71c1c !important;
    color: #fff !important;
    animation: badge-pulse 1.5s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Card adjustments when banner is present */
.ssm-unit-has-banner {
    border-top: none;
}

.ssm-unit-has-banner .ssm-unit-card-header {
    border-top: none;
}

/* Mobile adjustments for banners */
@media (max-width: 768px) {
    .ssm-unit-status-banner {
        padding: 12px 14px;
    }
    
    .ssm-banner-icon {
        font-size: 20px;
    }
    
    .ssm-banner-content strong {
        font-size: 13px;
    }
    
    .ssm-banner-content p {
        font-size: 12px;
    }
}
/* v1.2.209.102 -- Recent Activity and Recent Payments on phones: one card per
 * row, each cell labelled from its column, nothing wider than the screen.
 * Phones only; wider screens unchanged. */
@media (max-width: 600px) {
    .ssm-customer-portal .ssm-charges-table-wrapper {
        overflow: visible;
    }
    .ssm-customer-portal table.ssm-charges-table,
    .ssm-customer-portal table.ssm-payments-table,
    .ssm-customer-portal table.ssm-charges-table > tbody,
    .ssm-customer-portal table.ssm-payments-table > tbody,
    .ssm-customer-portal table.ssm-charges-table > tfoot {
        display: block !important;
        width: 100% !important;
        overflow: visible !important;
        border: 0;
    }
    .ssm-customer-portal table.ssm-charges-table > thead,
    .ssm-customer-portal table.ssm-payments-table > thead {
        display: none !important;
    }
    .ssm-customer-portal table.ssm-charges-table > tbody > tr,
    .ssm-customer-portal table.ssm-payments-table > tbody > tr,
    .ssm-customer-portal table.ssm-charges-table > tfoot > tr {
        display: block;
        margin: 0 0 10px;
        padding: 10px 12px;
        border: 1px solid #e2e4e7;
        border-radius: 8px;
        background: #fff;
    }
    .ssm-customer-portal table.ssm-charges-table > tbody > tr > td,
    .ssm-customer-portal table.ssm-payments-table > tbody > tr > td {
        display: flex !important;
        justify-content: space-between;
        gap: 12px;
        min-width: 0 !important;
        width: auto !important;
        padding: 4px 0 !important;
        border: 0 !important;
        white-space: normal !important;
        text-align: right !important;
        overflow-wrap: anywhere;
    }
    .ssm-customer-portal table.ssm-charges-table > tbody > tr > td::before,
    .ssm-customer-portal table.ssm-payments-table > tbody > tr > td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        color: #646970;
        font-size: 12px;
        font-weight: 600;
        text-align: left;
    }
    .ssm-customer-portal table.ssm-charges-table > tbody > tr > td.ssm-cell-title {
        display: block !important;
        text-align: left !important;
        padding-bottom: 6px !important;
    }
    .ssm-customer-portal table.ssm-charges-table > tbody > tr > td.ssm-cell-title::before {
        content: none;
    }
    .ssm-customer-portal table.ssm-charges-table > tfoot > tr > td {
        display: inline-block !important;
        min-width: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        white-space: normal !important;
    }
    .ssm-customer-portal table.ssm-charges-table > tfoot > tr {
        display: flex;
        justify-content: space-between;
    }
}

/* v1.2.209.203 -- Billing History (Billing tab) and Recent Activity (Dashboard) on phones: each row as a card, nothing scrolls
 * sideways. Line 1 the description with the unit, line 2 the date (and due date); on the right the charge or payment with the
 * running balance under it. The same rows as the table; wider screens show the table as before. */
.ssm-customer-portal .ssm-ledger-cards {
    display: none;
}
@media (max-width: 600px) {
    .ssm-customer-portal .ssm-ledger-responsive > .ssm-charges-table-wrapper,
    .ssm-customer-portal .ssm-ledger-responsive > .ssm-ledger-table-wrapper {
        display: none !important;
    }
    .ssm-customer-portal .ssm-ledger-cards {
        display: block;
        list-style: none;
        margin: 0;
        padding: 0;
    }
    .ssm-customer-portal .ssm-ledger-card {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
        margin: 0 0 10px;
        padding: 10px 12px;
        border: 1px solid #e2e4e7;
        border-radius: 8px;
        background: #fff;
        font-size: 14px;
        line-height: 1.4;
    }
    .ssm-customer-portal .ssm-ledger-card-main {
        flex: 1 1 auto;
        min-width: 0;
        overflow-wrap: anywhere;
    }
    .ssm-customer-portal .ssm-ledger-card-unit {
        color: #666;
        white-space: nowrap;
    }
    .ssm-customer-portal .ssm-ledger-card-date,
    .ssm-customer-portal .ssm-ledger-card-extra {
        margin-top: 2px;
        font-size: 12px;
        color: #666;
    }
    .ssm-customer-portal .ssm-ledger-card-amounts {
        flex: 0 0 auto;
        text-align: right;
        white-space: nowrap;
        font-weight: 500;
    }
    .ssm-customer-portal .ssm-ledger-card-balance {
        margin-top: 2px;
        font-size: 12px;
    }
}
