/* Dashboard Layout Styling */

:root {
    --sidebar-width: 280px;
    --sidebar-bg: #ffffff;
    --content-bg: #f8fafc;
}


/* Ensure sidebar is above everything */
.sidebar {
    width: var(--sidebar-width) !important;
    z-index: 10001 !important;
    /* Higher than style.css header */
    height: 100vh !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    opacity: 1 !important;
    border-right: 1px solid var(--border-color);
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    padding: 2rem 0;
    /* Vertical padding only */
    display: flex !important;
    flex-direction: column;
    z-index: 9999 !important;
    visibility: visible !important;
}

.sidebar .logo {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 0 1.25rem !important;
    /* Reduced from 1.75rem */
    margin-bottom: 3.5rem;
    transform: none !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
    text-decoration: none;
    line-height: 1;
}

.sidebar .logo img {
    height: 32px !important;
    /* Slightly smaller to match text cap height */
    width: auto;
    display: block;
    /* Remove inline behaviors */
}

.sidebar .logo span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    font-size: 1.8rem !important;
    line-height: 1;
    padding: 4px 0;
    letter-spacing: -1px;
}

.sidebar-nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.25rem !important;
    flex-grow: 1;
    padding: 0 0.5rem !important;
    align-items: flex-start !important;
    /* Left align all nav items */
    /* Reset styles from style.css nav */
    position: static !important;
    width: 100% !important;
    height: auto !important;
    background: transparent !important;
    backdrop-filter: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    z-index: auto !important;
    justify-content: flex-start !important;
    transition: none !important;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.85rem 0.75rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    justify-content: flex-start;
    text-align: left;
    width: 100%;
    /* Ensure no unwanted backgrounds persist */
    background: transparent;
}

.nav-item:not(.active) {
    background: transparent !important;
    color: var(--text-secondary) !important;
}

.nav-item:hover {
    background: #f8fafc;
    color: var(--text-primary);
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.nav-item.active {
    background: var(--primary-gradient);
    color: white !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
}

.nav-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    color: currentColor;
    flex-shrink: 0;
}

.nav-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2px;
    stroke: currentColor;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Logout Button Specifics */
.logout-btn {
    color: #ef4444 !important;
    background: transparent;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    transform: translateX(4px);
}

.logout-btn:active {
    background: #fee2e2 !important;
    transform: translateX(2px);
}

/* Content Sections for SPA */
.content-section {
    display: none;
    animation: none;
}

.content-section.active {
    display: block;
}

/* Animation Removed */

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width) !important;
    flex-grow: 1;
    padding: 0;
    max-width: calc(100% - var(--sidebar-width)) !important;
    position: relative;
    z-index: 1;
}

.content-inner {
    padding: 3rem 4rem;
    max-width: 1300px;
    margin: 0 auto;
}

.content-header {
    margin-bottom: 3.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* Stat Cards */
.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
}


.stat-value {
    font-size: 3.5rem;
    font-weight: 900;
    color: #6366f1;
    /* Purple */
    text-align: center;
    line-height: 1;
    margin-bottom: 0.5rem;
    width: 100%;
}

.stat-label {
    font-size: 1rem;
    font-weight: 700;
    color: #334155;
    /* High Contrast Gray */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Pro Badge */
.pro-badge {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    vertical-align: middle;
}

/* Regulations Table Styling */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.75rem;
    margin-top: -0.75rem;
}

th {
    text-align: left;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
}

td {
    padding: 1.25rem 1.5rem;
    background: white;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

td:first-child {
    border-left: 1px solid var(--border-color);
    border-radius: 12px 0 0 12px;
}

td:last-child {
    border-right: 1px solid var(--border-color);
    border-radius: 0 12px 12px 0;
    text-align: center;
}

tr:hover td {
    background-color: #f8fafc;
    border-color: #667eea !important;
}

/* Edit button - Purple style */
.edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 8px;
    background: var(--primary-gradient);
    border: none;
    color: white;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
    white-space: nowrap;
}

.edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Removed ::before pseudo-element for stamp style */

/* Basic Modal Content - Global Robustness */
.modal-content {
    position: relative !important;
    background: white;
    border-radius: 20px;
    /* Basic default */
}

/* Edit Modal Alignment - Enhanced Large Version */
.modal-content.edit-modal-content {
    max-width: 700px !important;
    padding: 2.5rem !important;
    text-align: left;
    background: white;
    position: relative !important;
    border-radius: 28px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    overflow-y: auto;
}

