/* ========================================
   Waveseed - Vanilla CSS Styles
   Premium music generation UI
   ======================================== */

/* CSS Variables */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 0.25rem;
    --radius: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* ========================================
   Auth Screen
   ======================================== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 1rem;
}

.auth-card {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.auth-logo {
    margin-bottom: 1.5rem;
}

.logo-icon {
    width: 4rem;
    height: 4rem;
    color: var(--primary);
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--gray-500);
    margin-bottom: 2rem;
}

.google-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition);
}

.google-signin-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    box-shadow: var(--shadow-md);
}

.google-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--gray-400);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

/* Microsoft Sign-In Button */
.microsoft-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all var(--transition);
}

.microsoft-signin-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    box-shadow: var(--shadow-md);
}

.microsoft-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* ========================================
   App Container & Header
   ======================================== */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-logo {
    width: 2rem;
    height: 2rem;
    color: var(--primary);
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-weight: 500;
    color: var(--gray-700);
}

.signout-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition);
}

.signout-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

/* ========================================
   Main Content & Tabs
   ======================================== */
.main-content {
    flex: 1;
    padding: 2rem 1.5rem;
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
    justify-content: center;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--gray-700);
    border-bottom-color: var(--gray-300);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.tab-panels {
    padding: 1.5rem;
}

.tab-panel {
    display: none;
}

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

/* ========================================
   Form Elements
   ======================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.375rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--gray-900);
    transition: all var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
}

.form-checkbox span {
    font-size: 0.875rem;
    color: var(--gray-700);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Slider/Range */
.form-range {
    width: 100%;
    height: 0.5rem;
    background: var(--gray-200);
    border-radius: var(--radius-sm);
    appearance: none;
    cursor: pointer;
}

.form-range::-webkit-slider-thumb {
    appearance: none;
    width: 1rem;
    height: 1rem;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* ========================================
   Loading Animation
   ======================================== */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.loading-icon-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.loading-pulse {
    position: absolute;
    inset: 0;
    background: rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.loading-icon {
    position: relative;
    background: var(--white);
    padding: 1rem;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
}

.loading-icon svg {
    width: 2rem;
    height: 2rem;
    color: var(--primary);
    animation: bounce 1s infinite;
}

.loading-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.loading-subtitle {
    font-size: 0.875rem;
    color: var(--primary);
}

.loading-dots {
    display: flex;
    gap: 0.375rem;
    margin-top: 1rem;
}

.loading-dot {
    width: 0.5rem;
    height: 0.5rem;
    background: var(--primary-light);
    border-radius: 50%;
    animation: bounce 1s infinite;
}

.loading-dot:nth-child(1) {
    animation-delay: -0.3s;
}

.loading-dot:nth-child(2) {
    animation-delay: -0.15s;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-25%);
    }
}

/* ========================================
   Song Cards Grid
   ======================================== */
.songs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.song-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--gray-100);
    transition: all var(--transition);
}

.song-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.song-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--gray-100);
    position: relative;
}

.song-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.song-card:hover .song-image img {
    transform: scale(1.05);
}

.song-content {
    padding: 1rem;
}

