/* assets/css/style.css */

/* Base Styles */
:root {
    --primary-color: #3F51B5;
    --primary-dark: #303F9F;
    --accent-color: #FF4081;
    --text-color: #212121;
    --text-secondary: #757575;
    --background-light: #F5F5F5;
    --error-color: #F44336;
    --success-color: #4CAF50;
    --border-color: #BDBDBD;
}

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

body {
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 500;
    line-height: 1.2;
}

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

a:hover {
    text-decoration: underline;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="email"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    text-align: center;
}

.btn:hover {
    opacity: 0.9;
}

.btn:active {
    transform: translateY(1px);
}

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

.btn-success {
    background-color: var(--success-color);
    color: white;
}

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

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-error {
    background-color: #FFEBEE;
    color: var(--error-color);
    border: 1px solid #FFCDD2;
}

.alert-success {
    background-color: #E8F5E9;
    color: var(--success-color);
    border: 1px solid #C8E6C9;
}

/* Authentication Forms */
.auth-form {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.auth-form h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.auth-form .btn {
    width: 100%;
    padding: 0.75rem;
}

.auth-form p {
    text-align: center;
    margin-top: 1rem;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    height: calc(100vh - 120px);
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.sidebar {
    width: 300px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

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

.search-box {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.search-box input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.notes-list {
    list-style: none;
    overflow-y: auto;
    flex-grow: 1;
}

.note-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.note-item:hover {
    background-color: #f9f9f9;
}

.note-item.active {
    background-color: #E8EAF6;
    border-left: 4px solid var(--primary-color);
}

.note-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.note-preview {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.note-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.note-editor {
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.editor-toolbar input {
    font-size: 1.25rem;
    border: none;
    flex-grow: 1;
    margin-right: 1rem;
    padding: 0.5rem 0;
}

.editor-toolbar input:focus {
    outline: none;
}

.toolbar-actions button {
    margin-left: 0.5rem;
}

#noteContent {
    flex-grow: 1;
    border: none;
    padding: 1rem;
    resize: none;
    font-size: 1rem;
    line-height: 1.6;
}

#noteContent:focus {
    outline: none;
}

.note-status {
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Header and Navigation */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    margin-bottom: 1rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 500;
    color: white;
    text-decoration: none;
}

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

.nav-links li {
    margin-left: 1.5rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
}

.nav-links a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
        height: auto;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        max-height: 300px;
    }
    
    .content {
        height: calc(100vh - 420px);
    }
}

@media (max-width: 576px) {
    .auth-form {
        margin: 1rem auto;
        padding: 1rem;
    }
    
    .editor-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-actions {
        margin-top: 0.5rem;
        display: flex;
        justify-content: space-between;
    }
    
    .editor-toolbar input {
        margin-right: 0;
    }
}

/* Empty states */
.empty-notes {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}