/* Email Template Body Editor - Simple large textarea */
.template-body-editor {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.template-body-editor textarea {
    width: 100%;
    height: 220px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.8;
    resize: vertical;
    background: #fff;
}

.template-body-editor textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Edit Modal Buttons */
.edit-modal-btns {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.edit-modal-btns button {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
}

.close-modal-pro {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    width: 44px !important;
    height: 44px !important;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.75rem;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    line-height: 1;
    z-index: 2147483647 !important;
}

.close-modal-pro:hover {
    background: #fee2e2;
    color: #ef4444;
    /* transform: rotate(90deg) scale(1.1); */
}

.form-group-pro {
    margin-bottom: 2rem;
}

.label-pro-fixed {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.textarea-pro {
    width: 100%;
    min-height: 120px;
    padding: 1.25rem;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    font-family: inherit;
    font-size: 1rem;
    background-color: #f8fafc;
    color: var(--text-primary);
    transition: all 0.2s;
    resize: none;
    line-height: 1.6;
}

.textarea-pro:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Input and Select (normal height) */
.input-pro {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-family: inherit;
    font-size: 0.95rem;
    background-color: #f8fafc;
    color: var(--text-primary);
    transition: all 0.2s;
}

.input-pro:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

select.input-pro {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #f8fafc;
    padding-right: 2rem;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2364748b' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 10px 6px;
}

.btn-group-pro {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Mobile & Footer Support */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: white;
    z-index: 9999;
    padding: 0 1rem;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* Mobile header logo */
.mobile-header .logo {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 900;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mobile-header .logo-img {
    height: 26px;
    width: auto;
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.mobile-logo img {
    height: 30px;
}

.mobile-logo span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    font-size: 1.5rem;
}

/* Category Accordion Styles */
.category-accordion {
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    transition: all 0.3s ease;
}

.category-header {
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.category-header:hover {
    background: #f1f5f9;
}

.category-accordion.active .category-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

.accordion-icon {
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.category-accordion.active .accordion-icon {
    transform: rotate(180deg);
}

.category-content {
    display: none;
    padding: 0;
}

.category-accordion.active .category-content {
    display: block;
}

.category-content table {
    border-radius: 0;
    box-shadow: none;
    border: none;
}

/* Remove margin from last category */
.category-accordion:last-child {
    margin-bottom: 0;
}

.mobile-menu-btn {
    width: 44px;
    height: 44px;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    background: none !important;
    border: none !important;
    outline: none !important;
    padding: 0;
    z-index: 10000;
    -webkit-tap-highlight-color: transparent;
    /* Fix alignment by absolute positioning */
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 1024px) {
    .mobile-menu-btn {
        display: flex !important;
    }
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #333333;
    /* Explicit dark color for visibility */
    border-radius: 3px;
    transition: 0.3s;
}

/* Hamburger Animation */
.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.sidebar-footer {
    margin-top: auto;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    background: #fafafa;
}

.footer-link {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--text-primary);
}

@media (max-width: 1024px) {
    .mobile-header {
        display: flex;
    }

    .sidebar {
        left: -100% !important;
        transition: left 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        will-change: left;
        width: 85% !important;
        max-width: 320px;
        box-shadow: 20px 0 60px rgba(0, 0, 0, 0.1);
        display: flex !important;
        background: #ffffff !important;
        height: 100vh;
        top: 60px;
        bottom: 0;
        padding-top: 1rem;
    }

    .sidebar.active {
        left: 0 !important;
        z-index: 5500;
        visibility: visible !important;
    }

    .sidebar .logo {
        display: none !important;
    }

    /* Override any nav styles from style.css */
    .sidebar-nav {
        position: static !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        width: 100% !important;
        height: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: flex !important;
        flex-direction: column !important;
        background: transparent !important;
        backdrop-filter: none !important;
    }

    .main-content {
        margin-left: 0;
        max-width: 100%;
        padding-top: 60px;
    }

    .content-inner {
        padding: 1rem 1.5rem;
    }

    .content-header {
        display: none;
    }
}

/* Switch Toggle Styling */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e2e8f0;
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked+.slider {
    background: var(--primary-gradient);
}

input:focus+.slider {
    box-shadow: 0 0 1px #667eea;
}

input:checked+.slider:before {
    transform: translateX(22px);
}

/* Pro Plan Card Styling */
.pro-plan-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 30px;
    padding: 3rem 2rem;
    color: white;
    text-align: center;
    max-width: 400px;
    margin: 2rem auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.recommend-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: #764ba2;
    padding: 0.4rem 1.25rem;
    border-radius: 20px;
    font-weight: 900;
    font-size: 0.85rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.pro-plan-card h3 {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    color: white;
    letter-spacing: -0.5px;
}

.pro-plan-card .price {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.pro-plan-card .price small {
    font-size: 1.25rem;
    font-weight: 700;
    margin-left: 4px;
}

.pro-plan-card .price-sub {
    font-size: 0.95rem;
    opacity: 0.95;
    margin-bottom: 2.5rem;
    font-weight: 600;
}

.pro-plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem 0;
    text-align: left;
}

.pro-plan-features li {
    padding: 0.8rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.9rem;
}

.pro-plan-features li:first-child {
    border-top: none;
}

.pro-plan-features .feature-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.btn-start-free {
    background: white;
    color: #764ba2;
    border: none;
    padding: 1.1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 900;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-start-free:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    background: #f8fafc;
}


/* Premium Membership UI */
.membership-dashboard {
    max-width: 900px;
    margin: 0 auto;
}

.membership-card {
    --card-bg: linear-gradient(145deg, #0a0a0a 0%, #1a1a1a 100%);
    --card-border: #d4af37;
    --card-shimmer: rgba(255, 215, 0, 0.4);
    --card-text-metallic: linear-gradient(135deg, #fff9c4 0%, #f7ef8a 20%, #d4af37 50%, #b8860b 80%, #ffd700 100%);
    --card-watermark-bg: linear-gradient(180deg, rgba(212, 175, 55, 0.05) 0%, rgba(212, 175, 55, 0) 100%);
    --card-accent-glow: rgba(212, 175, 55, 0.4);
    --card-text-primary: #fff;
    --card-label-color: #9ca3af;

    background: var(--card-bg);
    border-radius: clamp(12px, 3vw, 20px);
    padding: clamp(1rem, 4vw, 3rem);
    color: var(--card-text-primary);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.4),
        inset 0 0 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 1.5rem;
    border: 2px solid var(--card-border);
    aspect-ratio: 1.58 / 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: 'Inter', sans-serif;
    z-index: 1;
}

/* Lite Theme (Platinum Silver - Maximum Visibility) */
.membership-card.lite {
    --card-bg: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #e2e8f0 100%);
    --card-border: #64748b;
    --card-shimmer: rgba(0, 0, 0, 0.1);
    --card-text-metallic: #000;
    --card-watermark-bg: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
    --card-accent-glow: rgba(0, 0, 0, 0.1);
    --card-text-primary: #000;
    --card-label-color: #475569;
}

.membership-card.lite .gold-text-metallic,
.membership-card.lite .card-logo-text,
.membership-card.lite .card-value {
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: initial !important;
    color: #000 !important;
    font-weight: 900 !important;
    text-shadow: none !important;
}

/* LITE theme badge - Special styling: White bg, Gray border/text */
.membership-card.lite .plan-badge-responsive {
    background: #ffffff !important;
    color: #64748b !important;
    border: 1.5px solid #64748b !important;
    text-shadow: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

.membership-card.lite .progress-ring-svg circle:last-child {
    stroke: #64748b !important;
    filter: drop-shadow(0 0 8px rgba(100, 116, 139, 0.2)) !important;
}

.membership-card.lite .progress-label {
    color: #64748b;
}

.membership-card.lite .progress-number {
    color: #000 !important;
}

/* Standard Theme (Midnight Sapphire Blue) */
.membership-card.standard {
    --card-bg: linear-gradient(145deg, #051937 0%, #004d7a 100%);
    --card-border: #3b82f6;
    --card-shimmer: rgba(59, 130, 246, 0.5);
    --card-text-metallic: linear-gradient(135deg, #e3f2fd 0%, #90caf9 30%, #42a5f5 60%, #e3f2fd 100%);
    --card-watermark-bg: linear-gradient(180deg, rgba(59, 130, 246, 0.05) 0%, rgba(59, 130, 246, 0) 100%);
    --card-accent-glow: rgba(59, 130, 246, 0.5);
    --card-text-primary: #fff;
    --card-label-color: #93c5fd;
}

.membership-card.standard .gold-text-metallic,
.membership-card.standard .card-logo-text {
    background: linear-gradient(135deg, #bfdbfe 0%, #60a5fa 30%, #3b82f6 60%, #bfdbfe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* STANDARD theme badge - inherits from CSS variables */

.membership-card.standard .progress-ring-svg circle:last-child {
    stroke: #3b82f6 !important;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6)) !important;
}

.membership-card.standard .progress-label {
    color: #60a5fa;
}

/* Elite Shimmer / Border Glint Animation */
.membership-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    /* Exactly covers the border width */
    background: linear-gradient(135deg,
            transparent 0%,
            transparent 45%,
            var(--card-shimmer) 50%,
            transparent 55%,
            transparent 100%) 0% 0% / 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    z-index: 10;
    pointer-events: none;
    animation: border-glint 12s infinite linear;
}

/* Surface Glint Animation (Diagonal sweep across the whole card) */
.membership-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.03) 40%,
            rgba(255, 255, 255, 0.4) 50%,
            rgba(255, 255, 255, 0.03) 60%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    z-index: 5;
    pointer-events: none;
    animation: sweep 8s infinite ease-in-out;
}

/* Enhanced glint for the bright Lite card */
.membership-card.lite::after {
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.1) 40%,
            rgba(255, 255, 255, 0.6) 50%,
            rgba(255, 255, 255, 0.1) 60%,
            rgba(255, 255, 255, 0) 100%);
}

@keyframes sweep {
    0% {
        left: -150%;
    }

    20% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

@keyframes border-glint {
    0% {
        background-position: 100% 100%;
    }

    20% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 0% 0%;
    }
}

/* Luxury Watermark Branding */
.membership-card-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(3rem, 15vw, 6rem);
    font-weight: 900;
    background: var(--card-watermark-bg, linear-gradient(180deg, rgba(212, 175, 55, 0.05) 0%, rgba(212, 175, 55, 0) 100%));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: clamp(8px, 3vw, 20px);
    pointer-events: none;
    z-index: 0;
    white-space: nowrap;
    max-width: 90%;
    overflow: hidden;
}

.gold-text-metallic {
    background: linear-gradient(135deg, #fff9c4 0%, #f7ef8a 20%, #d4af37 50%, #b8860b 80%, #ffd700 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
    font-weight: 900;
}

.gold-logo-mask {
    display: inline-block;
    background: linear-gradient(135deg, #fff9c4 0%, #f7ef8a 20%, #d4af37 50%, #b8860b 80%, #ffd700 100%);
    -webkit-mask-image: url('logo.png');
    mask-image: url('logo.png');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.4));
}

/* SVG Logo with gold gradient */
.card-logo-svg {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}


/* Removing old shimmer because ::after is reused for ship */
@keyframes card-shimmer {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 0.9;
    }

    100% {
        opacity: 0.6;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.4));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 50px rgba(212, 175, 55, 0.6));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.4));
    }
}


