/**
 * Smart Matrimony - Frontend Styles
 */

/* Variables */
:root {
    --sm-primary: #f3b300;
    --sm-primary-dark: #c78f00;
    --sm-primary-light: #fff2bf;
    --sm-secondary: #202938;
    --sm-success: #4caf50;
    --sm-warning: #ff9800;
    --sm-error: #f44336;
    --sm-text: #333333;
    --sm-text-light: #666666;
    --sm-border: #e0e0e0;
    --sm-bg: #f5f5f5;
    --sm-white: #ffffff;
    --sm-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    --sm-radius: 12px;
}

/* Scoped dashboard namespace to avoid theme/WordPress class collisions */
.smx-dashboard,
.smx-dashboard * {
    box-sizing: border-box;
}

.smx-dashboard {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.smx-dashboard .sm-portal-layout,
.smx-dashboard .sm-portal-content,
.smx-dashboard .sm-directory,
.smx-dashboard .sm-search-top,
.smx-dashboard .sm-results-grid,
.smx-dashboard .sm-upgrade-page,
.smx-dashboard .sm-profile-edit,
.smx-dashboard .sm-form-section,
.smx-dashboard .sm-payment-history,
.smx-dashboard .sm-current-subscription,
.smx-dashboard form.sm-form,
.smx-dashboard form.sm-form.sm-profile-wizard {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
    clear: both !important;
}

.smx-dashboard form.sm-form.sm-profile-wizard > .sm-form-section {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.smx-dashboard .sm-directory {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
}

.smx-dashboard .sm-directory .sm-search-top,
.smx-dashboard .sm-directory .sm-results-grid {
    flex: none !important;
    align-self: stretch !important;
}

.smx-dashboard .sm-search-form-top .sm-search-row {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 1200px) {
    .smx-dashboard .sm-search-form-top .sm-search-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .smx-dashboard .sm-search-form-top .sm-search-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .smx-dashboard .sm-menu-toggle {
        display: inline-flex !important;
    }

    .smx-dashboard .sm-portal-layout,
    .smx-dashboard .sm-app-shell .sm-portal-layout {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    .smx-dashboard .sm-portal-content {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 12px !important;
    }

    .smx-dashboard .sm-app-shell .sm-portal-sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 280px;
        max-width: 82vw;
        height: 100vh;
        z-index: 1002;
        overflow-y: auto;
        border-radius: 0;
        transform: translateX(-102%);
        transition: transform 0.25s ease;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        background: #f7f7f7;
    }

    .smx-dashboard.sm-drawer-open .sm-portal-sidebar {
        transform: translateX(0);
    }

    .smx-dashboard.sm-drawer-open .sm-drawer-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 1001;
    }
}

/* Base Styles */
.sm-form,
.sm-registration-form,
.sm-profile-edit,
.sm-upgrade-page,
.sm-directory,
.sm-profile-view {
    max-width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/* Alert Styles */
.sm-alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: var(--sm-radius);
    border-left: 4px solid;
}

.sm-alert-success {
    background: #e8f5e9;
    border-color: var(--sm-success);
    color: #2e7d32;
}

.sm-alert-error {
    background: #ffebee;
    border-color: var(--sm-error);
    color: #c62828;
}

.sm-alert-warning {
    background: #fff3e0;
    border-color: var(--sm-warning);
    color: #ef6c00;
}

.sm-alert-info {
    background: #e3f2fd;
    border-color: var(--sm-secondary);
    color: #1565c0;
}

/* Buttons */
.sm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: var(--sm-radius);
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(32, 41, 56, 0.08);
}

.sm-btn-primary {
    background: var(--sm-primary);
    color: #1c1600;
    font-weight: 700;
}

.sm-btn-primary:hover {
    background: var(--sm-primary-dark);
    color: #111;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(199, 143, 0, 0.24);
}

.sm-btn-secondary {
    background: var(--sm-secondary);
    color: var(--sm-white);
}

.sm-btn-secondary:hover {
    background: #303f9f;
}

.sm-btn-outline {
    background: transparent;
    border: 2px solid var(--sm-primary);
    color: var(--sm-primary);
    font-weight: 600;
}

.sm-btn-outline:hover {
    background: var(--sm-primary);
    color: var(--sm-white);
}

.sm-btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.sm-btn-block {
    width: 100%;
}

/* Form Styles */
.sm-form-group {
    margin-bottom: 20px;
}

.sm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--sm-text);
}

.sm-form-group label .required {
    color: var(--sm-error);
}

