/* Modern Dashboard Styles - Dynamic & Responsive */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-header h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.sidebar-subtitle {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 500;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 4px 10px;
    border-radius: 8px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.nav-icon {
    font-size: 20px;
    margin-right: 12px;
    width: 24px;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
}

.upgrade-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    backdrop-filter: blur(10px);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    background: #f5f7fa;
    transition: all 0.3s ease;
}

.top-bar {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar h2 {
    font-size: 24px;
    color: #1a202c;
    margin: 0;
}

.date-display {
    background: #f0f4ff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    color: #4a5568;
}

.content-area {
    padding: 30px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    opacity: 0.1;
    transform: translate(30%, -30%);
}

.gradient-blue {
    border-top: 3px solid #667eea;
}

.gradient-blue::before {
    background: #667eea;
}

.gradient-green {
    border-top: 3px solid #10b981;
}

.gradient-green::before {
    background: #10b981;
}

.gradient-orange {
    border-top: 3px solid #f59e0b;
}

.gradient-orange::before {
    background: #f59e0b;
}

.gradient-purple {
    border-top: 3px solid #8b5cf6;
}

.gradient-purple::before {
    background: #8b5cf6;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.stat-icon {
    font-size: 36px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.stat-trend.up {
    background: #d1fae5;
    color: #065f46;
}

.stat-trend.down {
    background: #fee2e2;
    color: #991b1b;
}

.stat-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.stat-badge.success {
    background: #d1fae5;
    color: #065f46;
}

.stat-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.stat-badge.info {
    background: #dbeafe;
    color: #1e40af;
}

.stat-content h3 {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 4px;
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: #9ca3af;
}

/* IRBM Status Section */
.dashboard-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.section-header {
    margin-bottom: 24px;
}

.section-header h3 {
    font-size: 20px;
    margin-bottom: 4px;
    color: #1a202c;
}

.section-header p {
    color: #6b7280;
    font-size: 14px;
}

.irbm-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.irbm-status-card {
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.irbm-status-card:hover {
    transform: translateY(-3px);
}

.irbm-status-card.draft {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.irbm-status-card.pending {
    background: #fef3c7;
    border-color: #fbbf24;
}

.irbm-status-card.valid {
    background: #d1fae5;
    border-color: #10b981;
}

.irbm-status-card.action {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.status-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.status-number {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
}

.status-label {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.status-desc {
    font-size: 13px;
    opacity: 0.8;
}

.btn-submit-all {
    background: white;
    color: #667eea;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-submit-all:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-grid.two-column {
    grid-template-columns: 1fr 1fr;
}

.dashboard-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 18px;
    color: #1a202c;
    margin: 0;
}

.card-subtitle {
    font-size: 13px;
    color: #9ca3af;
}

.view-all-link {
    color: #667eea;
    font-size: 14px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    color: #5568d3;
    transform: translateX(3px);
}

.card-body {
    padding: 24px;
}

/* Invoice List */
.invoice-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.invoice-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f9fafb;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid #f3f4f6;
}

.invoice-item:hover {
    background: #f3f4f6;
    transform: translateX(5px);
    border-color: #e5e7eb;
}

.invoice-info {
    flex: 1;
}

.invoice-number {
    font-weight: 600;
    color: #1a202c;
    font-size: 15px;
    margin-bottom: 4px;
}

.invoice-customer {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 2px;
}

.invoice-date {
    font-size: 12px;
    color: #9ca3af;
}

.invoice-amount {
    text-align: right;
}

.amount {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 4px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    color: #9ca3af;
    margin-bottom: 20px;
}

.btn-sm {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-sm:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    padding: 16px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #f3f4f6;
    background: #f9fafb;
}

.action-btn:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.action-btn.primary {
    border-color: #667eea20;
    background: linear-gradient(135deg, #667eea10, #764ba210);
}

.action-btn.primary:hover {
    border-color: #667eea;
}

.action-btn.success {
    border-color: #10b98120;
    background: #10b98108;
}

.action-btn.success:hover {
    border-color: #10b981;
}

.action-btn.info {
    border-color: #3b82f620;
    background: #3b82f608;
}

.action-btn.info:hover {
    border-color: #3b82f6;
}

.action-btn.warning {
    border-color: #f59e0b20;
    background: #f59e0b08;
}

.action-btn.warning:hover {
    border-color: #f59e0b;
}

.action-icon {
    font-size: 32px;
    margin-right: 16px;
}

.action-content {
    flex: 1;
}

.action-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 2px;
}

.action-desc {
    font-size: 13px;
    color: #6b7280;
}

.action-arrow {
    font-size: 20px;
    color: #9ca3af;
    transition: all 0.3s ease;
}

.action-btn:hover .action-arrow {
    transform: translateX(5px);
    color: #667eea;
}

/* Charts */
.chart-card canvas {
    max-height: 300px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid.two-column {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .irbm-status-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card {
    animation: fadeInUp 0.5s ease forwards;
}

.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; }
