:root {
    --primary: #06b6d4;
    --primary-hover: #0891b2;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.75);
    --border: rgba(6, 182, 212, 0.25);
    --text-main: #cbd5e1;
    --text-muted: #94a3b8;
    --glass-bg: rgba(15, 23, 42, 0.85);
}

body {
    /* Background handled by particle_background.php */
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    min-height: 100vh;
}

/* Header & Nav */
.header-modern {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(6, 182, 212, 0.2);
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.nav-link {
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(6, 182, 212, 0.1);
    color: #06b6d4;
    border: 1px solid rgba(6, 182, 212, 0.1);
}

/* Dashboard Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        padding: 1rem;
        gap: 1.5rem;
    }

    .sidebar-panel {
        position: relative;
        top: auto;
        padding: 1rem;
    }

    .header-modern {
        padding: 0.75rem 0;
    }

    .header-modern .max-w-\[1600px\] {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .stats-row {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 1rem;
    }

    .modern-stat-card {
        padding: 1rem;
    }

    .stat-value-big {
        font-size: 1.8rem;
    }

    .password-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .password-list-header {
        padding: 0.75rem 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .widget-card {
        padding: 1rem;
    }

    .widget-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .dashboard-grid {
        padding: 0.75rem;
        gap: 1rem;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .modern-stat-card {
        padding: 0.75rem;
    }

    .stat-value-big {
        font-size: 1.4rem;
    }

    .password-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .pass-card-modern {
        padding: 1rem;
    }

    .action-btn-icon {
        padding: 0.4rem;
        min-width: 40px;
        min-height: 40px;
    }

    .password-list-header {
        padding: 0.5rem;
    }

    .widget-card {
        padding: 0.75rem;
    }

    .sidebar-panel {
        padding: 0.75rem;
    }
}

/* Sidebar Panel */
.sidebar-panel {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 100px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Main Content Area */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Stats Cards */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.modern-stat-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: 14px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modern-stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 10px 40px rgba(6, 182, 212, 0.1);
}

.stat-icon-bg {
    position: absolute;
    right: -10px;
    bottom: -15px;
    font-size: 6rem;
    opacity: 0.05;
    transform: rotate(-15deg);
    filter: blur(2px);
}

.stat-value-big {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin: 0.5rem 0;
    /* Gradient text effect */
    background: linear-gradient(135deg, #e2e8f0, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Widgets Grid */
.widget-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Password List Header */
.password-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    background: rgba(30, 41, 59, 0.4);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(6, 182, 212, 0.1);
    backdrop-filter: blur(5px);
}

/* Password Cards */
.password-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.pass-card-modern {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.pass-card-modern:hover {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
    border-color: rgba(6, 182, 212, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.pass-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(59, 130, 246, 0.1));
    color: #06b6d4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.pass-title {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pass-subtitle {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pass-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.action-btn-icon {
    padding: 0.5rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn-icon:hover {
    background: rgba(6, 182, 212, 0.1);
    color: #06b6d4;
    transform: scale(1.1);
}

/* Custom Scrollbar for nicer look */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #334155;
}