.sm-form-group input[type="text"],
.sm-form-group input[type="email"],
.sm-form-group input[type="tel"],
.sm-form-group input[type="password"],
.sm-form-group input[type="number"],
.sm-form-group input[type="date"],
.sm-form-group input[type="file"],
.sm-form-group select,
.sm-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    border: 1px solid #ddd3a7;
    border-radius: var(--sm-radius);
    background: #fffef9;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.sm-form-group input:focus,
.sm-form-group select:focus,
.sm-form-group textarea:focus {
    outline: none;
    border-color: var(--sm-primary);
    box-shadow: 0 0 0 3px rgba(243, 179, 0, 0.22);
}

.sm-form-group input:disabled,
.sm-form-group select:disabled,
.sm-form-group textarea:disabled {
    background: #f6f6f6;
    cursor: not-allowed;
}

.sm-form-group select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #8b6b00 50%), linear-gradient(135deg, #8b6b00 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(1em + 3px), calc(100% - 13px) calc(1em + 3px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 36px;
}

.sm-form-group input[type="checkbox"],
.sm-form-group input[type="radio"] {
    accent-color: #f3b300;
}

.sm-help {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: var(--sm-text-light);
}

.sm-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.sm-col-4 {
    flex: 0 0 calc(33.333% - 14px);
}

.sm-col-6 {
    flex: 0 0 calc(50% - 10px);
}

/* Form Sections */
.sm-form-section {
    background: var(--sm-white);
    padding: 25px;
    margin-bottom: 25px;
    border-radius: var(--sm-radius);
    border: 1px solid var(--sm-border);
    box-shadow: var(--sm-shadow);
}

.sm-form-section h3 {
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--sm-primary);
    color: var(--sm-primary);
    font-size: 18px;
}

.sm-form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--sm-border);
}

/* Photo Styles */
.sm-current-photo img {
    max-width: 200px;
    border-radius: var(--sm-radius);
    box-shadow: var(--sm-shadow);
}

.sm-doc-preview img {
    max-width: 220px;
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid #e3d39a;
    background: #fff;
    padding: 4px;
}

