* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 0;
}

body.landing-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.landing-page .container {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
}

/* KickitAI Landing Page Styles - Blue Theme */
body.kickitai-landing {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", sans-serif;
}

.kickitai-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 95%;
    overflow: visible;
    margin: 20px;
}

.kickitai-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 24px 20px;
    position: relative;
    border-radius: 12px 12px 0 0;
}

.kickitai-header-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.kickitai-header-close:hover {
    opacity: 1;
}

.kickitai-header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.kickitai-logo {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    padding: 8px;
}

.kickitai-title {
    font-size: 28px;
    font-weight: 400;
    margin: 0;
}

.kickitai-subtitle {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
    font-weight: 300;
}

.kickitai-auth-section {
    padding: 30px;
}

/* KickitAI Authentication Method Styles */
.kickitai-auth-method {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.kickitai-auth-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 12px;
}

.kickitai-auth-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: white;
}

.google-icon {
    background: #db4437;
}

.email-icon {
    background: #007bff;
}

.whatsapp-icon {
    background: #667eea;
}

.kickitai-auth-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.kickitai-form-group {
    margin-bottom: 15px;
}

.kickitai-form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.kickitai-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.kickitai-input:focus {
    outline: none;
    border-color: #667eea;
}

.kickitai-phone-input {
    display: flex;
    gap: 10px;
}

.kickitai-country-select {
    padding: 12px;
    border: 2px solid #667eea;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    min-width: 120px;
}

.kickitai-phone-number {
    flex: 1;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    height: 48px; /* Match country selector button height */
}

/* Mobile responsive styles for phone input */
@media (max-width: 480px) {
    .kickitai-phone-input {
        display: block;
        gap: 0;
    }

    .kickitai-country-select {
        width: 100%;
        margin-bottom: 10px;
        min-width: auto;
    }

    .kickitai-phone-number {
        width: 100%;
    }
}

/* Tablet responsive styles */
@media (max-width: 768px) and (min-width: 481px) {
    .kickitai-phone-input {
        display: flex;
        gap: 8px;
    }

    .kickitai-country-select {
        min-width: 100px;
        flex-shrink: 0;
    }
}

.kickitai-phone-number:focus {
    outline: none;
    border-color: #667eea;
}

.kickitai-google-btn {
    width: 100%;
    padding: 12px;
    background: #db4437;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.kickitai-google-btn:hover {
    background: #c23321;
}

.kickitai-send-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.kickitai-send-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.kickitai-verify-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.kickitai-verify-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Force override KickitaiAuth library styles */
.kickitai-landing .kickitai-container * {
    box-sizing: border-box !important;
}

.kickitai-landing .kickitai-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    text-align: center !important;
    padding: 24px 20px !important;
    position: relative !important;
}

.kickitai-landing .kickitai-title {
    color: white !important;
    font-size: 28px !important;
    font-weight: 400 !important;
    margin: 0 !important;
}

.kickitai-landing .kickitai-subtitle {
    color: white !important;
    font-size: 16px !important;
    margin: 0 !important;
    opacity: 0.9 !important;
    font-weight: 300 !important;
}

.kickitai-landing .kickitai-header-close {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    font-size: 24px !important;
    font-weight: 300 !important;
    cursor: pointer !important;
    opacity: 0.8 !important;
    color: white !important;
    z-index: 1000 !important;
}

.kickitai-landing .kickitai-logo {
    width: 40px !important;
    height: 40px !important;
    background: white !important;
    border-radius: 50% !important;
    padding: 8px !important;
}

/* Additional mobile responsiveness */
@media (max-width: 480px) {
    .kickitai-container {
        max-width: 95%;
        width: 95%;
        margin: 10px;
        border-radius: 15px;
    }

    .kickitai-header {
        padding: 20px 15px !important;
    }

    .kickitai-auth-section {
        padding: 20px;
    }

    .kickitai-auth-method {
        padding: 15px;
        margin-bottom: 15px;
    }

    .kickitai-title {
        font-size: 24px !important;
    }
}

@media (max-width: 360px) {
    .kickitai-container {
        margin: 5px;
        border-radius: 12px;
    }

    .kickitai-header {
        padding: 15px 10px !important;
    }

    .kickitai-auth-section {
        padding: 15px;
    }

    .kickitai-title {
        font-size: 22px !important;
    }
}

/* Admin authenticated state - remove landing background */
body.admin-authenticated {
    background: #f0f2f5 !important;
}

body.admin-authenticated .kickitai-container {
    display: none !important;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header styles matching WhatsApp */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 24px;
    font-weight: 500;
    margin: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #90EE90;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.user-info {
    color: white;
    font-size: 14px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    height: 36px; /* Match logout button height */
}

