/* Console Styles */
.console-container {
    display: flex;
    min-height: calc(100vh - 70px);
    background-color: #f8fafc;
    margin-top: 70px;
}

/* Upload Zone Styles */
.upload-zone-simple {
    height: 500px;
    background: white;
    border: 3px dashed #d1d5db;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-zone-simple:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #e2e8f0;
    padding: 2rem 0;
    position: fixed;
    height: calc(100vh - 70px);
    overflow-y: auto;
    top: 70px;
}

.sidebar-section {
    margin-bottom: 2rem;
    padding: 0 1.5rem;
}

.sidebar-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 0.25rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: #64748b;
    text-decoration: none;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.sidebar-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s ease;
}

.sidebar-menu a:hover::before {
    left: 100%;
}

.sidebar-menu a i {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.sidebar-menu a:hover {
    background-color: #f8fafc;
    color: #334155;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sidebar-menu a.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transform: translateX(4px);
}

.sidebar-menu a.active::before {
    display: none;
}

.subscription-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: #fef3c7;
    border-radius: 0.5rem;
    border: 1px solid #f59e0b;
}

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

.status-indicator.active {
    background-color: #10b981;
}

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

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

.subscription-status span {
    font-size: 0.875rem;
    font-weight: 500;
    color: #92400e;
}

.btn-small {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    width: 100%;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-small i {
    width: 16px;
    height: 16px;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
}

.console-header {
    margin-bottom: 3rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.header-text {
    flex: 1;
}

.header-actions {
    flex-shrink: 0;
}

.btn-outline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid #e2e8f0;
    background: white;
    color: #334155;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.btn-outline:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.btn-outline i {
    width: 18px;
    height: 18px;
}

.console-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.console-header p {
    color: #64748b;
    font-size: 1.125rem;
}

.subscription-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.free-tier-info {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
    border-radius: 1.5rem;
    padding: 2.5rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

.warning-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.warning-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.warning-icon i {
    width: 32px;
    height: 32px;
    color: white;
    stroke-width: 2;
}

.warning-text {
    flex: 1;
}

.warning-text h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 0.5rem;
}

.warning-text p {
    color: #a16207;
    margin-bottom: 0;
}

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

.stat-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #10b981, #f59e0b, #ef4444);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.stat-card:hover::before {
    opacity: 1;
}

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

.stat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.stat-icon i {
    width: 24px;
    height: 24px;
    color: #64748b;
    transition: color 0.3s ease;
}

.stat-card:hover .stat-icon i {
    color: white;
}

.stat-trend {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-trend.positive {
    background: rgba(16, 185, 129, 0.1);
}

.stat-trend.negative {
    background: rgba(239, 68, 68, 0.1);
}

.stat-trend.neutral {
    background: rgba(100, 116, 139, 0.1);
}

.stat-trend i {
    width: 16px;
    height: 16px;
}

.stat-trend.positive i {
    color: #10b981;
}

.stat-trend.negative i {
    color: #ef4444;
}

.stat-trend.neutral i {
    color: #64748b;
}

.stat-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: #64748b;
    font-size: 0.875rem;
    margin: 0;
}

