/* ===================================
   SIMADESA Demo Pages Stylesheet
   Modern Design System for Demo
   =================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    --font-primary: 'Plus Jakarta Sans', sans-serif;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-primary);
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Demo Header Banner */
.demo-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: var(--shadow-lg);
}

.demo-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.demo-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 24px;
    flex-wrap: wrap;
}

.demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.demo-banner p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}

.btn-back {
    padding: 8px 20px;
    background: white;
    color: var(--primary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Layout */
.sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    width: 280px;
    background: white;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    z-index: 100;
    overflow-y: auto;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-icon svg {
    width: 26px;
    height: 26px;
    color: white;
}

.logo-section h1 {
    font-size: 20px;
    font-weight: 800;
    color: var(--gray-900);
}

.logo-section p {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    padding: 16px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 4px;
    transition: var(--transition);
    font-weight: 500;
    font-size: 15px;
}

.nav-item:hover {
    background: var(--gray-50);
    color: var(--primary);
}

.nav-item.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-profile {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-900);
}

.user-role {
    font-size: 12px;
    color: var(--gray-500);
}

.btn-logout {
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-logout svg {
    width: 20px;
    height: 20px;
    color: var(--gray-700);
}

/* Main Content */
.main-content {
    margin-left: 280px;
    margin-top: 60px;
    min-height: calc(100vh - 60px);
    transition: var(--transition);
}

.sidebar.collapsed ~ .main-content {
    margin-left: 0;
}

.topbar {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 60px;
    z-index: 50;
}

.btn-menu {
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-menu svg {
    width: 20px;
    height: 20px;
    color: var(--gray-700);
}

.topbar h2 {
    flex: 1;
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

.topbar-actions {
    display: flex;
    gap: 12px;
}

.btn-icon {
    width: 44px;
    height: 44px;
    background: var(--gray-100);
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

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

.btn-icon svg {
    width: 22px;
    height: 22px;
    color: var(--gray-700);
}

.badge-notification {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.content-wrapper {
    padding: 24px;
    max-width: 1600px;
}

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 32px;
    color: white;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-xl);
}

.welcome-card h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
}

.welcome-card p {
    font-size: 16px;
    opacity: 0.9;
}

.welcome-date {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-weight: 600;
}

.welcome-date svg {
    width: 20px;
    height: 20px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 2px solid var(--gray-100);
    transition: var(--transition);
    display: flex;
    gap: 20px;
}

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

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-primary .stat-icon {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.stat-warning .stat-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-success .stat-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-info .stat-icon {
    background: rgba(6, 182, 212, 0.1);
    color: var(--info);
}

.stat-icon svg {
    width: 28px;
    height: 28px;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-change {
    font-size: 13px;
    color: var(--gray-600);
    font-weight: 500;
}

.stat-change.positive {
    color: var(--success);
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.chart-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 2px solid var(--gray-100);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 24px;
}

.chart-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.chart-header p {
    font-size: 14px;
    color: var(--gray-500);
}

.chart-select {
    padding: 8px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: var(--transition);
}

.chart-select:focus {
    outline: none;
    border-color: var(--primary);
}

.chart-container {
    height: 300px;
    position: relative;
}

/* Table Card */
.table-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 2px solid var(--gray-100);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 24px;
    flex-wrap: wrap;
}

.table-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.table-header p {
    font-size: 14px;
    color: var(--gray-500);
}

.table-actions {
    display: flex;
    gap: 12px;
}

.search-input {
    padding: 10px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-family: var(--font-primary);
    font-size: 14px;
    color: var(--gray-700);
    transition: var(--transition);
    min-width: 250px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--gray-100);
    border: none;
    border-radius: 10px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-filter svg {
    width: 18px;
    height: 18px;
}

.table-responsive {
    overflow-x: auto;
    margin: 0 -24px;
    padding: 0 24px;
}

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

.data-table thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 16px;
    font-size: 14px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

.data-table tbody tr {
    transition: var(--transition);
}

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

.status-badge {
    display: inline-flex;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-menunggu {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-diproses {
    background: rgba(6, 182, 212, 0.1);
    color: var(--info);
}

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

.status-ditolak {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-action {
    width: 36px;
    height: 36px;
    background: var(--gray-100);
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-action:hover svg {
    color: white;
}

.btn-action.btn-success:hover {
    background: var(--success);
}

.btn-action svg {
    width: 18px;
    height: 18px;
    color: var(--gray-600);
}

.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid var(--gray-100);
}

.table-pagination p {
    font-size: 14px;
    color: var(--gray-600);
}

.pagination {
    display: flex;
    gap: 8px;
}

.page-btn {
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border: none;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: var(--transition);
}

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

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

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: var(--gray-900);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-xl);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 2000;
    max-width: 400px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .demo-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .welcome-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .table-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .search-input {
        width: 100%;
    }
    
    .table-pagination {
        flex-direction: column;
        gap: 16px;
    }
}
