:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --danger: #f56565;
    --success: #48bb78;
    --warning: #ed8936;
    --info: #4299e1;
    --dark: #2d3748;
    --light: #f7fafc;
    --border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

.dashboard {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.sidebar {
    background: #1e293b;
    padding: 20px;
    border-right: 1px solid #334155;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #334155;
}

.logo i {
    font-size: 32px;
    color: var(--primary);
}

.logo-text h1 {
    font-size: 1.8em;
    color: white;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-text p {
    font-size: 0.75em;
    color: #94a3b8;
}

.nav-section {
    margin-bottom: 30px;
}

.nav-title {
    font-size: 0.75em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 5px;
    color: #cbd5e1;
}

.nav-item:hover, .nav-item.active {
    background: #334155;
    color: white;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.main-content {
    padding: 30px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 100vh;
    width: 100%;
    box-sizing: border-box;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header-left h2 {
    font-size: 2em;
    color: white;
    margin-bottom: 5px;
}

.header-left p {
    color: #94a3b8;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid #334155;
    color: #cbd5e1;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.stat-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.primary { background: rgba(102, 126, 234, 0.1); color: var(--primary); }
.stat-icon.danger { background: rgba(245, 101, 101, 0.1); color: var(--danger); }
.stat-icon.success { background: rgba(72, 187, 120, 0.1); color: var(--success); }
.stat-icon.warning { background: rgba(237, 137, 54, 0.1); color: var(--warning); }

.stat-value {
    font-size: 2.5em;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
}

.stat-label {
    color: #94a3b8;
    font-size: 0.9em;
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85em;
    margin-top: 10px;
}

.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 25px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #334155;
}

.card-title {
    font-size: 1.3em;
    color: white;
    font-weight: 600;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #334155;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.icon-btn:hover {
    background: #334155;
    color: white;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #cbd5e1;
    font-weight: 500;
    font-size: 0.9em;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 1px solid #334155;
    border-radius: 8px;
    font-size: 14px;
    background: #0f172a;
    color: white;
    transition: all 0.3s;
    box-sizing: border-box;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.transaction-list {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
}

.transaction-item {
    background: #0f172a;
    border: 1px solid #334155;
    border-left: 4px solid #334155;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    transition: all 0.3s;
}

.transaction-item:hover {
    transform: translateX(5px);
}

.transaction-item.fraud {
    border-left-color: var(--danger);
    background: rgba(245, 101, 101, 0.05);
}

.transaction-item.safe {
    border-left-color: var(--success);
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.transaction-id {
    font-weight: 600;
    color: white;
    font-size: 0.9em;
}

.score-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
}

.score-high {
    background: rgba(245, 101, 101, 0.2);
    color: #fca5a5;
}

.score-medium {
    background: rgba(237, 137, 54, 0.2);
    color: #fdba74;
}

.score-low {
    background: rgba(72, 187, 120, 0.2);
    color: #86efac;
}

.transaction-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-weight: 500;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.detail-value {
    color: #cbd5e1;
}

.alert-banner {
    background: rgba(245, 101, 101, 0.1);
    border: 1px solid var(--danger);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.alert-banner i {
    font-size: 24px;
    color: var(--danger);
}

.alert-content h4 {
    color: white;
    margin-bottom: 5px;
}

.alert-content p {
    color: #cbd5e1;
    font-size: 0.9em;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 1px solid #334155;
}

.tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab:hover {
    color: white;
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.metric-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #334155;
}

.metric-row:last-child {
    border-bottom: none;
}

.metric-label {
    color: #94a3b8;
}

.metric-value {
    color: white;
    font-weight: 600;
}

@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* Scrollbar Styling - Single Unified Style */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Footer Styles - Modern Redesign */
.dashboard-footer {
    margin-top: 50px;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.footer-wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    opacity: 0.1;
    clip-path: polygon(0 50%, 100% 0, 100% 100%, 0 100%);
}

.footer-content {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 40px;
    margin-top: 30px;
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.footer-logo i {
    font-size: 36px;
    color: #667eea;
}

.footer-logo-text h3 {
    color: white;
    font-size: 2em;
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.footer-logo-text p {
    color: #94a3b8;
    font-size: 0.85em;
    margin: 0;
}

.footer-description {
    color: #cbd5e1;
    line-height: 1.6;
    font-size: 0.95em;
}

.footer-section h4 {
    color: white;
    font-size: 1em;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.tech-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #cbd5e1;
    font-size: 0.9em;
    padding: 8px 12px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    border-left: 3px solid #667eea;
    transition: all 0.3s;
}

.tech-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(5px);
}

.tech-item i {
    color: #667eea;
    font-size: 1.1em;
}

.status-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #0f172a;
    border-radius: 8px;
    border: 1px solid #334155;
}

.status-label {
    color: #cbd5e1;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(72, 187, 120, 0.1);
    border-radius: 12px;
    font-size: 0.8em;
    color: #86efac;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #48bb78;
    box-shadow: 0 0 8px rgba(72, 187, 120, 0.6);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #334155 50%, transparent 100%);
    margin: 30px 0 20px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    font-size: 0.85em;
}

.footer-copyright {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-link {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-link:hover {
    color: #667eea;
    transform: translateY(-2px);
}

.footer-link i {
    font-size: 0.9em;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}