.usage-chart-section {
    background: white;
    border-radius: 1.25rem;
    padding: 2.5rem;
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.usage-chart-section:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.chart-legend {
    display: flex;
    gap: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-color.used {
    background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
}

.legend-color.remaining {
    background: #f1f5f9;
}

.usage-chart {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.usage-percentage {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    min-width: 80px;
    text-align: left;
}

.usage-chart-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.chart-container {
    width: 100%;
    max-width: none;
}

.usage-bar {
    height: 24px;
    background-color: #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.usage-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 12px 12px 0 0;
}

.usage-progress {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
    border-radius: 12px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    position: relative;
    overflow: hidden;
}

.usage-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    to {
        left: 100%;
    }
}

.usage-labels {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

.recent-activity {
    background: white;
    border-radius: 1.25rem;
    padding: 2.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.recent-activity:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.view-all-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    color: #1d4ed8;
    transform: translateX(4px);
}

.view-all-link i {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.view-all-link:hover i {
    transform: translateX(2px);
}

.recent-activity h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.activity-list {
    space-y: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background-color: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    position: relative;
}

.activity-item:hover {
    background-color: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.activity-time {
    margin-left: auto;
    flex-shrink: 0;
}

.activity-time small {
    color: #64748b;
    font-weight: 500;
}

.activity-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-icon i {
    width: 20px;
    height: 20px;
    color: #64748b;
}

.activity-content p {
    margin: 0 0 0.25rem 0;
    color: #1e293b;
}

.activity-content small {
    color: #64748b;
}

/* Usage Page Specific Styles */
.usage-overview {
    margin-bottom: 2rem;
}

.usage-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid #e2e8f0;
}

.usage-card.primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
}

.usage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.usage-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.quota-badge {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.usage-stats {
    margin-bottom: 1.5rem;
}

.usage-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.usage-number .total {
    opacity: 0.7;
}

.usage-label {
    font-size: 1rem;
    opacity: 0.9;
}

.usage-bar-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.usage-bar-container .usage-bar {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.2);
}

.usage-bar-container .usage-progress {
    background-color: white;
}

.usage-percentage {
    font-weight: 600;
    font-size: 1.125rem;
}

.usage-details {
    margin-bottom: 2rem;
}

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

.detail-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.detail-icon {
    font-size: 1.5rem;
}

.detail-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.detail-content p {
    color: #64748b;
    font-size: 0.875rem;
    margin: 0;
}

.usage-history {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.usage-history h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.history-table {
    overflow-x: auto;
}

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

.history-table th,
.history-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.history-table th {
    font-weight: 600;
    color: #374151;
    background-color: #f9fafb;
}

.history-table td.no-data {
    text-align: center;
    color: #64748b;
    font-style: italic;
    padding: 2rem;
}

.usage-limits {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.usage-limits h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.limits-info {
    space-y: 1rem;
}

.limit-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.limit-icon {
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.limit-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.limit-content p {
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.upgrade-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #0ea5e9;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
}

.upgrade-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0c4a6e;
    margin-bottom: 1rem;
}

.upgrade-section p {
    color: #075985;
    margin-bottom: 1.5rem;
}

/* Button Base Styles - Console Override */
.console-container .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.5;
}

.console-container .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Force blue theme for console buttons */
.console-container .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.console-container .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.console-container .btn-primary:active {
    transform: translateY(0);
}

.console-container .btn-secondary {
    background: white !important;
    color: #64748b !important;
    border: 2px solid #e2e8f0 !important;
}

.console-container .btn-secondary:hover:not(:disabled) {
    border-color: #3b82f6 !important;
    color: #3b82f6 !important;
    background: #f8fafc !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.console-container .btn-outline {
    background: transparent !important;
    color: #3b82f6 !important;
    border: 2px solid #3b82f6 !important;
}

.console-container .btn-outline:hover:not(:disabled) {
    background: #3b82f6 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.btn i {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

/* Mobile Overlay Menu Styles */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8) translateY(50px);
    transition: all 0.3s ease;
}

.mobile-overlay.active .mobile-menu-content {
    transform: scale(1) translateY(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.mobile-logo img {
    height: 32px;
    width: auto;
    filter: brightness(0) invert(1);
}

.close-menu {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-menu:hover {
    background: rgba(255, 255, 255, 0.1);
}

.close-menu i {
    width: 24px;
    height: 24px;
}

.mobile-menu-sections {
    padding: 0;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

.mobile-menu-section {
    padding: 25px;
    border-bottom: 1px solid #e2e8f0;
}

.mobile-menu-section:last-child {
    border-bottom: none;
}

.mobile-menu-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 15px;
}

.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-menu li {
    margin-bottom: 8px;
}

.mobile-nav-menu a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    color: #64748b;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.mobile-nav-menu a:hover {
    background-color: #f8fafc;
    color: #334155;
    transform: translateX(4px);
}

.mobile-nav-menu a.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.mobile-nav-menu a i {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.mobile-subscription-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 15px;
}

.mobile-subscription-status .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
}

.mobile-subscription-status span {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.mobile-user-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    font-size: 0.875rem;
}

.mobile-logout i {
    width: 18px;
    height: 18px;
}

/* Hamburger menu positioning for console */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    position: absolute;
    right: 20px;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile-first responsive improvements */
@media (max-width: 1024px) {
    .sidebar {
        width: 250px;
    }
    
    .main-content {
        margin-left: 250px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        display: none;
    }
    
    .console-container {
        flex-direction: column;
        margin-top: 0;
    }
    
    .sidebar {
        display: none; /* Hide sidebar on mobile, use overlay menu instead */
    }
    
    .main-content {
        margin-left: 0;
        padding: 1.5rem 1rem;
        width: 100%;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-actions {
        width: 100%;
    }
    
    .btn-outline {
        width: 100%;
        justify-content: center;
    }
    
    .warning-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .warning-icon {
        align-self: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .chart-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .chart-legend {
        justify-content: center;
    }
    
    .usage-chart {
        flex-direction: column;
        gap: 1rem;
    }
    
    .usage-percentage {
        order: -1;
    }
    
    .activity-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .activity-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .activity-time {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem 0.75rem;
    }
    
    .console-header {
        margin-bottom: 2rem;
    }
    
    .console-header h1 {
        font-size: 1.5rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .usage-chart-section,
    .recent-activity {
        padding: 1.5rem;
    }
    
    /* Mobile overlay adjustments for smaller screens */
    .mobile-menu-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .mobile-menu-section {
        padding: 20px;
    }
    
    .mobile-nav-menu a {
        padding: 12px;
        font-size: 0.875rem;
    }
    
    .mobile-menu-header {
        padding: 15px 20px;
    }
    
    .mobile-logo img {
        height: 28px;
    }
    
    /* Ensure hamburger is visible and properly positioned */
    .hamburger {
        right: 15px;
    }
    
    .hamburger span {
        width: 22px;
        height: 2px;
    }
}

/* Enhanced animations and micro-interactions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.stats-grid {
    animation: fadeInUp 0.6s ease-out;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.usage-chart-section {
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.recent-activity {
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    to {
        left: 100%;
    }
}

/* Upload page: disable shimmer on progress to avoid blinking */
.processing-section .loading-progress::after {
    content: none !important;
    animation: none !important;
}

/* Focus styles for accessibility */
.btn:focus,
.sidebar-menu a:focus,
.view-all-link:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Dark mode support preparation */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
        --border-color: #334155;
    }
}

/* Raw JSON display styles */
.raw-response-section {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.raw-response-section h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    color: #1f2937;
    font-size: 1.125rem;
    font-weight: 600;
}

.raw-json-container {
    margin-top: 1rem;
}

.json-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.json-display {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #374151;
}

.json-display::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.json-display::-webkit-scrollbar-track {
    background: #374151;
    border-radius: 4px;
}

.json-display::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 4px;
}

.json-display::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* File issues list styles */
.issues-list {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.issues-list h3 {
    color: #1f2937;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.file-issue-summary {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.file-issue-summary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.file-issue-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filename-section {
    flex: 1;
    min-width: 0; /* Allow text truncation */
}

.filename {
    font-weight: 600;
    color: #1e293b;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.issues-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.issue-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.issue-badge.major {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.issue-badge.minor {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fed7aa;
}

.issue-badge i {
    width: 14px;
    height: 14px;
    stroke-width: 2;
}

.issue-badge .count {
    font-weight: 700;
}

.actions-section {
    flex-shrink: 0;
}

.view-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.no-issues-text {
    color: #10b981;
    font-weight: 500;
    font-size: 0.875rem;
    font-style: italic;
}

/* Status icon styles */
.status-icon {
    width: 16px;
    height: 16px;
}
.status-icon.done {
    color: #10b981;
}
.status-icon.in_progress {
    color: #f59e0b;
    animation: spin 2s linear infinite;
}
.status-icon.error {
    color: #ef4444;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Issues popup styles */
.issues-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.issues-popup {
    background: white;
    border-radius: 1rem;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.issues-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 1rem 1rem 0 0;
}

.issues-popup-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
}

.close-popup-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-popup-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.close-popup-btn i {
    width: 20px;
    height: 20px;
}

.issues-popup-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.issues-popup-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.issue-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.issue-badge {
    flex-shrink: 0;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    height: fit-content;
}

.issue-content {
    flex: 1;
}

.issue-content h4 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
}

.issue-content p {
    margin: 0 0 0.75rem 0;
    color: #475569;
    line-height: 1.5;
}

.issue-metadata {
    margin-bottom: 0.5rem;
}

.issue-metadata small {
    color: #64748b;
    font-size: 0.875rem;
}

.fixed-text {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
}

.fixed-text strong {
    color: #166534;
}

.issues-popup-footer {
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 1rem 1rem;
    display: flex;
    justify-content: center;
}

/* Details popup styles */
.details-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.details-popup {
    background: white;
    border-radius: 1rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.details-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 1rem 1rem 0 0;
}

.details-popup-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.details-popup-content p {
    margin: 0 0 0.75rem 0;
    color: #475569;
}

.details-popup-footer {
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 1rem 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Mobile responsive adjustments for file list */
@media (max-width: 768px) {
    .file-issue-row {
        gap: 0.75rem;
    }
    
    .filename {
        max-width: 150px; /* Truncate filename on mobile */
    }
    
    .view-btn span {
        display: none; /* Hide "Voir" text on mobile, show only icon */
    }
    
    .issue-badge .count {
        display: none; /* Hide count numbers on very small screens */
    }
    
    .issues-popup {
        margin: 0.5rem;
        max-height: 95vh;
    }
    
    .issues-popup-header,
    .issues-popup-content,
    .issues-popup-footer {
        padding: 1rem;
    }
    
    .issue-item {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .filename {
        max-width: 120px; /* Further truncate on very small screens */
    }
    
    .issue-badge {
        padding: 0.125rem 0.375rem;
        font-size: 0.625rem;
    }
    
    .issue-badge i {
        width: 12px;
        height: 12px;
    }
    
    .view-btn {
        padding: 0.375rem 0.75rem;
        min-width: 40px;
    }
}

/* Print styles */
@media print {
    .sidebar,
    .header-actions,
    .warning-content button {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding: 0;
    }
    
    .stat-card,
    .usage-chart-section,
    .recent-activity {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
    
    .raw-response-section {
        page-break-inside: avoid;
    }
    
    .json-display {
        background: white !important;
        color: black !important;
        border: 1px solid #ccc !important;
    }
    
    .issues-popup-overlay {
        display: none;
    }
}