.sm-no-photo,
.sm-no-photo-large {
    background: var(--sm-bg);
    border-radius: var(--sm-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
}

.sm-no-photo {
    width: 150px;
    height: 150px;
}

.sm-no-photo .dashicons {
    font-size: 50px;
    width: 50px;
    height: 50px;
}

.sm-no-photo-large {
    width: 300px;
    height: 300px;
}

.sm-no-photo-large .dashicons {
    font-size: 80px;
    width: 80px;
    height: 80px;
}

/* Directory Styles */
.sm-directory {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sm-user-shell .sm-directory {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
}

.sm-directory .sm-search-top,
.sm-directory .sm-results-grid {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    float: none !important;
    clear: both;
    align-self: stretch;
}

.sm-user-shell .sm-directory .sm-search-top,
.sm-user-shell .sm-directory .sm-results-grid {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    float: none !important;
    clear: both !important;
    flex: none !important;
}

.sm-search-sidebar {
    flex: 0 0 300px;
    background: var(--sm-white);
    padding: 25px;
    border-radius: var(--sm-radius);
    border: 1px solid var(--sm-border);
    box-shadow: var(--sm-shadow);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sm-search-sidebar h3 {
    margin: 0 0 20px;
    color: var(--sm-primary);
}

.sm-search-top {
    width: 100%;
    background: #fffdf5;
    border: 1px solid #ecdca2;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 18px;
    box-shadow: var(--sm-shadow);
}

.sm-search-top h3 {
    margin: 0 0 12px;
    color: #6a5200;
}

.sm-search-form-top .sm-search-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

@media (max-width: 1200px) {
    .sm-search-form-top .sm-search-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .sm-search-form-top .sm-search-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.sm-search-form-top .sm-form-group {
    margin-bottom: 0;
}

.sm-top-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid #eee2bd;
    padding-top: 12px;
}

.sm-search-form hr {
    margin: 20px 0;
    border: none;
    border-top: 1px solid var(--sm-border);
}

.sm-range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sm-range-inputs input {
    width: 80px !important;
}

.sm-range-inputs span {
    color: var(--sm-text-light);
}

/* Results Grid */
.sm-results-grid {
    width: 100%;
    min-width: 0;
}

.sm-results-header {
    margin-bottom: 20px;
}

.sm-results-header h3 {
    margin: 0;
    color: var(--sm-text);
}

.sm-results-count {
    color: var(--sm-text-light);
    font-size: 14px;
}

.sm-profiles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

/* Profile Card */
.sm-profile-card {
    background: var(--sm-white);
    border-radius: var(--sm-radius);
    border: 1px solid var(--sm-border);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    box-shadow: var(--sm-shadow);
}

.sm-profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.sm-profile-photo {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
}

.sm-profile-photo img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sm-photo-blurred {
    position: relative;
    display: block;
}

.sm-photo-blurred img {
    filter: blur(14px);
    transform: scale(1.03);
}

.sm-blur-badge {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(15, 15, 15, 0.7);
    color: #fff;
    font-size: 12px;
    text-align: center;
}

.sm-interest-form {
    margin: 0;
}

.sm-profile-photo-wrap {
    position: relative;
}

.sm-profile-photo .sm-no-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.sm-profile-info {
    padding: 15px;
}

.sm-profile-name {
    margin: 0 0 10px;
    font-size: 16px;
}

.sm-profile-name a {
    color: var(--sm-text);
    text-decoration: none;
}

.sm-profile-name a:hover {
    color: var(--sm-primary);
}

.sm-profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--sm-text-light);
}

.sm-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sm-meta-item .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.sm-profile-tag-code {
    font-size: 12px;
    color: var(--sm-text-light);
}

.sm-profile-tag-code strong {
    color: var(--sm-primary);
}

.sm-profile-locked {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Pagination */
.sm-pagination {
    margin-top: 30px;
    text-align: center;
}

.sm-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    margin: 0 5px;
    padding: 0 10px;
    background: var(--sm-white);
    border: 1px solid var(--sm-border);
    border-radius: var(--sm-radius);
    color: var(--sm-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.sm-pagination .page-numbers:hover,
.sm-pagination .page-numbers.current {
    background: var(--sm-primary);
    border-color: var(--sm-primary);
    color: var(--sm-white);
}

/* No Results */
.sm-no-results {
    text-align: center;
    padding: 50px 20px;
    background: var(--sm-white);
    border-radius: var(--sm-radius);
    border: 1px solid var(--sm-border);
}

/* Profile View */
.sm-profile-view {
    background: var(--sm-white);
    border-radius: var(--sm-radius);
    overflow: hidden;
}

.sm-profile-header {
    display: flex;
    gap: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #fff8da, var(--sm-white));
}

.sm-profile-view .sm-profile-header {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 18px;
    align-items: start;
}

.sm-profile-view .sm-profile-photo-large img {
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: cover;
    border-radius: 12px;
}

.sm-horoscope-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.sm-horoscope-item {
    border: 1px solid #ecdca2;
    background: #fffdf5;
    border-radius: 12px;
    padding: 10px;
}

.sm-horoscope-item h4 {
    margin: 0 0 8px;
    color: #6f5600;
}

.sm-horoscope-item img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 8px;
}

.sm-profile-photo-large {
    flex-shrink: 0;
}

.sm-profile-photo-large img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: var(--sm-radius);
    box-shadow: var(--sm-shadow);
}

.sm-profile-header-info {
    flex: 1;
}

.sm-profile-header-info h1 {
    margin: 0 0 10px;
    color: var(--sm-text);
}

.sm-profile-tag {
    color: var(--sm-text-light);
    margin-bottom: 15px;
}

.sm-profile-tag strong {
    color: var(--sm-primary);
    font-size: 18px;
}

.sm-profile-quick-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.sm-quick-item {
    background: var(--sm-white);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
}

.sm-quick-item strong {
    color: var(--sm-text-light);
    font-weight: 500;
}

.sm-profile-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Profile Sections */
.sm-profile-content {
    padding: 30px;
}

.sm-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--sm-border);
}

.sm-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sm-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    color: var(--sm-primary);
    font-size: 20px;
}

.sm-section h2 .dashicons {
    color: var(--sm-secondary);
}

.sm-section-content {
    padding-left: 34px;
}

.sm-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.sm-info-item {
    margin-bottom: 10px;
}

.sm-info-label {
    display: block;
    font-size: 12px;
    color: var(--sm-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.sm-info-value {
    font-size: 16px;
    color: var(--sm-text);
}

.sm-info-value a {
    color: var(--sm-primary);
    text-decoration: none;
}

.sm-info-value a:hover {
    text-decoration: underline;
}

.sm-about-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--sm-border);
}

.sm-about-section h4 {
    margin: 0 0 10px;
    color: var(--sm-text);
}

.sm-about-section p {
    margin: 0;
    color: var(--sm-text-light);
    line-height: 1.7;
}

/* Contact Section */
.sm-contact-section {
    background: #e8f5e9;
    margin: 0 -30px -30px;
    padding: 30px;
}