.song-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-tags {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.song-audio {
    width: 100%;
    margin-bottom: 0.75rem;
}

.song-download {
    display: block;
    text-align: right;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.song-download:hover {
    color: var(--primary-dark);
}

/* ========================================
   Alerts & Messages
   ======================================== */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-info {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-dark);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* ========================================
   Task Table
   ======================================== */
.table-container {
    overflow-x: auto;
}

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

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.data-table th {
    background: var(--gray-50);
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    font-size: 0.875rem;
    color: var(--gray-700);
}

.data-table tr:hover {
    background: var(--gray-50);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.status-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.status-failed {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* ========================================
   Section Headers
   ======================================== */
.section-header {
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.section-subtitle {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* ========================================
   Advanced Settings Toggle
   ======================================== */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.toggle-switch {
    position: relative;
    width: 2.5rem;
    height: 1.5rem;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--gray-300);
    border-radius: 1.5rem;
    transition: all var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 1.125rem;
    width: 1.125rem;
    left: 0.1875rem;
    bottom: 0.1875rem;
    background: var(--white);
    border-radius: 50%;
    transition: all var(--transition);
}

.toggle-switch input:checked+.toggle-slider {
    background: var(--primary);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(1rem);
}

.toggle-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

/* Advanced Settings Panel */
.advanced-panel {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 1rem;
}

/* ========================================
   Pagination
   ======================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.pagination-btn {
    padding: 0.5rem;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}

.pagination-btn:hover:not(:disabled) {
    background: var(--gray-100);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* ========================================
   Modal / Overlay
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 1.5rem;
    max-width: 500px;
    width: 100%;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0;
    transition: color var(--transition);
}

.modal-close:hover {
    color: var(--gray-600);
}

/* ========================================
   Credit Balance Card
   ======================================== */
.credit-card {
    max-width: 320px;
    margin: 2rem auto;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    text-align: center;
}

.credit-icon {
    width: 4rem;
    height: 4rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.credit-icon svg {
    width: 2rem;
    height: 2rem;
    color: #d97706;
}

.credit-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.credit-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.credit-amount span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--gray-500);
    margin-left: 0.25rem;
}

/* ========================================
   Disabled State
   ======================================== */
.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ========================================
   Responsive / Mobile
   ======================================== */
@media (max-width: 768px) {
    .tab-nav {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
    }

    .header-content {
        padding: 0.75rem 1rem;
    }

    .user-name {
        display: none;
    }

    .main-content {
        padding: 1rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Spinner */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Tooltip */
.tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tooltip-icon {
    width: 1rem;
    height: 1rem;
    color: var(--gray-400);
    cursor: help;
    margin-left: 0.375rem;
}

.tooltip-text {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-900);
    color: var(--white);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    margin-bottom: 0.5rem;
    z-index: 10;
}

.tooltip-container:hover .tooltip-text {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   Config Card
   ======================================== */
.config-card {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
}

.config-header {
    text-align: center;
    margin-bottom: 2rem;
}

.config-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    border-radius: var(--radius-xl);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
}

.config-icon svg {
    width: 2rem;
    height: 2rem;
    color: var(--white);
}

.config-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.config-subtitle {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.config-content {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
}

.config-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 1rem;
    color: var(--gray-500);
}

.config-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-200);
}

.status-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

.status-value {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875rem;
    color: var(--gray-400);
}

.status-value.configured {
    color: var(--secondary);
    font-weight: 500;
}

.form-label svg {
    vertical-align: middle;
    margin-right: 0.25rem;
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.375rem;
}

.config-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.config-actions .btn {
    flex: 1;
}

.config-info {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.config-info h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
}

.config-info ul {
    list-style: none;
    padding: 0;
}

.config-info li {
    position: relative;
    padding-left: 1.25rem;
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.config-info li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
}

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

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

/* ========================================
   Subscription & Pricing Styles
   ======================================== */
.usage-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: var(--white);
    padding: 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.plan-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.plan-card.highlight {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.plan-card.premium {
    background: linear-gradient(135deg, var(--gray-900) 0%, #312e81 100%);
    color: var(--white);
    border: none;
}

.plan-card.premium .plan-price,
.plan-card.premium h3,
.plan-card.premium .plan-sub {
    color: var(--white);
}

.plan-card.premium .plan-features li {
    color: var(--gray-300);
}

.plan-tag {
    position: absolute;
    top: -12px;
    right: 1.5rem;
    background: var(--warning);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    text-transform: uppercase;
    box-shadow: var(--shadow-md);
}

.plan-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.plan-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
}

.plan-price span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-500);
}

.old-price {
    text-decoration: line-through;
    font-size: 1.25rem;
    color: var(--gray-400);
    margin-right: 0.5rem;
    font-weight: 400;
}

.plan-sub {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
}

.plan-features {
    list-style: none;
    margin-bottom: 2rem;
    flex: 1;
}

.plan-features li {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.75rem;
    text-align: center;
}

.plan-btn {
    margin-top: auto;
}

.active-plan {
    border-color: var(--secondary);
    background: rgba(16, 185, 129, 0.05);
}

.active-plan::after {
    content: 'YOUR PLAN';
    display: block;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--secondary);
    margin-top: 0.5rem;
}

.config-divider {
    border: none;
    height: 1px;
    background: var(--gray-200);
    margin: 2rem 0;
}

.section-desc {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.success-text {
    color: var(--secondary) !important;
    font-weight: 600;
}