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

:root {
    /* Base Colors */
    --bg-dark: #020617;
    /* Slate 950 */
    --bg-card: rgba(15, 23, 42, 0.6);
    /* Slate 900 / 60 */
    --bg-hover: rgba(30, 41, 59, 0.5);
    /* Slate 800 / 50 */

    /* Neon Accents */
    --cyan: #06b6d4;
    --cyan-glow: rgba(6, 182, 212, 0.5);

    --amber: #f59e0b;
    --amber-glow: rgba(245, 158, 11, 0.5);

    --red: #ef4444;
    --red-glow: rgba(239, 68, 68, 0.5);

    --purple: #a855f7;
    --purple-glow: rgba(168, 85, 247, 0.5);

    --green: #22c55e;
    --green-glow: rgba(34, 197, 94, 0.5);

    /* Text */
    --text-main: #f8fafc;
    /* Slate 50 */
    --text-muted: #94a3b8;
    /* Slate 400 */
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Canvas */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at top right, #1e1b4b 0%, #020617 100%);
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-out;
}

.spinner-box {
    position: relative;
    width: 100px;
    height: 100px;
}

.spin-ring {
    position: absolute;
    inset: 0;
    border: 4px solid transparent;
    border-radius: 50%;
    animation: spin 3s linear infinite;
}

.spin-ring.one {
    border-top-color: var(--amber);
}

.spin-ring.two {
    inset: 10px;
    border-right-color: var(--red);
    animation-duration: 4s;
}

.spin-ring.three {
    inset: 20px;
    border-bottom-color: var(--cyan);
    animation-duration: 2s;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 20px;
    color: var(--amber);
    font-family: monospace;
    letter-spacing: 2px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    padding: 20px;
    gap: 20px;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-icon {
    font-size: 24px;
    color: var(--cyan);
    filter: drop-shadow(0 0 8px var(--cyan-glow));
}

.brand-text h2 {
    font-size: 1.2rem;
    background: linear-gradient(to right, var(--red), var(--amber));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.nav-links {
    list-style: none;
    flex: 1;
}

.nav-item {
    margin-bottom: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: #fff;
    background: var(--bg-hover);
}

.nav-link.active {
    background: rgba(6, 182, 212, 0.1);
    color: var(--cyan);
    border-left: 3px solid var(--cyan);
}

.nav-link i {
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 1600px;
}

/* Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px 24px;
    border-radius: 16px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.search-bar input {
    background: transparent;
    border: none;
    color: #fff;
    margin-left: 10px;
    outline: none;
    width: 200px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    position: relative;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: #fff;
}

.notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--cyan);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-dark), #333);
    border: 1px solid var(--border-color, #444);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan);
}

/* Metric Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.metric-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
}

.metric-card:hover {
    transform: translateY(-2px);
}

/* Dynamic Glow for Cards */
.metric-card::before {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.2;
    z-index: 0;
}

.metric-card.cyan::before {
    background: var(--cyan);
    border-top: 1px solid var(--cyan);
}

.metric-card.amber::before {
    background: var(--amber);
    border-top: 1px solid var(--amber);
}

.metric-card.red::before {
    background: var(--red);
    border-top: 1px solid var(--red);
}

.metric-card.green::before {
    background: var(--green);
    border-top: 1px solid var(--green);
}

/* Border top hack for quick colored top border */
.metric-card.cyan {
    border-top: 2px solid rgba(6, 182, 212, 0.3);
}

.metric-card.amber {
    border-top: 2px solid rgba(245, 158, 11, 0.3);
}

.metric-card.red {
    border-top: 2px solid rgba(239, 68, 68, 0.3);
}

.metric-card.green {
    border-top: 2px solid rgba(34, 197, 94, 0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.card-title {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.card-icon {
    font-size: 1.2rem;
}

.cyan .card-icon {
    color: var(--cyan);
}

.amber .card-icon {
    color: var(--amber);
}

.red .card-icon {
    color: var(--red);
}

.green .card-icon {
    color: var(--green);
}

.card-value {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
    background: linear-gradient(to bottom, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(30, 41, 59, 0.6);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.1);
}

.action-icon {
    font-size: 1.5rem;
    color: var(--text-main);
}

/* Recent Activity */
.activity-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-main);
}

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

.activity-table th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.activity-table td {
    padding: 16px 0;
    color: var(--text-main);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--amber);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-approved {
    background: rgba(6, 182, 212, 0.1);
    color: var(--cyan);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.status-rejected {
    background: rgba(239, 68, 68, 0.1);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-validated {
    background: rgba(34, 197, 94, 0.1);
    color: var(--green);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        height: 100%;
        z-index: 100;
    }

    .sidebar.active {
        left: 0;
    }

    .header-actions .search-bar input {
        width: 100px;
    }
}