.membership-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 2rem;
}

.membership-badge {
    position: absolute;
    top: 2rem;
    right: 3rem;
    font-weight: 800;
    font-size: 1rem;
    color: #d4af37;
    /* Gold color */
    text-transform: uppercase;
    letter-spacing: 4px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
}

.membership-status-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: clamp(0.5rem, 2vw, 2rem);
    align-items: end;
    width: 100%;
    /* Ensure left alignment matches header logo */
    padding-left: 0;
}

.status-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.status-main h2 {
    font-size: clamp(1.2rem, 3vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    color: #e5e7eb;
    font-family: 'OCR A Std', 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: clamp(1px, 0.5vw, 3px);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.card-label {
    font-size: clamp(0.4rem, 1.2vw, 0.65rem);
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    margin-bottom: 2px;
    letter-spacing: 1px;
}

.card-value {
    font-family: 'OCR A Std', monospace;
    font-size: clamp(0.7rem, 2vw, 1.2rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

/* Card dates container */
.card-dates {
    display: flex;
    gap: clamp(0.75rem, 3vw, 4rem);
    align-items: flex-end;
    margin-bottom: clamp(0.5rem, 2vw, 2.5rem);
}

/* Card member name */
.card-member-name {
    font-size: clamp(0.85rem, 2.5vw, 1.6rem);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Progress indicator wrapper */
.progress-indicator-wrapper {
    position: relative;
    width: clamp(90px, 25vw, 180px);
    height: clamp(90px, 25vw, 180px);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Progress ring background */
.progress-ring-bg {
    position: absolute;
    inset: 0;
    border: 1.5px solid rgba(212, 175, 55, 0.2);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
    background: rgba(0, 0, 0, 0.5);
}

/* Progress ring SVG */
.progress-ring-svg {
    width: clamp(80px, 22vw, 160px);
    height: clamp(80px, 22vw, 160px);
    transform: rotate(-90deg);
    z-index: 1;
}

/* Progress text container */
.progress-text {
    position: absolute;
    z-index: 2;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Progress label */
.progress-label {
    font-size: clamp(0.55rem, 1.5vw, 0.75rem);
    color: #fbbf24;
    font-weight: 800;
    display: block;
    margin-bottom: -0.1rem;
    letter-spacing: 1px;
}

/* Progress number */
.progress-number {
    color: #ffffff;
    font-weight: 900;
    font-size: clamp(1.5rem, 5vw, 3.2rem);
    line-height: 1;
    display: block;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* Progress unit */
.progress-unit {
    font-size: clamp(0.5rem, 1.5vw, 0.8rem);
    color: #ffffff;
    font-weight: 800;
    display: block;
    margin-top: -0.1rem;
}

/* Card header row */
.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
    width: 100%;
}

/* Card logo text */
.card-logo-text {
    font-family: 'OCR A Std', 'Courier New', monospace;
    letter-spacing: clamp(2px, 1vw, 6px);
    font-size: clamp(1rem, 3vw, 1.8rem);
    margin: 0;
    line-height: 1;
}

/* Plan badge responsive */
.plan-badge-responsive {
    position: static;
    border: 1.5px solid var(--card-border);
    color: var(--card-border);
    padding: clamp(0.25rem, 1vw, 0.5rem) clamp(0.5rem, 2vw, 1.4rem);
    border-radius: 4px;
    font-size: clamp(0.55rem, 2vw, 0.85rem);
    font-weight: 800;
    letter-spacing: clamp(1px, 0.5vw, 2px);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    text-shadow: 0 0 8px var(--card-accent-glow);
}

.status-desc {
    color: #94a3b8;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.6;
}

.status-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.progress-container {
    position: relative;
    width: 140px;
    height: 140px;
}

.progress-svg {
    transform: rotate(-90deg);
    width: 140px;
    height: 140px;
}

.progress-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 8;
}

.progress-bar {
    fill: none;
    stroke: url(#progress-gradient);
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.16, 1, 0.3, 1);
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.6));
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.days-left {
    display: block;
    font-size: 2rem;
    font-weight: 900;
}

.days-label {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 700;
}

.benefits-section h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.benefit-item {
    background: white;
    padding: 2.25rem 2rem;
    border-radius: 28px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    height: 100%;
    /* Ensure all items stretch to same height */
}

.benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: #6366f1;
}

.benefit-icon {
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    background: #f8fafc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefit-info h4 {
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 1.05rem;
    white-space: nowrap;
    letter-spacing: -0.5px;
}

.benefit-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.payment-security {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem;
    background: #f0fdf4;
    color: #166534;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 700;
}


/* ========================================
   Mobile Responsive Styles (480px and below)
   ======================================== */

@media (max-width: 480px) {

    /* Content padding adjustment */
    .content-inner {
        padding: 1rem 0.75rem !important;
    }

    /* Stats Grid - Single column on mobile */
    .grid-3 {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .stat-card {
        padding: 1.25rem !important;
    }

    .stat-value {
        font-size: 2rem !important;
    }

    .stat-label {
        font-size: 0.85rem !important;
    }

    /* Glass Card adjustments */
    .glass-card {
        padding: 1.25rem !important;
        border-radius: 16px !important;
        margin-bottom: 1.5rem !important;
    }

    .glass-card h2 {
        font-size: 1.25rem !important;
        margin-bottom: 1rem !important;
    }

    /* Table responsive styles - Convert to card layout on mobile */
    .category-content {
        overflow-x: visible !important;
        padding: 0 !important;
    }

    .category-content table {
        display: block;
        min-width: unset !important;
        width: 100% !important;
    }

    .category-content thead {
        display: none;
        /* Hide table header on mobile */
    }

    .category-content tbody {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    .category-content tr {
        display: flex;
        flex-direction: column;
        background: #ffffff !important;
        border-radius: 12px;
        padding: 1.5rem !important;
        border: 1px solid var(--border-color);
        gap: 0.5rem;
    }

    .category-content td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0 !important;
        white-space: normal !important;
        border: none !important;
    }

    /* Add labels before each cell */
    .category-content td:nth-child(1)::before {
        content: "制度名";
        font-weight: 600;
        color: #64748b;
        font-size: 0.75rem;
        display: inline-block;
        width: 6em;
        text-align: left;
    }

    .category-content td:nth-child(2)::before {
        content: "期限";
        font-weight: 600;
        color: #64748b;
        font-size: 0.75rem;
        display: inline-block;
        width: 6em;
        text-align: left;
    }

    .category-content td:nth-child(3)::before {
        content: "残日数";
        font-weight: 600;
        color: #64748b;
        font-size: 0.75rem;
        display: inline-block;
        width: 6em;
        text-align: left;
    }

    .category-content td:nth-child(4)::before {
        content: "通知";
        font-weight: 600;
        color: #64748b;
        font-size: 0.75rem;
        display: inline-block;
        width: 6em;
        text-align: left;
    }

    .category-content td:nth-child(5)::before {
        content: none !important;
        display: none !important;
    }

    .category-content td:last-child {
        justify-content: center !important;
        padding-top: 0.75rem !important;
    }

    /* Style the first cell (name) prominently */
    .category-content td:first-child {
        font-size: 0.95rem !important;
        font-weight: 700 !important;
        padding: 0.5rem 0 !important;
        border-bottom: 1px solid var(--border-color) !important;
        margin-bottom: 0.25rem;
    }

    /* Category accordion */
    .category-header {
        padding: 1rem !important;
        font-size: 0.9rem !important;
    }

    /* Edit button - Full width on mobile */
    .edit-btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 0.5rem !important;
        font-size: 0.95rem !important;
        margin-top: 0;
    }

    /* Edit Modal Responsive - Full screen on mobile */
    .modal-content.edit-modal-content {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        padding: 1rem !important;
        margin: 0 !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    .modal-content.edit-modal-content h2 {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
        padding-right: 2.5rem !important;
        flex-shrink: 0 !important;
    }

    .edit-modal-content .form-group-pro {
        margin-bottom: 0.5rem !important;
    }

    .edit-modal-content .label-pro-fixed {
        font-size: 0.85rem !important;
        margin-bottom: 0.25rem !important;
    }

    .email-template-editor {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: 0 !important;
    }

    .email-template-editor>.form-group-pro {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: 0 !important;
    }

    .template-body-editor {
        flex: 1 !important;
        display: flex !important;
        min-height: 0 !important;
    }

    .template-body-editor textarea {
        flex: 1 !important;
        height: auto !important;
        min-height: 100px !important;
        font-size: 0.9rem !important;
        padding: 0.75rem !important;
        resize: none !important;
    }

    .template-tabs {
        flex-wrap: nowrap !important;
        gap: 0 !important;
        margin-bottom: 0.5rem !important;
        flex-shrink: 0 !important;
    }

    .template-tab {
        padding: 0.4rem 0.5rem !important;
        font-size: 0.75rem !important;
    }

    /* Edit modal buttons */
    .edit-modal-btns {
        flex-shrink: 0 !important;
        gap: 0.5rem !important;
        margin-top: 0.5rem !important;
    }

    .edit-modal-btns button {
        flex: 1 !important;
        padding: 0.6rem 0.4rem !important;
        font-size: 0.75rem !important;
    }

    /* Notification tabs - Mobile */
    .notification-tabs {
        margin-bottom: 1rem !important;
    }

    .notification-tab {
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem !important;
    }

    /* Notification message textarea - Mobile */
    .edit-modal-content #edit-custom-message {
        height: calc(100vh - 320px) !important;
        min-height: 200px !important;
        font-size: 0.95rem !important;
    }

    /* Edit modal form group spacing */
    .edit-modal-content .form-group-pro p {
        font-size: 0.75rem !important;
    }

    /* Switch toggle - slightly smaller on mobile */
    .switch {
        width: 40px !important;
        height: 22px !important;
    }

    .slider:before {
        height: 16px !important;
        width: 16px !important;
    }

    input:checked+.slider:before {
        transform: translateX(18px) !important;
    }

    /* Pro plan card */
    .pro-plan-card {
        padding: 2rem 1.5rem !important;
        border-radius: 20px !important;
        max-width: 100% !important;
    }

    .pro-plan-card h3 {
        font-size: 1.75rem !important;
    }

    .pro-plan-card .price {
        font-size: 2.5rem !important;
    }

    /* Benefits grid - single column on mobile */
    .benefits-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .benefit-item {
        padding: 1.25rem !important;
        border-radius: 16px !important;
        gap: 1rem !important;
    }

    .benefit-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.25rem !important;
    }

    .benefit-info h4 {
        font-size: 1rem !important;
    }

    .benefit-info p {
        font-size: 0.85rem !important;
    }

    .benefits-section h3 {
        font-size: 1.1rem !important;
    }

    /* Subscription cards */
    .subscription-card,
    .payment-method-card {
        padding: 1.25rem !important;
    }

    /* Profile form */
    .profile-form {
        padding: 1.25rem !important;
    }

    .form-group label {
        font-size: 0.85rem !important;
    }

    .form-group input,
    .form-group select {
        padding: 0.75rem !important;
        font-size: 0.9rem !important;
    }

    /* Buttons */
    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.25rem !important;
        font-size: 0.9rem !important;
        width: 100%;
    }

    /* Team member card - stack vertically on mobile */
    .team-member-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }

    .team-member-item .badge {
        align-self: flex-start;
    }

    /* Modal styles for mobile */
    .modal-content {
        width: 95% !important;
        max-width: none !important;
        margin: 1rem !important;
        padding: 1.25rem !important;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-content h2 {
        font-size: 1.25rem !important;
        padding-right: 2.5rem !important;
        white-space: nowrap;
    }

    .modal-header h3 {
        font-size: 1.1rem !important;
    }

    /* Mobile header adjustments */
    .mobile-header {
        padding: 0 0.75rem !important;
    }

    .mobile-header .logo span {
        font-size: 1.3rem !important;
    }

    /* Deadline card adjustments */
    .deadline-card {
        padding: 1rem !important;
    }

    .deadline-card .deadline-title {
        font-size: 0.95rem !important;
    }

    .deadline-card .deadline-date {
        font-size: 0.85rem !important;
    }

    /* Badge adjustments */
    .badge {
        padding: 0.2rem 0.5rem !important;
        font-size: 0.7rem !important;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        background: #ffffff !important;
        background-color: #ffffff !important;
        opacity: 1 !important;
        visibility: visible !important;
        width: 280px !important;
        box-shadow: 4px 0 25px rgba(0, 0, 0, 0.1) !important;
        z-index: 10001 !important;
    }

    .sidebar.active {
        transform: translateX(0) !important;
    }

    .mobile-header {
        display: flex !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding-top: 60px !important;
        max-width: 100% !important;
    }

    /* Content padding */
    .content-inner {
        padding: 1.5rem 1rem !important;
    }

    /* Stats Grid - 2 columns on tablet */
    .grid-3 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }

    /* Glass card */
    .glass-card {
        padding: 1.5rem !important;
    }

    /* Pro plan card */
    .pro-plan-card {
        max-width: 100% !important;
        margin: 1.5rem auto !important;
    }
}

/* ========================================
   Small Mobile (320px - 375px)
   ======================================== */

@media (max-width: 375px) {
    .content-inner {
        padding: 0.75rem 0.5rem !important;
    }

    .glass-card {
        padding: 1rem !important;
    }

    .stat-card {
        padding: 1rem !important;
    }

    .stat-value {
        font-size: 1.75rem !important;
    }

    .mobile-header .logo span {
        font-size: 1.2rem !important;
    }

    .category-header {
        padding: 0.75rem !important;
    }

    .pro-plan-card {
        padding: 1.5rem 1rem !important;
    }

    .pro-plan-card h3 {
        font-size: 1.5rem !important;
    }

    .pro-plan-card .price {
        font-size: 2rem !important;
    }
}

/* ========================================
   Custom Team Member Management Styles
   ======================================== */

/* Base Styles (Desktop & Tablet) */
.team-member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    gap: 1rem;
}

