:root {
    /* NEW LIGHT THEME COLORS */
    --primary-blue: #4169E1;
    --primary-blue-hover: #3557C7;
    --bg-light: #FFFFFF;
    --bg-page: #F5F7FA;
    --bg-card: #FFFFFF;
    --text-dark: #1A1A1A;
    --text-gray: #6B7280;
    --text-light: #9CA3AF;
    --border-light: #E5E7EB;
    --border-active: #4169E1;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --sidebar-width: 80px;
    --topbar-height: 70px;
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-page);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* SIDEBAR NAVIGATION */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-light);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.sidebar-overlay.active {
    display: block;
}

.sidebar-item {
    width: 100%;
    padding: 1rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-gray);
    font-size: 1.5rem;
    transition: all 0.2s;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.sidebar-item:hover,
.sidebar-item.active {
    color: var(--primary-blue);
    border-left-color: var(--primary-blue);
    background: rgba(65, 105, 225, 0.05);
}

.sidebar-logout {
    margin-top: auto;
    color: var(--text-gray);
}

.sidebar-logout:hover {
    color: #EF4444;
}

/* TOP NAVIGATION BAR */
.top-navbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 999;
}

.hamburger-menu {
    display: none;
}

.navbar-logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.navbar-logo strong {
    color: var(--primary-blue);
}

.navbar-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.navbar-menu a {
    color: var(--text-gray);
    font-weight: 500;
    transition: color 0.2s;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid transparent;
}

.navbar-menu a:hover {
    color: var(--primary-blue);
}

.navbar-menu a.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

/* MAIN LAYOUT */
.main-wrapper {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    min-height: calc(100vh - var(--topbar-height));
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* SEARCH BAR */
.search-bar {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--bg-light);
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.1);
}

/* STATISTICS CARDS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: box-shadow 0.2s;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius);
    background: rgba(65, 105, 225, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.stat-info p {
    color: var(--text-gray);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* FILTER TABS */
.filter-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--bg-light);
    color: var(--text-gray);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tab:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.filter-tab.active {
    border-color: var(--primary-blue);
    background: rgba(65, 105, 225, 0.05);
    color: var(--primary-blue);
}

/* PASSWORD LIST */
.category-section {
    margin-bottom: 2.5rem;
}

.category-header {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
}

.password-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.password-item {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
}

.password-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-blue);
}

.password-item.selected {
    border-color: var(--primary-blue);
    background: rgba(65, 105, 225, 0.03);
}

.password-item-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.password-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: var(--bg-page);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-gray);
    flex-shrink: 0;
}

.password-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}

.password-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.password-info p {
    font-size: 0.875rem;
    color: var(--text-gray);
}

.password-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-page);
    color: var(--text-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

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

/* MODAL/POPUP */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 2000;
}

.modal-overlay.active {
    display: block;
}

.modal-panel {
    position: fixed;
    top: 0;
    right: -500px;
    width: 500px;
    height: 100vh;
    background: var(--bg-light);
    box-shadow: var(--shadow-lg);
    transition: right 0.3s ease;
    z-index: 2001;
    overflow-y: auto;
    padding: 2rem;
}

.modal-panel.active {
    right: 0;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-gray);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--bg-page);
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    background: var(--primary-blue);
    color: white;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 1rem;
}

.btn:hover {
    background: var(--primary-blue-hover);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-dark);
}

.btn-outline:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: rgba(65, 105, 225, 0.03);
}

.btn-danger {
    background: #EF4444;
}

.btn-danger:hover {
    background: #DC2626;
}

/* FORMS */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border-radius: var(--radius);
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    color: var(--text-dark);
    font-size: 1rem;
    transition: border-color 0.2s;
    font-family: var(--font-main);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.1);
}

.form-control::placeholder {
    color: var(--text-light);
}

select.form-control {
    cursor: pointer;
}

/* PASSWORD INPUT WITH TOGGLE */
.password-input-wrapper {
    position: relative;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-gray);
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle-btn:hover {
    color: var(--primary-blue);
}

/* PASSWORD GENERATOR */
.password-generator {
    background: var(--bg-page);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-light);
}

.password-generator h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.generator-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slider-input {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--border-light);
    outline: none;
    appearance: none;
}

.slider-input::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-blue);
    cursor: pointer;
}

.slider-input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-blue);
    cursor: pointer;
    border: none;
}

.checkbox-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* SETTINGS ACCORDION */
.accordion {
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-light);
}

.accordion-item {
    border-bottom: 1px solid var(--border-light);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    padding: 1.25rem 1.5rem;
    background: var(--bg-light);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
    font-weight: 500;
    color: var(--text-dark);
}

.accordion-header:hover {
    background: var(--bg-page);
}

.accordion-header.active {
    background: rgba(65, 105, 225, 0.05);
    color: var(--primary-blue);
}

.accordion-icon {
    transition: transform 0.3s;
    font-size: 1.25rem;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--bg-light);
}

.accordion-content.active {
    max-height: 1000px;
    padding: 1.5rem;
    border-top: 1px solid var(--border-light);
}

/* AUTH PAGES (Login/Signup) */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-page);
}

.auth-card {
    width: 100%;
    max-width: 450px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-md);
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.auth-logo p {
    color: var(--text-gray);
    margin-top: 0.5rem;
}

/* CARDS */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
}

.card-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* UTILITIES */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.flex {
    display: flex;
    gap: 1rem;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.items-center {
    align-items: center;
}

.text-danger {
    color: #EF4444;
}

.text-success {
    color: #22C55E;
}

.text-muted {
    color: var(--text-gray);
}

.error-message {
    background: #FEE2E2;
    border: 1px solid #FCA5A5;
    padding: 0.75rem;
    border-radius: var(--radius);
    color: #DC2626;
    margin-bottom: 1rem;
}

.success-message {
    background: #D1FAE5;
    border: 1px solid #6EE7B7;
    padding: 0.75rem;
    border-radius: var(--radius);
    color: #059669;
    margin-bottom: 1rem;
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-gray);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.empty-state h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* LOADING SPINNER */
.spinner {
    border: 3px solid var(--border-light);
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

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

/* NOTIFICATIONS */
.notification {
    position: fixed;
    top: 90px;
    right: 20px;
    background: #22C55E;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1001;
        width: 250px;
    }

    .sidebar.collapsed {
        transform: translateX(0);
    }

    .top-navbar {
        left: 0;
        padding: 0 1rem;
    }
    
    .main-wrapper {
        margin-left: 0;
        margin-top: var(--topbar-height);
    }
    
    .hamburger-menu {
        display: block;
        cursor: pointer;
        font-size: 1.5rem;
        color: var(--text-gray);
    }
    
    .navbar-menu {
        display: none;
    }
    
    .navbar-user span {
        display: none;
    }

    .container {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .modal-panel {
        width: 100%;
        right: -100%;
    }

    .modal-panel.active {
        right: 0;
    }

    .filter-tabs {
        gap: 0.5rem;
    }

    .filter-tab {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .auth-card {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .password-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .password-actions {
        margin-top: 0.75rem;
        width: 100%;
        justify-content: flex-end;
    }
}
