:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --dark: #1d3557;
    --light: #f8f9fa;
    --success: #4cc9f0;
    --danger: #f72585;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    padding: 15px;
}

#app {
    max-width: 1000px;
    margin: 0 auto;
}

/* Login Styles */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
}

.login-container h1 {
    margin-bottom: 25px;
    color: var(--primary);
}

.login-container input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.login-container button {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.login-container button:hover {
    background: var(--secondary);
}

.note {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}

/* App Layout */
header {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

header h1 {
    flex: 1;
    color: var(--primary);
}

.search-container {
    display: flex;
    flex: 2;
    gap: 10px;
}

.search-container input, .search-container select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

#logout {
    background: var(--danger);
    color: white;
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #666;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
    font-weight: bold;
}

.add-btn {
    background: var(--success);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 15px;
    display: inline-block;
}

.entries {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.entry-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.entry-card:hover {
    transform: translateY(-3px);
}

.entry-card h3 {
    margin-bottom: 8px;
    color: var(--primary);
}

.entry-card p {
    color: #555;
    margin-bottom: 10px;
}

.entry-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.entry-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #666;
}

.entry-actions button:hover {
    color: var(--primary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    padding: 25px;
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
}

#entry-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

#entry-form input, #entry-form textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

#entry-form textarea {
    min-height: 100px;
    resize: vertical;
}

.preview {
    margin-top: 15px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    background: #f9f9f9;
}

/* Responsive */
@media (max-width: 768px) {
    .entries {
        grid-template-columns: 1fr;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .tab-btn {
        flex: 1;
    }
}