.team-member-item:hover {
    border-color: #6366f1;
    background: #f8fafc;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.05);
}

.team-member-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.member-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 1rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.member-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    justify-content: center;
    min-width: 0;
}

.member-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.member-role {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.member-status-badge {
    font-size: 0.75rem;
    padding: 0.4rem 1rem;
    border-radius: 30px;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 700;
}

/* Plan Limit UI */
.plan-limit-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    padding: 0 0.25rem;
}

.plan-limit-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.plan-limit-progress {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.add-member-card {
    text-align: center;
    padding: 2rem;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    margin-top: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.add-member-card:hover {
    border-color: #6366f1;
    background: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.add-member-text {
    color: #475569;
    font-weight: 700;
    font-size: 1rem;
}

.limit-reached-card {
    text-align: center;
    padding: 2rem;
    background: #f1f5f9;
    border-radius: 16px;
    margin-top: 1rem;
    border: 1px solid #e2e8f0;
}

/* Responsive Overrides */
@media (max-width: 640px) {
    .team-member-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 1.25rem !important;
        gap: 1rem !important;
    }

    .team-member-info {
        width: 100% !important;
    }

    .member-status-badge {
        margin-left: 0 !important;
        align-self: flex-start !important;
    }

    .member-avatar {
        width: 40px !important;
        height: 40px !important;
    }

    .member-name {
        font-size: 0.95rem !important;
    }
}

/* ==========================================================================
   RESTORED PREMIUM CARD DESIGNS (Master Replica - 2026/02/05)
   ========================================================================== */

.membership-card {
    --card-bg: #0a0a0a;
    --card-border: #c5a059;
    /* Premium Deep Gold */
    --card-shimmer: rgba(197, 160, 89, 0.4);
    --card-text-primary: #ffffff;
    --card-label-color: rgba(255, 255, 255, 0.6);
    --card-watermark-bg: rgba(197, 160, 89, 0.05);
    /* Increased slightly for luxury presence */
    --card-accent-glow: rgba(197, 160, 89, 0.3);

    background: var(--card-bg) !important;
    border-radius: 20px;
    padding: 2.5rem;
    color: var(--card-text-primary);
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 3.5rem;
    border: 1px solid var(--card-border) !important;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: 'Inter', sans-serif;
    z-index: 1;
}

/* Standard Theme (Deep Sapphire - Master Color) */
.membership-card.standard {
    --card-bg: #004274;
    /* Mastery Blue */
    --card-border: #0ea5e9;
    --card-shimmer: rgba(14, 165, 233, 0.2);
    --card-text-primary: #ffffff;
    --card-label-color: rgba(255, 255, 255, 0.6);
    --card-watermark-bg: rgba(14, 165, 233, 0.04);
    --card-accent-glow: rgba(14, 165, 233, 0.2);
}

/* Lite Theme (Master Silver/Gray) */
.membership-card.lite {
    --card-bg: #e5e7eb;
    /* Authentic Silver-Gray */
    --card-border: #9ca3af;
    --card-shimmer: rgba(0, 0, 0, 0.05);
    --card-text-primary: #111827;
    --card-label-color: #4b5563;
    --card-watermark-bg: rgba(0, 0, 0, 0.04);
    --card-accent-glow: rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05) !important;
}

/* Logo Specific Handling */
.membership-card .gold-text-metallic {
    color: var(--card-border) !important;
    background: none !important;
    -webkit-text-fill-color: var(--card-border) !important;
    filter: drop-shadow(0 0 2px var(--card-accent-glow));
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    letter-spacing: 2px;
}

.membership-card.lite .gold-text-metallic {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
}

/* Badge Styling (Outline Style) */
.plan-badge-responsive {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    font-weight: 800;
    font-size: 0.75rem;
    color: var(--card-border) !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 1px solid var(--card-border) !important;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    background: transparent !important;
    z-index: 10;
}

.membership-card.lite .plan-badge-responsive {
    color: #4b5563 !important;
    border-color: #9ca3af !important;
}

/* Elite Shimmer / Border Glint Animation */
.membership-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg,
            transparent 0%,
            transparent 45%,
            var(--card-shimmer) 50%,
            transparent 55%,
            transparent 100%) 0% 0% / 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    z-index: 10;
    pointer-events: none;
    animation: border-glint 12s infinite linear;
}

