@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg-color: #f9fafb;
    --sidebar-bg: #000000;
    --sidebar-hover: #111827;
    --sidebar-active: #1f2937;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --accent: #0284c7;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Page Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #a5b4fc 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-logo svg {
    color: #a5b4fc;
}

.sidebar-menu {
    list-style: none;
    padding: 1.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #d1d5db;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    background-color: var(--sidebar-hover);
    color: #ffffff;
}

.sidebar-link.active {
    background-color: var(--sidebar-active);
    color: #ffffff;
    border-left: 4px solid var(--primary);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    padding: 2rem 2.5rem;
    overflow-y: auto;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.page-title p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Card Styling */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.03);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

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

.metric-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.metric-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.icon-blue {
    background-color: #f0f9ff;
    color: var(--accent);
    border: 1px solid #e0f2fe;
}

.icon-purple {
    background-color: #eef2ff;
    color: var(--primary);
    border: 1px solid #e0e7ff;
}

.icon-green {
    background-color: #ecfdf5;
    color: var(--success);
    border: 1px solid #d1fae5;
}

.metric-info h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
}

.metric-info .value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.1rem;
}

/* Forms & Inputs */
.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

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

.form-group.span-2 {
    grid-column: span 2;
}

label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

input, select {
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
    width: 100%;
}

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

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

.btn-secondary {
    background-color: #ffffff;
    border-color: #d1d5db;
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.btn-accent {
    background-color: var(--accent);
    color: #ffffff;
}

.btn-accent:hover {
    background-color: #0369a1;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #ffffff;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
}

th {
    background-color: #f9fafb;
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #f9fafb;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-pending {
    background-color: #fef3c7;
    color: #d97706;
}

.badge-converting {
    background-color: #fef3c7;
    color: #b45309;
    animation: blink 1.5s infinite;
}

.badge-downloading {
    background-color: #e0f2fe;
    color: #0369a1;
    animation: blink 1.5s infinite;
}

.badge-importing {
    background-color: #e0f2fe;
    color: #0369a1;
    animation: blink 1.5s infinite;
}

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

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

@keyframes blink {
    50% { opacity: 0.6; }
}

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

.pagination-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-item:hover:not(.disabled) {
    background-color: #f3f4f6;
    color: var(--text-primary);
}

.pagination-item.active {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

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

/* Jobs Status Items */
.job-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.job-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background-color: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.job-progress-container {
    width: 100%;
    background-color: #e5e7eb;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
}

.job-progress-bar {
    height: 100%;
    background-color: var(--primary);
    width: 0%;
    transition: width 0.4s ease;
}

/* Pricing Grid & Card styles */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.pricing-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    border-radius: 14px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    text-align: left;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.1), 0 4px 6px -2px rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.4);
}

.pricing-card.active {
    border: 2px solid var(--primary);
    background-color: #fcfdff;
}

.pricing-card-header {
    margin-bottom: 1.25rem;
}

.pricing-card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pricing-card.active .pricing-card-title {
    color: var(--primary);
}

.pricing-price {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0.75rem 0;
}

.pricing-period {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 400;
}

.pricing-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    padding-left: 0;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .app-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 1rem;
    }
    .main-content {
        padding: 1.5rem;
    }
}
