/* ===================================
   AI Background Remover - Theme System
   Pure CSS (Compatible with Tailwind CDN)
   No @apply directives - works with CDN
   =================================== */

:root {
    --color-primary: #0066ff;
    --color-secondary: #f8f9fa;
    --color-accent: #28a745;
    --color-dark: #212529;
    --color-light-gray: #6c757d;
    --transition-base: all 0.3s ease;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* ===================================
   BUTTONS
   =================================== */

/* Primary Button */
.button-primary {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: var(--transition-base);
    background: linear-gradient(135deg, var(--color-primary), #0052cc);
    color: white;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.button-primary:hover {
    box-shadow: 0 10px 25px rgba(0, 102, 255, 0.3);
    transform: scale(1.05) translateY(-2px);
}

.button-primary:active {
    transform: scale(1);
}

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

/* Secondary Button */
.button-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: var(--transition-base);
    background: var(--color-secondary);
    color: var(--color-dark);
    border: 2px solid #e9ecef;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.button-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.button-secondary:active {
    transform: scale(0.95);
}

.button-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Outline Button */
.button-outline {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: var(--transition-base);
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.button-outline:hover {
    background: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

.button-outline:active {
    transform: scale(0.95);
}

.button-outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Success Button */
.button-success {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: var(--transition-base);
    background: var(--color-accent);
    color: white;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.button-success:hover {
    background: #218838;
    box-shadow: 0 10px 25px rgba(40, 167, 69, 0.3);
    transform: scale(1.05);
}

.button-success:active {
    transform: scale(1);
}

.button-success:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Danger Button */
.button-danger {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: var(--transition-base);
    background: #dc3545;
    color: white;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.button-danger:hover {
    background: #c82333;
    box-shadow: 0 10px 25px rgba(220, 53, 69, 0.3);
    transform: scale(1.05);
}

.button-danger:active {
    transform: scale(1);
}

.button-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Button Size Modifiers */
.button-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
}

.button-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    border-radius: 0.75rem;
}

.button-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.button-icon:hover {
    box-shadow: var(--shadow-md);
    transform: scale(1.1);
}

.button-loading {
    position: relative;
    opacity: 0.75;
    cursor: wait;
    pointer-events: none;
}


/* ===================================
   CARDS
   =================================== */

.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f3f4f6;
    transition: var(--transition-base);
}

.card-feature {
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f3f4f6;
    padding: 1.5rem;
    transition: var(--transition-base);
    cursor: pointer;
}

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

.card-stat {
    background: linear-gradient(135deg, #eff6ff, #e0e7ff);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f3f4f6;
    padding: 1.5rem;
    transition: var(--transition-base);
}

.card-pricing {
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 2px solid #f3f4f6;
    padding: 2rem;
    text-align: center;
    transition: var(--transition-base);
}

.card-pricing:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
    border-color: var(--color-primary);
}

.card-image {
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f3f4f6;
    overflow: hidden;
    transition: var(--transition-base);
}

.card-image:hover {
    box-shadow: var(--shadow-lg);
}

.card-interactive {
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f3f4f6;
    padding: 1.5rem;
    cursor: pointer;
    transform: translateZ(0);
    transition: var(--transition-base);
}

.card-interactive:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.card-header {
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    border-top: 1px solid #f3f4f6;
    padding-top: 1rem;
    margin-top: 1rem;
}


/* ===================================
   BADGES
   =================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-primary {
    background: #dbeafe;
    color: var(--color-primary);
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-gray {
    background: #f3f4f6;
    color: #374151;
}


/* ===================================
   ALERTS
   =================================== */

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    margin-bottom: 1rem;
}

.alert-info {
    background: #dbeafe;
    border-color: #bfdbfe;
    color: #1e40af;
}

.alert-success {
    background: #d1fae5;
    border-color: #a7f3d0;
    color: #065f46;
}

.alert-warning {
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

.alert-danger {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}


/* ===================================
   FORMS & INPUTS
   =================================== */

.input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    transition: all 0.2s ease;
}

.input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.input-error {
    border-color: #dc3545;
}

.input-error:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.input-success {
    border-color: var(--color-accent);
}

.input-success:focus {
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.input-group {
    margin-bottom: 1rem;
}

.label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}

.select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    resize: vertical;
    min-height: 8rem;
}

.textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.checkbox,
.radio {
    width: 1rem;
    height: 1rem;
    color: var(--color-primary);
    border-color: #d1d5db;
    border-radius: 0.25rem;
}

.checkbox:focus,
.radio:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.radio {
    border-radius: 50%;
}


/* ===================================
   LOADERS & SPINNERS
   =================================== */

.spinner {
    border: 3px solid #f3f4f6;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    animation: spin 1s linear infinite;
}

.spinner-sm {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 2px;
}

.spinner-lg {
    width: 4rem;
    height: 4rem;
    border-width: 4px;
}

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
}

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


