:root {
    --primary-bg: #FFFFFF;
    --secondary-bg: #F8F9FA;
    --border-color: #DADCE0;
    --text-main: #202124;
    --text-light: #5F6368;
    --accent: #1a73e8; /* Google Blue */
    --accent-hover: #1558d6; /* Darker Google Blue */
    --danger: #D93025;
    --danger-hover: #A50E0E;
    --card-bg: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', "Google Sans", Helvetica, Arial, sans-serif;
}

img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: auto; /* Let clicks pass but stop drag/select */
}

body {
    background-color: var(--primary-bg);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: var(--accent);
}

a:hover {
    text-decoration: underline;
}

/* Header Navbar */
.top-header {
    height: 64px;
    background-color: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand:hover {
    text-decoration: none !important;
}

.brand-icon {
    width: 24px;
    height: 24px;
    background-color: var(--accent);
    display: inline-block;
    mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2L2 7l10 5 10-5-10-5zm0 7.5L4.5 7l7.5 3.75L19.5 7 12 9.5zM2 17l10 5 10-5M2 12l10 5 10-5"/></svg>') no-repeat center;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="white" xmlns="http://www.w3.org/2000/svg"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/></svg>') no-repeat center;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-item:hover, .nav-item.active {
    color: var(--text-main);
    text-decoration: none;
}

/* User profile */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

/* Layout */
.main-wrapper {
    display: flex;
    flex-grow: 1;
    justify-content: center;
    background-color: var(--primary-bg);
}

.content-area {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
}

/* Buttons */
.btn {
    padding: 0.5rem 1.5rem;
    background-color: var(--accent);
    color: #FFF;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.25px;
    transition: background-color 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    border-radius: 100px; /* Google Material 3 pill shape */
}

.btn:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--accent);
    color: #FFF;
}

/* List View (Google Password Manager style) */
.list-container {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px; /* Google-style rounded corners for list container */
    margin-bottom: 2rem;
    overflow: hidden; /* Ensure list items don't overflow the rounded corners */
}

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

.list-header h3 {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-main);
}

.list-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
    text-decoration: none;
    color: var(--text-main);
    cursor: pointer;
}

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

.list-item:hover {
    background-color: var(--secondary-bg);
}

.list-item-icon {
    width: 24px;
    height: 24px;
    margin-right: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.list-item-content {
    flex-grow: 1;
    font-size: 0.95rem;
    font-weight: 400;
}

.list-item-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.list-item:hover .list-item-actions {
    opacity: 1;
}

.list-item-arrow {
    margin-left: 1rem;
    color: var(--text-light);
    font-size: 1.2rem;
    font-weight: 300;
}
.btn-secondary {
    background-color: transparent;
    color: var(--accent);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-bg);
    border-color: var(--border-color);
    color: var(--accent);
}

.btn-danger {
    background-color: var(--danger);
    color: #FFF;
    border: none;
}

.btn-danger:hover {
    background-color: var(--danger-hover);
}

/* Profile Dropdown */
.profile-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 130%;
    background-color: #FFF;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 1.5rem;
    width: 260px;
    z-index: 1000;
    text-align: center;
}

.profile-dropdown.show {
    display: block;
}

/* Desktop Nav default */
.mobile-menu-btn {
    display: none;
}
.curtain-menu {
    display: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    /* Header */
    .top-header {
        padding: 0 1rem;
        height: auto;
        padding-top: 1rem;
        padding-bottom: 1rem;
        justify-content: space-between;
    }
    
    .desktop-nav {
        display: none !important; /* Hide desktop nav and user info on mobile */
    }

    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        font-size: 2rem;
        color: var(--text-main);
        cursor: pointer;
    }

    /* Curtain Menu */
    .curtain-menu {
        display: block;
        height: 100%;
        width: 0; /* Starts hidden */
        position: fixed;
        z-index: 999;
        right: 0; /* Align to right */
        top: 0;
        background-color: #FFF;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1); /* Drawer shadow */
        overflow-x: hidden;
        transition: 0.3s;
    }
    
    .curtain-content {
        position: relative;
        top: 15%;
        width: 100%;
        text-align: left; /* Google style */
        padding: 0 1.5rem;
    }
    
    .curtain-menu a {
        padding: 1rem 0;
        text-decoration: none;
        font-size: 1.1rem;
        color: var(--text-main);
        display: block;
        transition: 0.2s;
        border-bottom: 1px solid var(--border-color);
    }
    
    .curtain-menu a:hover, .curtain-menu a:focus {
        color: var(--accent);
        background-color: var(--secondary-bg);
    }
    
    .curtain-menu .close-btn {
        position: absolute;
        top: 1rem;
        right: 1.5rem;
        font-size: 2.5rem;
        color: var(--text-light);
        padding: 0;
        border-bottom: none;
    }
    
    .curtain-menu .close-btn:hover {
        background-color: transparent;
        color: var(--text-main);
    }

    .content-area {
        padding: 1rem;
    }

    /* Dashboard Actions & Headers */
    .page-title {
        font-size: 1.5rem;
    }

    /* Layout Utilities for Mobile */
    .responsive-flex {
        flex-direction: column !important;
    }
    .responsive-flex-reverse {
        flex-direction: column-reverse !important;
    }
    .responsive-grid {
        grid-template-columns: 1fr !important;
    }
    .action-buttons {
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
    }
    
    .action-buttons .btn {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }

    /* List View adjustments */
    .list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .list-header form {
        width: 100% !important;
        margin: 0 !important;
    }
    
    .list-item {
        padding: 1rem;
    }

    .list-item-content {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px; /* Force ellipsis on small screens */
    }

    .list-item-actions {
        opacity: 1; /* Always show actions on mobile */
    }
    
    /* Login */
    .login-container {
        background-color: var(--primary-bg) !important;
    }
    .login-box {
        padding: 2rem 1.5rem !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }
}

/* Typography */
.page-title {
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    margin-top: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* Grids & Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    transition: box-shadow 0.2s, border-color 0.2s;
    border-radius: 0;
}

.card:hover {
    box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
    border-color: transparent;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.card-content {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.card-content strong {
    color: var(--text-light);
    font-weight: 500;
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
}

.card-content p {
    color: var(--text-main);
    margin-bottom: 0.75rem;
    word-break: break-all;
}

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

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

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

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    border-width: 2px;
    padding: calc(0.75rem - 1px) calc(1rem - 1px);
}

/* Login container */
.login-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FFF;
}

.login-box {
    background: transparent;
    padding: 3rem 2.5rem;
    border: none;
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.login-subtitle {
    color: var(--text-main);
    margin-bottom: 2rem;
}