.user-email {
    font-weight: 500;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-role {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 8px 12px;
    border-radius: 6px;
    margin-left: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

header .logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

header .logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Tabs matching WhatsApp style */
.tabs {
    display: flex;
    background: white;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tab {
    flex: 1;
    padding: 15px 20px;
    text-align: center;
    cursor: pointer;
    background: #f8f9fa;
    border: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    color: #333;
}

.tab:hover {
    background: #e9ecef;
}

.tab.active {
    background: #667eea;
    color: white;
}

.tab-content {
    background: white;
    padding: 10px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    min-height: 500px;
}

.auth-section h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
    font-weight: 600;
}

.auth-method {
    margin-bottom: 20px;
}

.auth-method h3 {
    margin-bottom: 15px;
    color: #555;
    font-size: 18px;
    font-weight: 500;
}

.google-btn {
    width: 100%;
    padding: 12px 20px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.3s;
}

.google-btn:hover {
    background: #3367d6;
}

.input-group {
    margin-bottom: 15px;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.phone-input {
    display: flex;
    gap: 10px;
}

.country-select {
    width: 200px;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.phone-number {
    flex: 1;
}

.send-btn, .verify-btn {
    width: 100%;
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.send-btn:hover, .verify-btn:hover {
    background: #5a6fd8;
}

.send-btn:disabled, .verify-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
}

.status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.user-info {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
}

.logout-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 50%, #dc3545 100%);
    background-size: 200% 200%;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
    animation: gradient-shift 3s ease infinite;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.admin-btn {
    display: inline-block;
    background: #667eea;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s;
}

.admin-btn:hover {
    background: #5a6fd8;
}

/* Admin Dashboard Styles */
.admin-dashboard {
    width: 100%;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e5e9;
}

.admin-header h2 {
    margin: 0;
    color: #333;
}

/* Dashboard Navigation Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e5e9;
}

.dashboard-header h2 {
    margin: 0;
    color: #333;
}

.dashboard-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo {
    height: 40px;
    width: auto;
}

.dashboard-nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-btn {
    display: inline-block;
    background: #6c757d;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: #5a6268;
}

.tab-container {
    width: 100%;
}

.tab-buttons {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e1e5e9;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #333;
    background: #f8f9fa;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f8f9fa;
}

.tab-content {
    margin-top: 20px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tab-panel h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
    font-weight: 500;
}

/* Card styles matching WhatsApp */
.settings-group, .cost-form, .projection-controls, .pricing-controls {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.settings-table, .costs-list {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Stats cards matching WhatsApp */
.stats {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex: 1;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 14px;
    color: #667781;
    margin-top: 5px;
}

.settings-list {
    margin-bottom: 20px;
}

.settings-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Full-screen loading overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-overlay.active {
    display: flex;
}

.loading-overlay-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f2f5;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.loading-overlay-subtext {
    font-size: 14px;
    color: #666;
}

/* Setting Item Styles */
.setting-item {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: box-shadow 0.3s;
}

.setting-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.setting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.setting-key {
    font-weight: 600;
    color: #333;
    font-family: 'Courier New', monospace;
    background: #e9ecef;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 13px;
}

.setting-type {
    font-size: 11px;
    color: #666;
    background: #dee2e6;
    padding: 2px 5px;
    border-radius: 2px;
}

.setting-description {
    color: #666;
    font-size: 13px;
    margin-bottom: 12px;
}

.setting-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.setting-input:focus {
    outline: none;
    border-color: #667eea;
}

.setting-input.modified {
    border-color: #ffc107;
    background: #fffbf0;
}

.setting-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 22px;
    background: #ccc;
    border-radius: 11px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch.active {
    background: #4CAF50;
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-switch.active .toggle-slider {
    transform: translateX(22px);
}

.toggle-label {
    font-size: 14px;
    color: #333;
}

.save-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.save-btn:hover {
    background: #45a049;
}

.reset-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.reset-btn:hover {
    background: #5a6268;
}

.divider {
    margin: 25px 0;
    text-align: center;
    position: relative;
    color: #666;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5e9;
    z-index: 1;
}

.divider span {
    background: white;
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

/* Costs Tab Styles */
.costs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.costs-header h3 {
    margin: 0;
    color: #444;
}

.add-cost-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.add-cost-btn:hover {
    background: #218838;
}

.cost-form {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.cost-form h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
}

.form-group input {
    padding: 10px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.cancel-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.cancel-btn:hover {
    background: #5a6268;
}

.costs-list {
    margin-bottom: 20px;
}

.cost-item {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: box-shadow 0.3s;
}

.cost-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cost-info {
    flex: 1;
}

.cost-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
    margin-bottom: 2px;
}

.cost-amount {
    font-size: 18px;
    font-weight: 700;
    color: #28a745;
}

.cost-actions {
    display: flex;
    gap: 8px;
}

.edit-cost-btn, .delete-cost-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.edit-cost-btn {
    background: #ffc107;
    color: #333;
}

.edit-cost-btn:hover {
    background: #e0a800;
}

.delete-cost-btn {
    background: #dc3545;
    color: white;
}

.delete-cost-btn:hover {
    background: #c82333;
}

.costs-total {
    margin-top: 20px;
    padding: 20px;
    background: #e8f5e8;
    border: 2px solid #28a745;
    border-radius: 8px;
    text-align: center;
}

.total-line {
    font-size: 20px;
    color: #333;
}

.total-line strong {
    color: #28a745;
}

/* Edit form for costs */
.edit-cost-form {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.edit-cost-form h5 {
    margin: 0 0 10px 0;
    color: #856404;
}

/* Projection Controls */
.projection-controls {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.control-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    align-items: end;
}

.control-group {
    display: flex;
    flex-direction: column;
}

.control-group label {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
}

.control-group input,
.control-group select {
    padding: 10px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.control-group input:focus,
.control-group select:focus {
    outline: none;
    border-color: #667eea;
}

/* Chart Container */
.chart-container {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    height: 400px;
    position: relative;
}

/* Charts Grid for Revenue Tab */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.charts-grid .chart-container {
    height: 350px;
}

.charts-grid .chart-container h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 10px;
}

/* Documentation Tab Styles */
.docs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.docs-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.docs-link {
    background: #007bff;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.docs-link:hover {
    background: #0056b3;
    text-decoration: none;
    color: white;
}

.docs-content {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
}

.docs-content iframe {
    display: block;
    width: 100%;
    min-height: 600px;
    border: none;
}

#projection-chart {
    width: 100% !important;
    height: 100% !important;
}

/* Scenario Summary */
.scenario-summary {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.scenario-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: box-shadow 0.3s;
}

.scenario-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.scenario-card h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.scenario-card p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.scenario-card span {
    font-weight: 600;
    color: #333;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-right {
        align-self: stretch;
        justify-content: space-between;
    }
    
    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .tab {
        min-width: 100px;
        flex-shrink: 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .cost-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cost-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .control-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .scenario-summary {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .chart-container {
        height: 300px;
        padding: 15px;
    }
    
    .stats {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 1024px) {
    .control-row {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .control-group:last-child {
        grid-column: 1 / -1;
    }
}

/* Pricing Tab Styles */
.pricing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e5e9;
}

.pricing-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
    font-weight: 500;
}

.add-product-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.add-product-btn:hover {
    background: #5a6fd8;
}

.product-form {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.product-form h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

.pricing-list {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.product-table {
    width: 100%;
    border-collapse: collapse;
}

.product-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-size: 14px;
}

.product-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
}

.product-table tr:hover {
    background: #f8f9fa;
}

.product-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

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

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

.product-actions {
    display: flex;
    gap: 5px;
}

.btn-test, .btn-edit, .btn-toggle, .btn-delete {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-test {
    background: #667eea;
    color: white;
}

.btn-test:hover {
    background: #5a6fd8;
}

.btn-edit {
    background: #ffc107;
    color: #333;
}

.btn-edit:hover {
    background: #e0a800;
}

.btn-toggle {
    background: #28a745;
    color: white;
}

.btn-toggle:hover {
    background: #218838;
}

.btn-toggle.inactive {
    background: #6c757d;
}

.btn-toggle.inactive:hover {
    background: #5a6268;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

.product-price {
    font-weight: 600;
    color: #667eea;
}

.product-category {
    display: inline-block;
    padding: 2px 6px;
    background: #e9ecef;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

/* Test Modal Styles */
.test-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.test-modal-content {
    background: white;
    margin: 50px auto;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 10px;
}

.test-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.test-result {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
}

.test-result pre {
    background: #ffffff;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    font-size: 12px;
    overflow-x: auto;
}

/* Revenue Tab Styles */
.revenue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e5e9;
}

.revenue-header h3 {
    margin: 0;
    color: #444;
}

.mrr-target {
    background: #28a745;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
}

.pricing-controls {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.control-section {
    margin-bottom: 20px;
}

.control-section:last-child {
    margin-bottom: 0;
}

.control-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.price-display {
    font-weight: 600;
    color: #28a745;
    font-size: 18px;
    margin-left: 10px;
}

.api-selector {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.api-selector label {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
}

.api-selector select {
    padding: 10px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.api-cost-display {
    background: #e8f5e8;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #28a745;
}

.api-cost-display span {
    color: #333;
    font-size: 14px;
}

.api-cost-display strong {
    color: #28a745;
    font-size: 16px;
}

/* Pricing Summary */
.pricing-summary {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.summary-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    transition: box-shadow 0.3s;
}

.summary-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.summary-card h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.price-breakdown p,
.usage-breakdown p,
.target-breakdown p {
    margin: 5px 0;
    font-size: 13px;
    color: #666;
    display: flex;
    justify-content: space-between;
}

.price-breakdown span,
.usage-breakdown span,
.target-breakdown span {
    font-weight: 600;
    color: #333;
}

/* Range Slider Styles */
input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e1e5e9;
    outline: none;
    margin: 10px 0;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #5a6fd8;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

/* Revenue chart specific styles */
#revenue-chart {
    width: 100% !important;
    height: 100% !important;
}

/* Responsive design for revenue */
@media (max-width: 1024px) {
    .pricing-summary {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .summary-card:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .revenue-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .pricing-summary {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .control-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Usage Tab Styles */
.usage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e5e9;
}

.usage-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
    font-weight: 500;
}

.billing-period label {
    font-weight: 500;
    color: #333;
    margin-right: 10px;
    font-size: 14px;
}

.billing-period select {
    padding: 8px 12px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.usage-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.usage-products-header h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

.usage-history {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.usage-history h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

.usage-product-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: box-shadow 0.3s;
}

.usage-product-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.usage-product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.usage-product-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.usage-product-cost {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}

.usage-product-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

.usage-product-stats div {
    text-align: center;
}

.usage-product-stats strong {
    color: #333;
    font-weight: 600;
}

.usage-history-table {
    width: 100%;
    border-collapse: collapse;
}

.usage-history-table th {
    background: #f8f9fa;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-size: 13px;
}

.usage-history-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e9ecef;
    font-size: 13px;
}

.usage-history-table tr:hover {
    background: #f8f9fa;
}

.usage-timestamp {
    color: #666;
    font-size: 12px;
}

.usage-endpoint {
    font-family: monospace;
    font-size: 12px;
    background: #e9ecef;
    padding: 2px 4px;
    border-radius: 3px;
}

.usage-cost-cell {
    font-weight: 600;
    color: #667eea;
}

/* History table layout */
.history-header,
.history-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 2fr 1fr;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.history-header {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    padding: 12px 0;
    margin-bottom: 5px;
    border-radius: 4px 4px 0 0;
}

.history-row {
    border-bottom: 1px solid #e9ecef;
}

.history-row:hover {
    background: #f8f9fa;
}

.history-col {
    padding: 0 10px;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.no-data {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

/* Usage controls layout */
.usage-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.clear-usage-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.clear-usage-btn:hover {
    background: linear-gradient(135deg, #ee5a5a, #dc4545);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 107, 107, 0.3);
}

.clear-usage-btn:active {
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .usage-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .clear-usage-btn {
        align-self: center;
        margin-top: 10px;
    }
}

.no-usage {
    text-align: center;
    padding: 40px;
    color: #666;
}

.no-usage h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.no-usage p {
    margin: 5px 0;
    font-size: 14px;
}

/* Mobile responsive for usage */
@media (max-width: 768px) {
    .usage-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .usage-product-stats {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: left;
    }
    
    .usage-history-table {
        font-size: 12px;
    }
    
    .usage-history-table th,
    .usage-history-table td {
        padding: 8px;
    }
}

/* =================================
   STRIPE MODULE STYLES (SEPARATE)
   ================================= */

.stripe-module {
    background: white;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    border: 2px solid #667eea;
    overflow: hidden;
}

.stripe-header {
    background: linear-gradient(135deg, #6f42c1 0%, #9d4edd 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stripe-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.stripe-header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stripe-mode-switch {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mode-label {
    font-size: 14px;
    font-weight: 500;
}

.mode-text {
    font-size: 14px;
    font-weight: 600;
    min-width: 40px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.switch-label:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .switch-label {
    background-color: #28a745;
}

input:checked + .switch-label:before {
    transform: translateX(26px);
}

.module-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.module-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.toggle-icon {
    transition: transform 0.2s;
}

.toggle-icon.rotated {
    transform: rotate(180deg);
}

.stripe-content {
    padding: 0;
}

.stripe-tabs {
    background: #f8f9ff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 20px;
    display: flex;
    gap: 5px;
}

.stripe-tab {
    background: transparent;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #6f42c1;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    font-weight: 500;
}

.stripe-tab:hover {
    background: rgba(111, 66, 193, 0.1);
    color: #5a2d91;
}

.stripe-tab.active {
    color: #6f42c1;
    border-bottom-color: #6f42c1;
    background: white;
}

.stripe-tab-content {
    padding: 20px;
}

.stripe-tab-panel {
    display: none;
}

.stripe-tab-panel.active {
    display: block;
}

/* Stripe Dashboard Styles */
.stripe-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.stripe-dashboard-header h3 {
    margin: 0;
    color: #333;
}

.stripe-mode-indicator .mode-badge {
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.stripe-mode-indicator .mode-badge.test {
    background: #ffc107;
    color: #333;
}

.stripe-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stripe-stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.1);
    border: 1px solid #f0f0f0;
    text-align: center;
}

.stripe-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #6f42c1;
    margin-bottom: 8px;
}

.stripe-stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.stripe-recent-activity {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.1);
    border: 1px solid #f0f0f0;
}

.stripe-recent-activity h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

/* Stripe Form Styles */
.stripe-settings-form {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.1);
    border: 1px solid #f0f0f0;
}

.stripe-form-group {
    margin-bottom: 20px;
}

.stripe-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.stripe-form-group input,
.stripe-form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.stripe-form-group input:focus,
.stripe-form-group select:focus {
    outline: none;
    border-color: #6f42c1;
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.1);
}

.stripe-form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

/* Stripe Buttons */
.stripe-add-btn, .stripe-save-btn, .stripe-test-btn {
    background: linear-gradient(135deg, #6f42c1 0%, #9d4edd 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-right: 10px;
}

.stripe-add-btn:hover, .stripe-save-btn:hover, .stripe-test-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.3);
}

.stripe-test-btn {
    background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
}

.stripe-status {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.stripe-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.stripe-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Headers for sub-tabs */
.stripe-customers-header,
.stripe-subscriptions-header,
.stripe-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.stripe-customers-actions,
.stripe-subscriptions-actions {
    display: flex;
    gap: 10px;
}

.stripe-delete-all-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.stripe-delete-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.stripe-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.stripe-settings-form h4 {
    color: #333;
    margin: 20px 0 15px 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stripe-customers-header h3,
.stripe-subscriptions-header h3,
.stripe-settings-header h3 {
    margin: 0;
    color: #333;
}

.stripe-settings-actions {
    display: flex;
    gap: 10px;
}

/* Loading states */
.stripe-content .loading {
    text-align: center;
    padding: 40px;
    color: #6f42c1;
    font-size: 16px;
}

/* Transaction List Styles */
.stripe-transaction-list {
    max-height: 400px;
    overflow-y: auto;
}

.stripe-transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.stripe-transaction-item:hover {
    background-color: #f8f9ff;
}

.transaction-details .transaction-description {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.transaction-details .transaction-date {
    font-size: 12px;
    color: #666;
}

.transaction-amount {
    font-weight: 600;
    color: #6f42c1;
    font-size: 14px;
}

/* Customer Grid Styles */
.stripe-customers-grid,
.stripe-subscriptions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stripe-customer-card,
.stripe-subscription-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.1);
    transition: transform 0.2s;
}

.stripe-customer-card:hover,
.stripe-subscription-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(111, 66, 193, 0.15);
}

.customer-info,
.subscription-info {
    margin-bottom: 15px;
}

.customer-name,
.subscription-id {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.customer-email,
.subscription-created {
    font-size: 14px;
    color: #666;
    margin-bottom: 3px;
}

.customer-created {
    font-size: 12px;
    color: #999;
}

.subscription-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin: 5px 0;
    display: inline-block;
}

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

.subscription-status.status-canceled {
    background: #f8d7da;
    color: #721c24;
}

.subscription-status.status-past_due {
    background: #fff3cd;
    color: #856404;
}

.customer-actions,
.subscription-actions {
    display: flex;
    gap: 8px;
}

.stripe-btn-small {
    background: #6f42c1;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.stripe-btn-small:hover {
    background: #5a2d91;
}

/* Stripe Error Styling */
.stripe-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
    font-weight: 500;
}

/* Webhook Tab Styles */
.stripe-webhooks-header {
    margin-bottom: 15px;
}

.stripe-webhooks-header h3 {
    margin: 0 0 10px 0;
}

.webhook-endpoint-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9ff;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.webhook-url {
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    border: 1px solid #ddd;
}

.copy-webhook-btn {
    background: #6f42c1;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.copy-webhook-btn:hover {
    background: #5a2d91;
}

.stripe-webhooks-subheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.stripe-webhooks-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.webhook-filters {
    display: flex;
    align-items: center;
    gap: 10px;
}

#webhook-event-type-filter {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.webhook-mode-indicator {
    font-size: 14px;
    color: #666;
}

.webhook-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.webhook-stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.1);
    border: 1px solid #f0f0f0;
    text-align: center;
}

.webhook-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #6f42c1;
    margin-bottom: 8px;
}

.webhook-stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.webhook-events-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.1);
}

.webhook-events-table th {
    background: #f8f9ff;
    color: #6f42c1;
    font-weight: 600;
    padding: 12px;
    text-align: left;
    font-size: 14px;
}

.webhook-events-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.webhook-events-table tr:hover {
    background: #f8f9ff;
}

.webhook-event-type {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #333;
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
}

.webhook-event-id {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #666;
}

.webhook-mode-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.webhook-mode-badge.test {
    background: #ffc107;
    color: #333;
}

.webhook-mode-badge.live {
    background: #28a745;
    color: white;
}

/* Webhook Status Badges */
.webhook-status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.webhook-status-badge.status-processed {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.webhook-status-badge.status-failed {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.webhook-status-badge.status-processing {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.webhook-status-badge.status-duplicate {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.webhook-status-badge.status-no-status {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.webhook-detail-btn {
    background: #6f42c1;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.webhook-detail-btn:hover {
    background: #5a2d91;
}

.webhook-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding: 20px 0;
}

.webhook-pagination button {
    background: #6f42c1;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.webhook-pagination button:hover:not(:disabled) {
    background: #5a2d91;
}

.webhook-pagination button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#webhook-page-info {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.no-events {
    text-align: center;
    padding: 40px;
    color: #666;
}

.no-events h4 {
    margin: 0 0 10px 0;
    color: #333;
}

/* Webhook Modal Styles */
.webhook-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.webhook-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.webhook-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9ff;
    border-bottom: 2px solid #e0e0e0;
}

.webhook-modal-header h3 {
    margin: 0;
    color: #6f42c1;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-modal:hover {
    background: #f0f0f0;
}

#webhook-detail-content {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

.webhook-detail-section {
    margin-bottom: 20px;
}

.webhook-detail-section h4 {
    margin: 0 0 10px 0;
    color: #6f42c1;
    font-size: 16px;
}

.webhook-detail-data {
    background: #f8f9ff;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.webhook-detail-data.execution-log {
    background: #f8f9fa;
    border-left: 4px solid #6f42c1;
    font-family: 'Courier New', monospace;
    white-space: pre-line;
    line-height: 1.6;
}
    white-space: pre-wrap;
    word-break: break-all;
}

/* Transactions Tab Styles */
.stripe-transactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.transaction-subtabs {
    display: flex;
    gap: 5px;
    background: #f8f9ff;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.transaction-subtab {
    background: transparent;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    color: #6f42c1;
    border-radius: 6px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
}

.transaction-subtab:hover {
    background: rgba(111, 66, 193, 0.1);
}

.transaction-subtab.active {
    background: #6f42c1;
    color: white;
}

.transactions-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.1);
}

.transactions-table th {
    background: #f8f9ff;
    color: #6f42c1;
    font-weight: 600;
    padding: 12px;
    text-align: left;
    font-size: 14px;
}

.transactions-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.transactions-table tr:hover {
    background: #f8f9ff;
}

.transaction-amount {
    font-weight: 600;
    color: #333;
}

.transaction-amount.positive {
    color: #28a745;
}

.transaction-amount.negative {
    color: #dc3545;
}

.transaction-type {
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.transaction-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding: 20px 0;
}

.transaction-pagination button {
    background: #6f42c1;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.transaction-pagination button:hover:not(:disabled) {
    background: #5a2d91;
}

.transaction-pagination button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #666;
}

.no-data h4 {
    margin: 0 0 10px 0;
    color: #333;
}

/* Mobile responsive for Stripe module */
@media (max-width: 768px) {
    .stripe-header {
        padding: 15px;
    }
    
    .stripe-header h2 {
        font-size: 18px;
    }
    
    .stripe-tabs {
        padding: 0 15px;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .stripe-tab {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .stripe-tab-content {
        padding: 15px;
    }
    
    .stripe-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stripe-customers-header,
    .stripe-subscriptions-header,
    .stripe-settings-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .stripe-settings-actions {
        width: 100%;
        justify-content: flex-start;
    }
}
/* Subscription Interface Styles */
.tab-navigation {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 10px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.subscription-status-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: #f8fafc;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.status-widget {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.status-active {
    background-color: #10b981;
    animation: pulse 2s infinite;
}

.status-indicator.status-canceled {
    background-color: #f59e0b;
}

.status-indicator.status-inactive {
    background-color: #ef4444;
}

/* Subscription Plans Grid */
.subscription-plans-container {
    margin-bottom: 40px;
}

/* Billing Period Tabs */
.billing-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 4px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.billing-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    font-size: 14px;
}

.billing-tab.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.billing-tab:hover:not(.active) {
    color: #374151;
}

.savings-badge {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: #059669;
    margin-top: 2px;
}

.billing-tab.active .savings-badge {
    color: #059669;
}

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

.subscription-plan-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.subscription-plan-card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.subscription-plan-card.featured {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    transform: scale(1.02);
}

.featured-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.plan-header h4 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1f2937;
}

.plan-pricing {
    margin-bottom: 20px;
}

.price-display {
    text-align: center;
    margin-bottom: 20px;
}

.monthly-price,
.annual-price {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 8px;
}

.annual-savings {
    font-size: 14px;
    color: #059669;
    font-weight: 600;
    margin-top: 8px;
}

.price {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
}

.period {
    font-size: 16px;
    color: #6b7280;
}

.savings {
    background: #dcfce7;
    color: #166534;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

.plan-allowance {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: center;
    color: #0c4a6e;
}

.plan-features ul {
    list-style: none;
    padding: 0;
    margin-bottom: 25px;
}

.plan-features li {
    padding: 8px 0;
    color: #4b5563;
    font-size: 15px;
    display: flex;
    align-items: center;
}

.plan-features li::before {
    content: '✓';
    color: #10b981;
    font-weight: bold;
    margin-right: 12px;
    font-size: 16px;
}

.plan-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plan-select-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.plan-select-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    margin-bottom: 10px;
}

.plan-select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.plan-select-btn.annual-btn {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.plan-select-btn.annual-btn:hover {
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.3);
}

.trial-info {
    text-align: center;
    font-size: 14px;
    color: #059669;
    font-weight: 500;
    margin-top: 8px;
}

/* Active Subscription Styles */
.active-subscription-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.current-plan-info {
    margin-bottom: 25px;
}

.plan-name-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.plan-name-section h4 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.plan-status {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.plan-status.status-active {
    background: #dcfce7;
    color: #166534;
}

.plan-status.status-canceled {
    background: #fef3c7;
    color: #92400e;
}

.plan-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.plan-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.detail-label {
    font-weight: 500;
    color: #6b7280;
}

.detail-value {
    font-weight: 600;
    color: #1f2937;
}

.subscription-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.subscription-action-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upgrade-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.manage-btn {
    background: #f1f5f9;
    color: #374151;
    border: 1px solid #d1d5db;
}

.manage-btn:hover {
    background: #e2e8f0;
}

.cancel-btn {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.cancel-btn:hover {
    background: #fee2e2;
}

/* Usage Allowance Styles */
.usage-allowance-section,
.usage-allowance-header {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.allowance-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.allowance-card {
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.allowance-value {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.allowance-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.allowance-progress-bar {
    position: relative;
    height: 20px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.allowance-progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
}

.allowance-progress-fill.normal {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.allowance-progress-fill.warning {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.allowance-progress-fill.over-limit {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.allowance-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    z-index: 2;
}

/* Compact allowance display for subscription tab */
.allowance-summary-compact {
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.allowance-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.allowance-used {
    font-weight: 600;
    color: #374151;
}

.allowance-total {
    font-weight: 600;
    color: #6b7280;
}

.allowance-remaining {
    font-size: 14px;
    color: #059669;
    font-weight: 500;
}

.allowance-progress-bar-compact {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.allowance-percentage {
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* Usage Tab Enhanced Styles */
.usage-title-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.usage-subscription-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 20px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 25px;
}

.modal-header h4 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.modal-close {
    font-size: 28px;
    color: #9ca3af;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.modal-close:hover {
    color: #374151;
}

/* Upgrade Modal Styles */
.upgrade-plan-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 15px;
}

.upgrade-plan-info h5 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.upgrade-pricing {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 8px;
}

.upgrade-pricing .price {
    font-size: 20px;
    font-weight: 600;
    color: #667eea;
}

.upgrade-pricing .allowance {
    font-size: 14px;
    color: #6b7280;
}

.upgrade-features {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.upgrade-features .feature {
    font-size: 12px;
    color: #059669;
    padding: 4px 8px;
    background: #f0fdf4;
    border-radius: 12px;
}

.upgrade-select-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.upgrade-select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* Success Message Styles */
.success-message {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.success-message::before {
    content: '✓';
    font-weight: bold;
    color: #059669;
}

/* Responsive Design */
@media (max-width: 768px) {
    .subscription-plans-container {
        padding: 0 10px;
    }
    
    .subscription-plan-card {
        padding: 20px;
    }
    
    .plan-actions {
        flex-direction: column;
    }
    
    .subscription-actions {
        flex-direction: column;
    }
    
    .allowance-summary {
        grid-template-columns: 1fr;
    }
    
    .plan-details-grid {
        grid-template-columns: 1fr;
    }
    
    .allowance-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .upgrade-plan-option {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
}

/* Customer Portal Status Styles */
.portal-status {
    display: none;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 10px 0;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    animation: slideInDown 0.3s ease-out;
}

.portal-status.info {
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.portal-status.success {
    background-color: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.portal-status.warning {
    background-color: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffcc02;
}

/* Portal Access Indicator */
.portal-access-indicator {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    color: white;
}

.portal-status-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
}

.portal-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.portal-text {
    font-weight: 600;
    font-size: 16px;
}

.portal-features {
    font-size: 13px;
    opacity: 0.9;
    font-weight: 400;
}

/* Animation for portal status */
@keyframes slideInDown {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Billing Button in Header */
.billing-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-right: 10px;
}

.billing-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Compact Plan Info */
.current-plan-summary {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.compact-plan-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.plan-summary {
    display: flex;
    align-items: center;
    gap: 12px;
}

.plan-name {
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
}

.plan-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.plan-status.status-active {
    background-color: #c6f6d5;
    color: #22543d;
}

.plan-status.status-trialing {
    background-color: #bee3f8;
    color: #2a4365;
}

.plan-status.status-activating {
    background-color: #fef5e7;
    color: #c05621;
}

.plan-status.status-trial_active {
    background-color: #e6fffa;
    color: #234e52;
}

.plan-details {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #4a5568;
}

.plan-detail {
    white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .compact-plan-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .plan-details {
        flex-direction: column;
        gap: 8px;
    }
    
    .billing-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Success Page Styles */
.success-header {
    text-align: center;
    margin-bottom: 40px;
}

.success-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.success-header h2 {
    color: #2d3748;
    font-size: 32px;
    margin-bottom: 12px;
}

.success-message {
    font-size: 18px;
    color: #4a5568;
    margin-bottom: 0;
}

.polling-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.polling-status {
    text-align: center;
}

.polling-status.success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border-radius: 8px;
    padding: 20px;
}

.polling-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.polling-message {
    font-size: 18px;
    color: #4a5568;
    margin-bottom: 20px;
    line-height: 1.5;
}

.polling-status.success .polling-message {
    color: white;
}

.polling-progress {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.polling-timer {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.manual-check-section {
    text-align: center;
    margin-top: 20px;
}

.timeout-message {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 16px;
}

.manual-check-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.manual-check-btn:hover {
    transform: translateY(-2px);
}

.manual-check-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.success-details {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    margin: 30px 0;
    border-left: 4px solid #667eea;
}

.detail-item strong {
    display: block;
    color: #2d3748;
    font-size: 18px;
    margin-bottom: 12px;
}

.detail-item ul {
    list-style: none;
    padding: 0;
}

.detail-item li {
    padding: 8px 0;
    font-size: 16px;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navigation-options {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 40px;
}

.nav-btn {
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
}

.nav-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.nav-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.nav-btn.secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.nav-btn.secondary:hover {
    background: #edf2f7;
    transform: translateY(-2px);
}

/* Responsive adjustments for success page */
@media (max-width: 768px) {
    .success-header h2 {
        font-size: 24px;
    }
    
    .success-icon {
        font-size: 60px;
    }
    
    .polling-section {
        padding: 20px;
        margin: 20px 0;
    }
    
    .navigation-options {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

/* Auth Error Message */
.auth-error-message {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease-out;
}

.auth-error-message .error-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c33;
}

.auth-error-message .error-icon {
    font-size: 20px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Product Modal Styles */
.product-modal-content {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

.product-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

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

.detail-row label {
    font-weight: 600;
    color: #6f42c1;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-row .detail-value {
    font-size: 15px;
    color: #333;
    line-height: 1.5;
}

.detail-row .detail-value code {
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #6f42c1;
}

.prices-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-item {
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 3px solid #6f42c1;
}

/* Product Edit Form Styles */
#product-edit-form .form-group {
    margin-bottom: 20px;
}

#product-edit-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

#product-edit-form input[type="text"],
#product-edit-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

#product-edit-form input[type="text"]:focus,
#product-edit-form textarea:focus {
    outline: none;
    border-color: #6f42c1;
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.1);
}

#product-edit-form input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.form-actions .cancel-btn {
    padding: 10px 20px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.form-actions .cancel-btn:hover {
    background: #e8e8e8;
}

.form-actions .save-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.form-actions .save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.3);
}

.form-actions .save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

EOF < /dev/null

/* Package Selection Styles */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.package-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}

.package-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.package-logo {
    font-size: 48px;
    flex-shrink: 0;
}

.package-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
}

.package-content {
    flex: 1;
}

.package-content h4 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: #333;
}

.package-content p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.package-badge {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.package-arrow {
    font-size: 24px;
    color: #667eea;
    flex-shrink: 0;
}

.back-btn {
    background: transparent;
    border: 1px solid #667eea;
    color: #667eea;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    margin-bottom: 16px;
}

.back-btn:hover {
    background: #667eea;
    color: white;
}

/* Admin Packages Styles */
.packages-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.packages-header h3 {
    margin: 0;
}

.action-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    transition: transform 0.2s;
}

.action-btn:hover {
    transform: scale(1.2);
}

.action-btn.danger:hover {
    filter: brightness(0.8);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

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

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

/* Plans Management Styles */
.plans-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.plans-header h3 {
    margin: 0;
}

.domain-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #e3f2fd;
    color: #1565c0;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid #667eea;
    background: #667eea;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    background: #5568d3;
}

.btn-small.danger {
    border-color: #dc3545;
    background: #dc3545;
}

.btn-small.danger:hover {
    background: #c82333;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    background: #667eea;
    color: white;
    border-radius: 4px;
    font-size: 12px;
}

/* ===== Country Selector Styles ===== */

.country-selector {
    position: relative;
    width: 150px;
}

.country-selector-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: 48px; /* Match phone input height */
    box-sizing: border-box;
}

.country-selector-btn:hover {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.country-selector-btn .dropdown-arrow {
    margin-left: auto;
    font-size: 10px;
    color: #666;
    transition: transform 0.2s;
}

#selected-country-flag {
    font-size: 20px;
}

#selected-country-code {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Country Dropdown - Desktop */
.country-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 320px;
    max-height: 400px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

#country-search {
    width: calc(100% - 24px);
    padding: 12px;
    margin: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#country-search:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.country-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 4px;
}

.country-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.country-item:hover {
    background: #f5f7ff;
}

.country-item:active {
    background: #e8ecff;
}

.country-flag {
    font-size: 20px;
    min-width: 24px;
}

.country-name {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.country-dial-code {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* Mobile responsive - Standard Dropdown (matches WhatsApp) */
@media (max-width: 768px) {
    .country-dropdown {
        max-width: 90vw;
    }

    #country-search {
        font-size: 16px; /* Prevent iOS zoom */
    }
}

/* Adjust phone input container for country selector */
.kickitai-phone-input {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.kickitai-phone-number {
    flex: 1;
    min-width: 0;
}

/* Mobile: Stack country selector and phone input vertically */
@media (max-width: 768px) {
    .kickitai-phone-input {
        flex-direction: column;
        gap: 12px;
    }

    .country-selector {
        width: 100%;
    }

    .country-selector-btn {
        width: 100%;
        justify-content: space-between;
    }

    .kickitai-phone-number {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Hide old country select dropdown if present */
.kickitai-country-select {
    display: none;
}

/* ========================================
   Service Costs Management UI Styles
   ======================================== */

.service-costs-header {
    margin-bottom: 30px;
}

.service-costs-header h3 {
    margin-bottom: 10px;
}

.section-description {
    color: #666;
    font-size: 14px;
    margin-top: 8px;
}

.service-cost-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.service-cost-card.calculator {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.service-cost-card.calculator h4,
.service-cost-card.calculator label {
    color: white;
}

.service-cost-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.service-cost-header h4 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.edit-cost-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.edit-cost-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.service-cost-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.cost-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 5px;
}

.cost-detail-item label {
    font-weight: 500;
    color: #555;
}

.cost-value {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #667eea;
    font-size: 16px;
}

.calculator-form {
    margin-top: 20px;
}

.calculator-section {
    margin-bottom: 20px;
}

.calculator-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-group input {
    flex: 1;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.input-group span {
    font-weight: bold;
    font-size: 18px;
}

.calculator-section input {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.calculate-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.calculator-result {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.calculator-result h5 {
    margin: 0 0 15px 0;
    font-size: 18px;
}

.result-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    font-size: 14px;
}

.result-item.total {
    font-size: 18px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* ========================================
   Usage Monitoring Dashboard UI Styles
   ======================================== */

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

.usage-monitor-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.usage-monitor-actions select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background: white;
}

.usage-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.usage-stat-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.usage-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.usage-stat-card.warning {
    border-color: #ff9800;
    background: linear-gradient(135deg, #fff3e0 0%, #ffffff 100%);
}

.usage-stat-card.error {
    border-color: #f44336;
    background: linear-gradient(135deg, #ffebee 0%, #ffffff 100%);
}

.usage-stat-icon {
    font-size: 32px;
    width: 50px;
    text-align: center;
}

.usage-stat-content {
    flex: 1;
}

.usage-stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    line-height: 1.2;
}

.usage-stat-label {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

.usage-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.usage-section h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.usage-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.usage-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.usage-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.usage-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.usage-table tbody tr:hover {
    background: #f8f9fa;
}

.usage-table .usage-exceeded {
    color: #f44336;
    font-weight: bold;
}

.action-btn-small {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.action-btn-small:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #999;
}

.no-data p {
    margin: 10px 0;
}

/* Chart container */
#usage-breakdown-chart {
    max-width: 500px;
    margin: 20px auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .usage-stats {
        grid-template-columns: 1fr;
    }

    .usage-monitor-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .usage-monitor-actions {
        width: 100%;
        flex-direction: column;
    }

    .usage-monitor-actions select,
    .usage-monitor-actions button {
        width: 100%;
    }

    .usage-table {
        font-size: 12px;
    }

    .usage-table th,
    .usage-table td {
        padding: 8px;
    }
}

/* AI Models Section */
.ai-models-section {
    margin-bottom: 30px;
}

.ai-models-section h3 {
    margin: 20px 0 15px 0;
    color: #333;
    font-size: 20px;
}

.model-id {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    color: #555;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.service-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.cost-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cost-details p {
    margin: 5px 0;
    font-size: 14px;
    color: #555;
}

.cost-details strong {
    color: #333;
    margin-right: 8px;
}

.edit-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.edit-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* User Dashboard - Stripe Button */
.stripe-btn {
    background: #635BFF;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.stripe-btn:hover {
    background: #0A2540;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 91, 255, 0.3);
}

/* Usage Dashboard */
.usage-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.usage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.usage-header h3 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.subscription-info {
    display: flex;
    gap: 10px;
}

.tier-badge {
    background: #667eea;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.status-badge {
    background: #10b981;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-transform: capitalize;
}

/* Usage Stats Grid */
.usage-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.usage-stat-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.usage-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 32px;
    line-height: 1;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

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

/* Usage Progress Section */
.usage-progress-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar {
    height: 100%;
    transition: width 0.5s ease, background-color 0.3s ease;
    border-radius: 15px;
}

.progress-bar.success {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

.progress-bar.warning {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.progress-bar.danger {
    background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

.progress-text {
    text-align: center;
    font-size: 16px;
    color: #555;
    margin: 0;
}

/* Usage Breakdown Section */
.usage-breakdown-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.usage-breakdown-section h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
}

.service-usage-item {
    display: grid;
    grid-template-columns: 200px 100px 1fr 80px;
    gap: 15px;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.service-usage-item:last-child {
    border-bottom: none;
}

.service-name {
    font-weight: 500;
    font-size: 16px;
    color: #333;
}

.service-amount {
    font-weight: bold;
    font-size: 16px;
    color: #667eea;
}

.service-bar-container {
    width: 100%;
    height: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
}

.service-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.service-percentage {
    text-align: right;
    font-size: 14px;
    color: #666;
}

/* Billing Period Section */
.billing-period-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.billing-period-section h4 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
}

.period-info p {
    margin: 10px 0;
    font-size: 15px;
    color: #555;
}

.period-info strong {
    color: #333;
    margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .usage-stats-grid {
        grid-template-columns: 1fr;
    }

    .usage-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .service-usage-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .service-bar-container {
        order: 3;
    }

    .service-percentage {
        text-align: left;
        order: 4;
    }
}

/* Usage Percentage Card Styles */
.usage-percentage-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 25px;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin-bottom: 20px;
}

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

.usage-percentage-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.usage-percentage-text {
    font-size: 32px;
    font-weight: bold;
    color: white;
}

.usage-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 20px;
}

.usage-stat-item {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.usage-stat-item strong {
    color: white;
    margin-right: 5px;
}

.progress-bar-container {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399, #10b981, #34d399);
    background-size: 200% 100%;
    border-radius: 12px;
    transition: width 0.8s ease;
    animation: progressShine 2s linear infinite;
    position: relative;
    min-width: 2px;
}

@keyframes progressShine {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 0%;
    }
}

.progress-bar-text {
    color: white;
    font-weight: bold;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments for usage percentage card */
@media (max-width: 768px) {
    .usage-percentage-card {
        padding: 20px;
    }

    .usage-percentage-text {
        font-size: 16px;
    }

    .usage-stats {
        flex-direction: column;
        gap: 15px;
        height: auto !important;
    }

    .usage-stat-item {
        order: 2;
    }

    .progress-bar-container {
        order: 1;
        height: 40px !important;
        min-height: 40px;
    }
}

/* ========================================
   Mobile Responsive Table & Countdown Timer
   Updated: October 30, 2025
   ======================================== */

/* Mobile responsive table wrapper */
.usage-list-section {
    width: 100%;
}

/* Hide table on mobile, show cards */
@media (max-width: 768px) {
    .usage-table {
        display: none;
    }

    .usage-cards-container {
        display: block !important;
    }
}

/* Show table on desktop, hide cards */
@media (min-width: 769px) {
    .usage-table {
        display: table;
    }

    .usage-cards-container {
        display: none !important;
    }
}

/* Usage Cards Layout for Mobile */
.usage-cards-container {
    display: none;
    width: 100%;
}

.usage-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #404040;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.usage-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.usage-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #404040;
}

.usage-card-service {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.usage-card-units {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 6px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
    letter-spacing: 0.3px;
}

.usage-card-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.usage-card-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.usage-card-label {
    color: #b0b0b0;
    font-weight: 500;
}

.usage-card-value {
    color: #e0e0e0;
    font-weight: 600;
}

.usage-card-timestamp {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.usage-card-date {
    font-size: 13px;
    color: #e0e0e0;
    font-weight: 600;
}

.usage-card-relative {
    font-size: 11px;
    color: #667eea;
    font-style: italic;
}

/* Countdown Timer Styles */
.countdown-timer-container {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    overflow: hidden;
    max-width: 100%;
}

.countdown-timer-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    font-weight: 600;
    text-align: center;
}

.countdown-timer {
    display: flex;
    justify-content: space-around;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 100%;
}

.countdown-unit {
    text-align: center;
    flex: 1 1 auto;
    min-width: 60px;
    max-width: 80px;
}

.countdown-value {
    font-size: 18px;
    font-weight: 700;
    color: white;
    display: block;
    margin-bottom: 3px;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 50%, #ffffff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
    line-height: 1;
    word-break: break-all;
}

.countdown-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Mobile responsive countdown */
@media (max-width: 768px) {
    .countdown-timer-container {
        padding: 12px;
    }

    .countdown-value {
        font-size: 18px;
    }

    .countdown-label {
        font-size: 8px;
    }

    .countdown-timer {
        gap: 5px;
    }
}

/* Current Plan Card - Enhanced for countdown integration */
.current-plan-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #404040;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    position: relative;
}

/* ========================================
   Dashboard Tabs Navigation
   Updated: October 30, 2025
   ======================================== */

.dashboard-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid #404040;
    background: transparent;
}

.dashboard-tab {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #b0b0b0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-align: center;
}

.dashboard-tab:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.dashboard-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.dashboard-tab:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard-tab.active:before {
    opacity: 1;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsive tabs */
@media (max-width: 768px) {
    .dashboard-tabs {
        gap: 0;
    }

    .dashboard-tab {
        padding: 12px 15px;
        font-size: 14px;
    }
}

/* Fix dashboard header button alignment */
.dashboard-nav .stripe-btn,
.dashboard-nav .logout-btn,
.dashboard-nav .nav-btn {
    margin: 0;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.dashboard-nav .stripe-btn {
    background: #635BFF;
    color: white;
}

.dashboard-nav .stripe-btn:hover {
    background: #0A2540;
}

.dashboard-nav .logout-btn {
    background: #dc3545;
    color: white;
}

.dashboard-nav .logout-btn:hover {
    background: #c82333;
}

.dashboard-nav .nav-btn {
    background: #6c757d;
    color: white;
}

.dashboard-nav .nav-btn:hover {
    background: #5a6268;
}

/* ========================================
   New Plan Card Styles (Kaissa.ai Format)
   Updated: October 24, 2025
   ======================================== */

/* Featured badge at top of card */
.featured-badge-top {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    z-index: 10;
}

/* Plan description/subtitle */
.plan-description {
    color: #6b7280;
    font-size: 15px;
    margin: 8px 0 0 0;
    line-height: 1.4;
}

/* Large price display */
.price-large {
    font-size: 56px;
    font-weight: 800;
    color: #1f2937;
    line-height: 1;
    margin-top: 16px;
}

/* Price period (/month) */
.price-period {
    color: #6b7280;
    font-size: 16px;
    margin-top: 4px;
    margin-bottom: 8px;
}

/* Billing note (Billed X annually) */
.billing-note {
    font-size: 14px;
    color: #6b7280;
    margin-top: 8px;
    margin-bottom: 12px;
}

/* Trial badge (green rounded badge) */
.trial-badge {
    display: inline-block;
    background: #d1fae5;
    color: #065f46;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    margin-top: 12px;
}

/* New "Try Free" button */
.plan-select-btn-new {
    width: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.plan-select-btn-new:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

/* Trial footer text */
.trial-footer {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    margin-top: 8px;
}

/* Update plan features list styling */
.plan-features ul {
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

.plan-features ul li {
    padding: 10px 0;
    font-size: 15px;
    color: #374151;
    line-height: 1.5;
    border-bottom: 1px solid #f3f4f6;
}

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

/* Update featured card styling */
.subscription-plan-card.featured {
    border-color: #10b981;
    border-width: 2px;
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.15);
}

/* Ensure proper spacing for plan header */
.plan-header {
    margin-bottom: 16px;
}

.plan-header h4 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #1f2937;
}

/* Update plan pricing section */
.plan-pricing {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .price-large {
        font-size: 44px;
    }
    
    .plan-header h4 {
        font-size: 24px;
    }
    
    .plan-description {
        font-size: 14px;
    }
}


/* ============================================
   Plan Management Section Styles
   ============================================ */

.plan-management-section {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.plan-management-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1f2937;
}

/* Current Plan Card */
.current-plan-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    border-radius: 12px;
    position: relative;
    margin-bottom: 20px;
}

.current-plan-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.current-plan-card h4 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.current-plan-price {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.95);
}

.current-plan-features {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.current-plan-features .feature-item {
    font-size: 14px;
    padding: 6px 0;
    color: rgba(255, 255, 255, 0.9);
}

/* Available Plans Grid */
.available-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.plan-option-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.plan-option-card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.plan-option-card h5 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1f2937;
}

.plan-option-price {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 12px;
}

.plan-option-description {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.5;
}

/* Plan Action Buttons */
.plan-action-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.plan-action-btn.upgrade {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.plan-action-btn.upgrade:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    transform: translateY(-1px);
}

.plan-action-btn.downgrade {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

.plan-action-btn.downgrade:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    box-shadow: 0 4px 12px rgba(75, 85, 99, 0.25);
    transform: translateY(-1px);
}

.plan-action-btn:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .available-plans-grid {
        grid-template-columns: 1fr;
    }
    
    .plan-management-section {
        padding: 16px;
    }
    
    .current-plan-card {
        padding: 20px;
    }
    
    .current-plan-card h4 {
        font-size: 24px;
    }
    
    .plan-option-price {
        font-size: 28px;
    }
}

/* Loading state */
#plans-loading {
    text-align: center;
    padding: 20px;
    color: #6b7280;
}

/* ============================================
   Plan Change Modal Styles
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.modal-body {
    padding: 24px;
    max-height: calc(90vh - 180px);
    overflow-y: auto;
}

.modal-content {
    color: #4b5563;
    line-height: 1.6;
}

.modal-plan-details {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin: 16px 0;
}

.modal-plan-details h4 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
}

.modal-plan-details .plan-price {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 12px;
}

.modal-plan-details .plan-features {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-plan-details .plan-features div {
    padding: 4px 0;
    font-size: 14px;
}

.modal-comparison {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    margin: 16px 0;
}

.modal-comparison-item {
    text-align: center;
    flex: 1;
}

.modal-comparison-item .label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.modal-comparison-item .value {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.modal-comparison-arrow {
    font-size: 24px;
    color: #10b981;
    margin: 0 16px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn-cancel {
    background: #f3f4f6;
    color: #4b5563;
}

.modal-btn-cancel:hover {
    background: #e5e7eb;
}

.modal-btn-confirm {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.modal-btn-confirm:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.modal-btn-confirm.downgrade {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.modal-btn-confirm.downgrade:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.modal-success {
    text-align: center;
    padding: 20px 0;
}

.modal-success-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.modal-success h4 {
    font-size: 24px;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 8px;
}

.modal-success p {
    color: #6b7280;
    font-size: 16px;
}

.modal-error {
    text-align: center;
    padding: 20px 0;
}

.modal-error-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.modal-error h4 {
    font-size: 24px;
    font-weight: 700;
    color: #ef4444;
    margin-bottom: 8px;
}

.modal-error p {
    color: #6b7280;
    font-size: 16px;
}

.modal-loading {
    text-align: center;
    padding: 40px 0;
}

.modal-spinner {
    display: inline-block;
    width: 48px;
    height: 48px;
    border: 4px solid #f3f4f6;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.modal-loading-text {
    margin-top: 16px;
    color: #6b7280;
    font-size: 16px;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header {
        padding: 20px 16px 12px;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-footer {
        padding: 12px 16px;
        flex-direction: column-reverse;
    }

    .modal-btn {
        width: 100%;
    }

    .modal-comparison {
        flex-direction: column;
        gap: 8px;
    }

    .modal-comparison-arrow {
        transform: rotate(90deg);
        margin: 8px 0;
    }
}

/* Pagination controls */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding: 20px;
    border-top: 1px solid #404040;
}

.pagination-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #555;
}

.pagination-info {
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 500;
}

/* Usage group headers for date grouping */
.usage-group-header {
    margin: 30px 0 15px 0;
    padding: 10px 15px;
    background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
    border-left: 4px solid #667eea;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.usage-group-header:first-child {
    margin-top: 0;
}

/* Mobile responsive pagination */
@media (max-width: 640px) {
    .pagination-container {
        gap: 12px;
        padding: 16px;
    }

    .pagination-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .pagination-info {
        font-size: 13px;
    }

    .usage-group-header {
        margin: 20px 0 10px 0;
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* Service icons */
.service-icon {
    display: inline-block;
    width: 28px;
    height: 28px;
    margin-right: 10px;
    vertical-align: middle;
}

.service-logo {
    border-radius: 6px;
    object-fit: contain;
}

.chip-icon,
.whatsapp-icon,
.default-icon {
    font-size: 24px;
    line-height: 28px;
}

.usage-card-service-with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

.usage-card-service-with-icon .usage-card-service {
    margin: 0;
}

/* Mobile responsive icons */
@media (max-width: 640px) {
    .service-icon {
        width: 24px;
        height: 24px;
        margin-right: 8px;
    }

    .chip-icon,
    .whatsapp-icon,
    .default-icon {
        font-size: 20px;
        line-height: 24px;
    }
}

/* =============================================================================
   MODAL LOADING SPINNER ANIMATIONS
   ============================================================================= */

/* Modal Loading Spinner */
.modal-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Button Styles */
.modal-btn-secondary {
    background: #6b7280 !important;
    color: white !important;
}

.modal-btn-secondary:hover {
    background: #4b5563 !important;
}

/* Modal Loading State */
.modal-loading {
    text-align: center;
    padding: 30px;
}

.modal-loading-text {
    margin-top: 15px;
    color: #666;
    font-size: 16px;
}

/* Success/Error Icons */
.modal-success-icon, .modal-error-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.modal-success h4 {
    color: #10b981;
}

.modal-error h4 {
    color: #ef4444;
}

/* ============================================
   Mobile Optimizations for Dashboard
   ============================================ */

@media (max-width: 768px) {
    /* Dashboard header - keep horizontal on mobile with logout on right */
    .dashboard-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center !important;
        gap: 10px;
        flex-wrap: wrap;
    }

    .dashboard-header-title {
        flex: 0 0 auto;
    }

    .dashboard-nav {
        flex: 0 0 auto;
        flex-direction: row;
        gap: 10px;
        align-items: center;
    }

    .dashboard-nav button,
    .dashboard-nav a {
        width: auto;
        text-align: center;
        padding: 8px 16px;
        font-size: 14px;
    }

    .dashboard-nav .logout-btn {
        margin-top: 0;
    }

    /* Tabs - better touch targets */
    .dashboard-tabs {
        gap: 8px;
    }

    .dashboard-tab {
        padding: 12px 16px;
        font-size: 14px;
        flex: 1;
    }

    /* Usage chart - reduce height on mobile */
    .usage-chart-section canvas {
        height: 250px !important;
    }

    .usage-chart-section {
        padding: 15px !important;
    }

    .usage-chart-section h4 {
        font-size: 16px !important;
        margin-bottom: 15px !important;
    }

    /* Usage summary - better spacing */
    .usage-summary-section {
        padding: 15px !important;
    }

    .usage-summary-section h4 {
        font-size: 16px !important;
    }

    .usage-summary-item {
        padding: 12px 0 !important;
    }

    /* Progress bar container */
    .progress-bar-container {
        height: 50px !important;
    }

    /* Countdown timer - smaller on mobile */
    .countdown-timer {
        gap: 8px !important;
    }

    .countdown-unit {
        min-width: 60px !important;
    }

    .countdown-value {
        font-size: 20px !important;
    }

    .countdown-label {
        font-size: 10px !important;
    }

    /* Plan cards - single column */
    .available-plans-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    /* Modal - full width on mobile */
    .modal-container {
        max-width: 95%;
        margin: 10px;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Suspension banner */
    #suspension-banner {
        padding: 15px !important;
    }

    #suspension-banner h3 {
        font-size: 18px !important;
    }

    #suspension-banner p {
        font-size: 14px !important;
    }

    .upgrade-btn {
        width: 100%;
        padding: 14px 20px !important;
        font-size: 15px !important;
    }

    /* Usage cards - already mobile-friendly but ensure */
    .usage-card {
        margin-bottom: 12px;
    }

    /* Plan management section */
    .plan-management-section {
        padding: 15px !important;
    }

    .current-plan-card {
        padding: 20px !important;
    }

    /* Chart section on mobile */
    #usage-chart {
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    /* Extra small devices */
    .container {
        padding: 10px !important;
    }

    .dashboard-header-title h2 {
        font-size: 18px;
    }

    .header-logo {
        width: 30px !important;
        height: 30px !important;
    }

    /* Smaller text on tiny screens */
    .usage-summary-item div {
        font-size: 13px !important;
    }

    .usage-percentage-text {
        font-size: 16px !important;
    }

    /* Chart - even smaller height */
    .usage-chart-section canvas {
        height: 220px !important;
    }

    /* Modal */
    .modal-container {
        padding: 15px;
    }

    .modal-footer button {
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
}