.sm-contact-locked {
    background: var(--sm-bg);
    margin: 0 -30px -30px;
    padding: 30px;
    text-align: center;
}

.sm-contact-locked p {
    margin: 0 0 15px;
    color: var(--sm-text-light);
}

/* Upgrade Page */
.sm-upgrade-page h2 {
    margin: 0 0 10px;
    color: var(--sm-text);
}

.sm-intro {
    color: var(--sm-text-light);
    margin-bottom: 30px;
}

/* Plans Grid */
.sm-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.sm-plan-card {
    background: var(--sm-white);
    border-radius: var(--sm-radius);
    border: 2px solid var(--sm-border);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sm-plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.sm-plan-card.sm-featured {
    border-color: var(--sm-primary);
}

.sm-plan-badge {
    position: absolute;
    top: 15px;
    right: -35px;
    background: var(--sm-primary);
    color: white;
    padding: 5px 40px;
    font-size: 12px;
    font-weight: 600;
    transform: rotate(45deg);
}

.sm-plan-header {
    background: linear-gradient(135deg, #fff6cd, var(--sm-white));
    padding: 30px;
    text-align: center;
}

.sm-plan-header h3 {
    margin: 0 0 15px;
    color: var(--sm-text);
}

.sm-plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}

.sm-currency {
    font-size: 20px;
    color: var(--sm-text-light);
}

.sm-amount {
    font-size: 48px;
    font-weight: 700;
    color: var(--sm-primary);
    line-height: 1;
}

.sm-period {
    font-size: 16px;
    color: var(--sm-text-light);
}

.sm-plan-features {
    padding: 25px 30px;
}

.sm-plan-features ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sm-plan-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--sm-border);
}

.sm-plan-features li:last-child {
    border-bottom: none;
}

.sm-plan-features .dashicons {
    color: var(--sm-success);
}

.sm-plan-features .dashicons.dashicons-no {
    color: var(--sm-error);
}

.sm-plan-features del {
    color: var(--sm-text-light);
}

.sm-plan-action {
    padding: 0 30px 30px;
}

.sm-selected-profile {
    background: var(--sm-bg);
    padding: 15px;
    border-radius: var(--sm-radius);
    margin-bottom: 15px;
    text-align: center;
}

.sm-info-text {
    text-align: center;
    color: var(--sm-text-light);
    margin-bottom: 15px;
}

/* Payment Instructions */
.sm-payment-instructions {
    background: var(--sm-white);
    padding: 30px;
    border-radius: var(--sm-radius);
    border: 1px solid var(--sm-border);
    margin-bottom: 30px;
    box-shadow: var(--sm-shadow);
}

.sm-payment-instructions h3 {
    margin: 0 0 15px;
    color: var(--sm-primary);
}

.sm-instructions-content {
    padding: 20px;
    background: var(--sm-bg);
    border-radius: var(--sm-radius);
    margin-bottom: 15px;
}

.sm-payment-note {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    background: #fff3e0;
    padding: 15px;
    border-radius: var(--sm-radius);
}