@keyframes border-glint {
    0% {
        background-position: 100% 100%;
    }

    20% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 0% 0%;
    }
}

.membership-card-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11rem;
    /* Boldly expands across the card */
    font-weight: 900;
    color: var(--card-watermark-bg) !important;
    letter-spacing: 25px;
    pointer-events: none;
    z-index: 0;
    font-family: 'Inter', sans-serif;
    user-select: none;
    white-space: nowrap;
    opacity: 0.8;
    /* Subtle but clear presence */
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    z-index: 2;
}

.card-logo-text {
    font-size: 1.5rem !important;
    margin: 0 !important;
}

.membership-status-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    z-index: 2;
}

.card-label {
    text-transform: uppercase;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--card-label-color) !important;
    margin-bottom: 0.25rem;
}

.card-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--card-text-primary) !important;
    font-family: 'Inter', sans-serif;
}

.card-dates {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

/* Responsive Overrides for Cards */
@media (max-width: 768px) {
    .membership-card {
        padding: 1.5rem !important;
        min-height: 220px !important;
        margin-bottom: 2rem !important;
    }

    .membership-card-watermark {
        font-size: 5.5rem !important;
        /* Impactful size for mobile */
        letter-spacing: 12px !important;
        opacity: 0.1 !important;
    }

    .card-logo-text {
        font-size: 1.2rem !important;
    }

    .plan-badge-responsive {
        top: 1.2rem !important;
        right: 1.2rem !important;
        padding: 0.35rem 0.75rem !important;
        font-size: 0.65rem !important;
    }

    .card-value {
        font-size: 1.1rem !important;
    }

    .card-dates {
        gap: 1rem !important;
        margin-bottom: 1rem !important;
    }

    .card-dates .card-value {
        font-size: 0.8rem !important;
    }

    .progress-indicator-wrapper {
        transform: scale(0.6) !important;
        margin-right: -25px !important;
    }

    .membership-status-grid {
        flex-wrap: wrap !important;
        gap: 1rem !important;
        align-items: flex-start !important;
    }
}

@media (max-width: 480px) {
    .membership-card {
        padding: 1.25rem !important;
    }

    .card-logo-text {
        font-size: 1.1rem !important;
    }

    .plan-badge-responsive {
        padding: 0.25rem 0.5rem !important;
        letter-spacing: 1px !important;
    }
}