/* ===================================
   MODALS
   =================================== */

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

.modal-container {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-width: 42rem;
    width: 100%;
    max-height: 100vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}


/* ===================================
   NAVIGATION
   =================================== */

.navbar {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
}

.navbar-shadow {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-link {
    color: var(--color-dark);
    font-weight: 500;
    transition: color 0.2s ease;
    text-decoration: none;
}

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

.nav-link.active {
    color: var(--color-primary);
}

.mobile-menu {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 1rem;
}

@media (min-width: 768px) {
    .mobile-menu {
        display: none;
    }
}


/* ===================================
   TABLES
   =================================== */

.table-container {
    overflow-x: auto;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.table {
    width: 100%;
    text-align: left;
}

.table-header {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.table-row {
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s ease;
}

.table-row:hover {
    background: #f9fafb;
}

.table-cell {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
}

.table-head {
    padding: 0.75rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


/* ===================================
   PROGRESS BARS
   =================================== */

.progress {
    width: 100%;
    background: #e5e7eb;
    border-radius: 9999px;
    height: 0.5rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), #0052cc);
    transition: width 0.3s ease-out;
}

.progress-lg {
    height: 1rem;
}


/* ===================================
   DIVIDERS
   =================================== */

.divider {
    border-top: 1px solid #e5e7eb;
    margin: 1.5rem 0;
}

.divider-text {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.divider-text::before,
.divider-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 33.333%;
    border-top: 1px solid #e5e7eb;
}

.divider-text::before {
    left: 0;
}

.divider-text::after {
    right: 0;
}


/* ===================================
   BREADCRUMBS
   =================================== */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-light-gray);
}

.breadcrumb-item {
    transition: color 0.2s ease;
}

.breadcrumb-item:hover {
    color: var(--color-primary);
}

.breadcrumb-item.active {
    color: var(--color-dark);
    font-weight: 500;
}


/* ===================================
   TOOLTIPS
   =================================== */

.tooltip {
    position: absolute;
    z-index: 50;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: white;
    background: var(--color-dark);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.tooltip.visible {
    opacity: 1;
    visibility: visible;
}


/* ===================================
   UTILITIES
   =================================== */

.container-custom {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container-custom {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-custom {
        padding: 0 2rem;
    }
}

.shadow-primary {
    box-shadow: 0 10px 30px rgba(0, 102, 255, 0.2);
}

.shadow-success {
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.2);
}

.gradient-text {
    background: linear-gradient(90deg, var(--color-primary), #0052cc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.5);
}


/* ===================================
   RESPONSIVE UTILITIES
   =================================== */

.hide-mobile {
    display: none;
}

@media (min-width: 768px) {
    .hide-mobile {
        display: block;
    }
}

.show-mobile {
    display: block;
}

@media (min-width: 768px) {
    .show-mobile {
        display: none;
    }
}

.grid-responsive {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .grid-responsive {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-responsive {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* ===================================
   SECTIONS
   =================================== */

.section {
    padding: 4rem 0;
}

.section-light {
    background: white;
}

.section-gray {
    background: #f9fafb;
}

.section-dark {
    background: var(--color-dark);
    color: white;
}

.section-gradient {
    background: linear-gradient(135deg, #eff6ff, #e0e7ff, #f3e8ff);
}

.section-hero {
    padding: 5rem 0;
    background: linear-gradient(135deg, #eff6ff, #e0e7ff);
}

@media (min-width: 1024px) {
    .section-hero {
        padding: 8rem 0;
    }
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.25rem;
    }
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-light-gray);
    margin-bottom: 2rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .section-subtitle {
        font-size: 1.25rem;
    }
}


/* ===================================
   ANIMATIONS
   =================================== */

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-up {
    animation: slideUp 0.4s ease-out;
}

.scale-in {
    animation: scaleIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