.sm-payment-note .dashicons {
    color: var(--sm-warning);
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.sm-payment-note p {
    margin: 0;
    color: #ef6c00;
}

/* Payment History */
.sm-payment-history {
    background: var(--sm-white);
    padding: 30px;
    border-radius: var(--sm-radius);
    border: 1px solid var(--sm-border);
    box-shadow: var(--sm-shadow);
}

.sm-payment-proof {
    margin: 16px 0 18px;
    padding: 14px;
    border: 1px dashed #d7be6c;
    border-radius: 10px;
    background: #fff9e3;
}

.sm-admin-portal .sm-admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.sm-admin-portal .sm-form-section h3 {
    margin-top: 0;
}

.sm-portal-layout {
    display: grid !important;
    grid-template-columns: 230px 1fr !important;
    gap: 20px;
    align-items: start;
}

.sm-portal-sidebar {
    background: #f4f4f4;
    border: 1px solid #d7d7d7;
    border-radius: 0 0 12px 12px;
    padding: 12px;
    position: sticky !important;
    top: 0;
    align-self: start;
}

.sm-portal-sidebar h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

.sm-portal-sidebar,
.sm-app-shell .sm-portal-sidebar {
    display: block !important;
}

.sm-portal-sidebar .sm-portal-link,
.sm-app-shell .sm-portal-sidebar .sm-portal-link {
    display: block !important;
    width: 100% !important;
}

.sm-portal-link {
    display: block;
    padding: 12px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    text-decoration: none;
    color: #212121;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    font-weight: 600;
}

.sm-portal-link.active,
.sm-portal-link:hover {
    background: #ffe082;
    color: #1d1d1d;
    border-color: #f3b300;
}

.sm-portal-content {
    min-width: 0;
    background: #f8f9fb;
}

.sm-app-shell {
    border: 1px solid #d7d7d7;
    border-radius: 14px;
    overflow: hidden;
    background: #f3f4f6;
}

.sm-app-top {
    display: grid;
    grid-template-columns: 230px 1fr auto;
    align-items: center;
    min-height: 54px;
    border-bottom: 1px solid #d8d8d8;
    background: linear-gradient(90deg, #f3b300, #ffd54f);
}

.sm-app-brand {
    padding: 0 14px;
    font-weight: 700;
    font-size: 30px;
    color: #1d1d1d;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sm-app-title {
    padding: 0 14px;
    font-size: 22px;
    font-weight: 700;
    color: #1d1d1d;
}

.sm-app-meta {
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.sm-menu-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border: 1px solid #c89a00;
    background: #ffd54f;
    border-radius: 8px;
    color: #1f1f1f;
    font-weight: 700;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.sm-menu-icon {
    line-height: 1;
    font-size: 20px;
}

.sm-app-shell .sm-portal-layout {
    display: grid !important;
    grid-template-columns: 230px 1fr !important;
}

.sm-app-shell .sm-portal-sidebar {
    display: block !important;
}

.sm-app-shell .sm-portal-sidebar .sm-portal-link {
    display: block !important;
    width: 100%;
    margin: 0 0 10px 0;
}

.sm-app-shell .sm-portal-content > * {
    width: 100%;
}

.sm-drawer-backdrop {
    display: none;
}

.sm-app-shell .sm-btn-primary,
.sm-app-shell button.sm-btn-primary {
    background: #f3b300 !important;
    border-color: #c78f00 !important;
    color: #1f1f1f !important;
}

.sm-app-shell .sm-btn-outline {
    border-color: #f3b300 !important;
    color: #8f6b00 !important;
}

.sm-card-actions {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.sm-inline-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sm-gender-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 12px;
}

.sm-gender-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid #e8d590;
    border-radius: 12px;
    background: #fffaf0;
    min-height: 120px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sm-gender-card input {
    display: none;
}

.sm-gender-card .sm-gender-icon {
    font-size: 24px;
    font-weight: 700;
    color: #5a4500;
    line-height: 1;
}

.sm-gender-card .sm-gender-label {
    margin-top: 8px;
    font-weight: 600;
    color: #3a2d00;
}

.sm-gender-card.is-selected,
.sm-gender-card:has(input:checked) {
    border-color: #f3b300;
    background: #fff2bf;
    box-shadow: 0 0 0 3px rgba(243, 179, 0, 0.18);
}

.sm-profile-wizard .sm-form-section {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.sm-profile-edit form.sm-form.sm-profile-wizard {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    float: none !important;
    box-sizing: border-box !important;
}

.sm-profile-edit form.sm-form.sm-profile-wizard > .sm-form-section {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

.sm-wizard-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}

.sm-wizard-progress {
    font-size: 13px;
    color: #5a5a5a;
    margin-bottom: 10px;
}

.sm-app-shell .sm-profile-header {
    background: linear-gradient(135deg, #fff7cc, #fffef3) !important;
}

.sm-sticky-alert {
    position: sticky;
    top: 8px;
    z-index: 9;
}

.sm-user-shell .sm-search-form .sm-btn-secondary {
    border: 1px solid #f3b300;
    background: #fff7cc;
    color: #5a4500;
}

.sm-admin-shell .sm-portal-layout,
.sm-user-shell .sm-portal-layout {
    margin: 0;
    padding: 0;
}

.sm-admin-shell .sm-portal-content,
.sm-user-shell .sm-portal-content {
    padding: 16px;
    background: #f8f9fb;
}

.sm-payment-history h3 {
    margin: 0 0 20px;
    color: var(--sm-primary);
}

.sm-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.sm-table th,
.sm-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--sm-border);
}

.sm-table th {
    background: var(--sm-bg);
    font-weight: 600;
    color: var(--sm-text);
}

.sm-table td {
    color: var(--sm-text-light);
}

.sm-admin-profiles-wrap {
    overflow-x: auto;
}

.sm-admin-profiles-table {
    table-layout: fixed;
    min-width: 980px;
}

.sm-admin-profiles-table th,
.sm-admin-profiles-table td {
    vertical-align: top;
    word-break: break-word;
}

.sm-admin-profiles-table th:nth-child(1),
.sm-admin-profiles-table td:nth-child(1) { width: 20%; }
.sm-admin-profiles-table th:nth-child(2),
.sm-admin-profiles-table td:nth-child(2) { width: 20%; }
.sm-admin-profiles-table th:nth-child(3),
.sm-admin-profiles-table td:nth-child(3) { width: 10%; }
.sm-admin-profiles-table th:nth-child(4),
.sm-admin-profiles-table td:nth-child(4) { width: 10%; }
.sm-admin-profiles-table th:nth-child(5),
.sm-admin-profiles-table td:nth-child(5) { width: 12%; }
.sm-admin-profiles-table th:nth-child(6),
.sm-admin-profiles-table td:nth-child(6) { width: 28%; }

.sm-admin-profiles-actions {
    margin-bottom: 8px;
}

.sm-admin-profiles-manage-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: center;
}

.sm-admin-profiles-manage-form select,
.sm-admin-profiles-manage-form button,
.sm-admin-profiles-manage-form label {
    width: 100%;
    margin: 0;
}

.sm-admin-search-form .sm-inline-actions {
    align-items: center;
}

.sm-admin-search-form input[type="text"] {
    min-width: 280px;
    max-width: 460px;
}

/* Status Badges */
.sm-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-approved {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-pending {
    background: #fff3e0;
    color: #ef6c00;
}

.status-rejected {
    background: #ffebee;
    color: #c62828;
}

.status-draft {
    background: #e3f2fd;
    color: #1565c0;
}

/* Current Subscription */
.sm-current-subscription {
    background: var(--sm-white);
    padding: 30px;
    border-radius: var(--sm-radius);
    border: 1px solid var(--sm-border);
}

.sm-current-subscription h2 {
    margin: 0 0 20px;
    color: var(--sm-text);
}

.sm-subscription-card {
    padding: 25px;
    border-radius: var(--sm-radius);
    border: 2px solid var(--sm-success);
    background: #e8f5e9;
}

.sm-subscription-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 18px;
    color: var(--sm-success);
    font-weight: 600;
}

.sm-subscription-status .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.sm-subscription-details {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.sm-detail-item {
    display: flex;
    flex-direction: column;
}

.sm-detail-item label {
    font-size: 12px;
    color: var(--sm-text-light);
    margin-bottom: 5px;
}

.sm-detail-item span {
    font-size: 18px;
    font-weight: 600;
    color: var(--sm-text);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .smx-dashboard,
    .smx-dashboard .sm-app-shell,
    .smx-dashboard .sm-portal-layout,
    .smx-dashboard .sm-portal-content,
    .smx-dashboard .sm-upgrade-page,
    .smx-dashboard .sm-profile-edit,
    .smx-dashboard .sm-directory,
    .smx-dashboard .sm-search-top,
    .smx-dashboard .sm-results-grid,
    .smx-dashboard .sm-form-section,
    .smx-dashboard .sm-payment-history,
    .smx-dashboard .sm-current-subscription,
    .smx-dashboard form.sm-form,
    .smx-dashboard form.sm-form.sm-profile-wizard,
    .smx-dashboard form.sm-form.sm-profile-wizard > .sm-form-section,
    .theiaStickySidebar .smx-dashboard,
    .theiaStickySidebar .smx-dashboard .sm-portal-content,
    .theiaStickySidebar .smx-dashboard .sm-profile-edit,
    .theiaStickySidebar .smx-dashboard form.sm-form.sm-profile-wizard,
    .theiaStickySidebar .smx-dashboard form.sm-form.sm-profile-wizard > .sm-form-section {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        float: none !important;
        clear: both !important;
        box-sizing: border-box !important;
    }

    .smx-dashboard .sm-search-form-top .sm-search-row {
        grid-template-columns: 1fr !important;
    }

    .smx-dashboard .sm-form-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }

    .smx-dashboard .sm-col-4,
    .smx-dashboard .sm-col-6 {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .smx-dashboard .sm-table {
        width: 100%;
        min-width: 520px;
    }

    .sm-menu-toggle {
        display: inline-flex;
    }

    .sm-portal-layout {
        grid-template-columns: 1fr !important;
    }

    .sm-app-shell .sm-portal-sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 280px;
        max-width: 80vw;
        height: 100vh;
        z-index: 1002;
        overflow-y: auto;
        border-radius: 0;
        transform: translateX(-102%);
        transition: transform 0.25s ease;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        background: #f7f7f7;
    }

    .sm-app-shell.sm-drawer-open .sm-portal-sidebar {
        transform: translateX(0);
    }

    .sm-app-shell.sm-drawer-open .sm-drawer-backdrop {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 1001;
    }

    .sm-app-top {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 8px 0;
        position: sticky;
        top: 0;
        z-index: 50;
    }

    .sm-app-brand {
        font-size: 20px;
        line-height: 1.2;
        justify-content: flex-start;
        gap: 8px;
    }

    .sm-app-title {
        font-size: 20px;
        line-height: 1.2;
    }

    .sm-app-meta {
        font-size: 12px;
        line-height: 1.3;
    }

    .sm-app-shell {
        border-radius: 10px;
        background: #f7f7f8;
    }

    .sm-admin-shell .sm-portal-content,
    .sm-user-shell .sm-portal-content {
        padding: 12px;
        background: #ffffff;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    .sm-app-shell,
    .sm-user-shell,
    .sm-user-shell .sm-portal-layout,
    .sm-user-shell .sm-portal-content,
    .sm-user-shell .sm-profile-edit,
    .sm-user-shell .sm-profile-wizard,
    .sm-user-shell .sm-profile-wizard .sm-form-section,
    .sm-user-shell .sm-directory,
    .sm-user-shell .sm-search-top,
    .sm-user-shell .sm-results-grid {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        float: none !important;
        clear: both !important;
        box-sizing: border-box !important;
    }

    .sm-form-section,
    .sm-payment-history,
    .sm-current-subscription {
        margin-bottom: 16px;
        padding: 14px;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
    }

    .sm-form-section,
    .sm-payment-history {
        overflow-x: auto;
    }

    .sm-table {
        width: 100%;
        min-width: 560px;
    }

    .sm-inline-actions {
        flex-direction: column;
    }

    .sm-gender-cards {
        grid-template-columns: 1fr;
    }

    .sm-admin-shell .sm-portal-content,
    .sm-user-shell .sm-portal-content {
        padding: 12px;
    }

    .sm-admin-shell .sm-upgrade-page,
    .sm-user-shell .sm-upgrade-page,
    .sm-admin-shell .sm-portal-content > *,
    .sm-user-shell .sm-portal-content > * {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    .sm-profile-edit,
    .sm-profile-wizard,
    .sm-profile-wizard .sm-form-section,
    .sm-profile-edit .sm-form-row,
    .sm-profile-edit .sm-form-group {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        float: none !important;
        clear: both;
        box-sizing: border-box;
    }

    .sm-directory .sm-search-top,
    .sm-directory .sm-results-grid {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    .sm-app-brand,
    .sm-app-title,
    .sm-app-meta {
        padding-left: 12px;
        padding-right: 12px;
    }

    .sm-directory {
        flex-direction: column;
    }

    .sm-search-sidebar {
        flex: none;
        width: 100%;
        position: static;
    }

    .sm-search-form-top .sm-search-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .sm-search-top {
        padding: 12px;
        margin-bottom: 12px;
        border-radius: 10px;
    }

    .sm-search-form-top .sm-form-group {
        width: 100%;
    }

    .sm-search-form-top input,
    .sm-search-form-top select {
        width: 100% !important;
    }

    .sm-top-actions {
        justify-content: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .sm-range-inputs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .sm-range-inputs span {
        display: none;
    }

    .sm-range-inputs input {
        width: 100% !important;
    }

    .sm-profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .sm-profile-photo-large img {
        width: 100%;
        max-width: 280px;
        height: auto;
    }

    .sm-profile-quick-info {
        justify-content: center;
    }

    .sm-profile-actions {
        justify-content: center;
    }

    .sm-profile-view .sm-profile-header {
        grid-template-columns: 1fr;
    }

    .sm-section-content {
        padding-left: 0;
    }

    .sm-form-row {
        flex-direction: column;
        gap: 0;
    }

    .sm-col-4,
    .sm-col-6 {
        flex: none;
        width: 100%;
    }

    .sm-profiles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .sm-profile-card {
        border-radius: 10px;
    }

    .sm-profile-info {
        padding: 10px;
    }

    .sm-plans-grid {
        grid-template-columns: 1fr;
    }

    .sm-info-grid {
        grid-template-columns: 1fr;
    }

    .sm-profile-view {
        padding: 10px;
    }

    .sm-profile-header {
        padding: 14px;
    }

    .sm-profile-content {
        padding: 14px;
    }

    .sm-contact-section,
    .sm-contact-locked {
        margin: 0 -20px -20px;
    }

    /* Admin profiles table: convert to stacked cards on mobile */
    .smx-admin-dashboard .sm-admin-profiles-wrap {
        overflow: visible;
    }

    .smx-admin-dashboard .sm-admin-profiles-table {
        min-width: 0 !important;
        table-layout: auto;
        border-collapse: separate;
        border-spacing: 0;
        background: transparent;
    }

    .smx-admin-dashboard .sm-admin-profiles-table thead {
        display: none;
    }

    .smx-admin-dashboard .sm-admin-profiles-table tbody,
    .smx-admin-dashboard .sm-admin-profiles-table tr,
    .smx-admin-dashboard .sm-admin-profiles-table td {
        display: block;
        width: 100% !important;
    }

    .smx-admin-dashboard .sm-admin-profiles-table tr {
        background: #fff;
        border: 1px solid var(--sm-border);
        border-radius: 10px;
        margin-bottom: 12px;
        padding: 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }

    .smx-admin-dashboard .sm-admin-profiles-table td {
        border-bottom: 1px dashed #ececec;
        padding: 8px 4px;
        position: relative;
    }

    .smx-admin-dashboard .sm-admin-profiles-table td:last-child {
        border-bottom: 0;
    }

    .smx-admin-dashboard .sm-admin-profiles-table td:nth-child(1)::before { content: "Name"; }
    .smx-admin-dashboard .sm-admin-profiles-table td:nth-child(2)::before { content: "User"; }
    .smx-admin-dashboard .sm-admin-profiles-table td:nth-child(3)::before { content: "Status"; }
    .smx-admin-dashboard .sm-admin-profiles-table td:nth-child(4)::before { content: "Plan"; }
    .smx-admin-dashboard .sm-admin-profiles-table td:nth-child(5)::before { content: "Photo Mode"; }
    .smx-admin-dashboard .sm-admin-profiles-table td:nth-child(6)::before { content: "Actions"; }

    .smx-admin-dashboard .sm-admin-profiles-table td::before {
        display: block;
        font-size: 11px;
        font-weight: 700;
        color: #7a7a7a;
        margin-bottom: 6px;
        text-transform: uppercase;
        letter-spacing: 0.4px;
    }

    .smx-admin-dashboard .sm-admin-profiles-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 10px;
    }

    .smx-admin-dashboard .sm-admin-profiles-actions .sm-btn,
    .smx-admin-dashboard .sm-admin-profiles-actions form,
    .smx-admin-dashboard .sm-admin-profiles-actions button {
        width: 100%;
    }

    .smx-admin-dashboard .sm-admin-profiles-manage-form {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .smx-admin-dashboard .sm-admin-profiles-manage-form .sm-btn,
    .smx-admin-dashboard .sm-admin-profiles-manage-form select,
    .smx-admin-dashboard .sm-admin-profiles-manage-form label {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .sm-admin-shell .sm-portal-content,
    .sm-user-shell .sm-portal-content,
    .sm-admin-shell .sm-upgrade-page,
    .sm-user-shell .sm-upgrade-page,
    .sm-form-section,
    .sm-payment-history,
    .sm-current-subscription {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
    }

    .sm-payment-history {
        overflow-x: auto;
    }

    .sm-table {
        min-width: 520px;
    }

    .sm-profile-edit,
    .sm-profile-wizard,
    .sm-profile-wizard .sm-form-section,
    .sm-directory .sm-search-top,
    .sm-directory .sm-results-grid {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        float: none !important;
    }

    .sm-profiles-grid {
        grid-template-columns: 1fr;
    }

    .sm-app-brand {
        font-size: 18px;
    }

    .sm-app-title {
        font-size: 18px;
    }

    .sm-btn-lg {
        padding: 12px 20px;
        font-size: 14px;
    }

    .sm-plan-header {
        padding: 20px;
    }

    .sm-amount {
        font-size: 36px;
    }
}

/* Theme wrapper hardening: prevent sticky-sidebar wrappers from shrinking plugin UI */
.theiaStickySidebar .sm-app-shell,
.theiaStickySidebar .sm-user-shell,
.theiaStickySidebar .sm-user-shell .sm-portal-content,
.theiaStickySidebar .sm-user-shell .sm-directory,
.theiaStickySidebar .sm-user-shell .sm-search-top,
.theiaStickySidebar .sm-user-shell .sm-results-grid,
.theiaStickySidebar .sm-user-shell .sm-profile-edit,
.theiaStickySidebar .sm-user-shell .sm-profile-wizard,
.theiaStickySidebar .sm-user-shell .sm-profile-edit form.sm-form.sm-profile-wizard,
.theiaStickySidebar .sm-user-shell .sm-profile-wizard .sm-form-section {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    float: none !important;
    box-sizing: border-box !important;
}
