:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --dark: #1e293b;
    --darker: #0f172a;
    --light: #f8fafc;
    --gray: #94a3b8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --card-bg: #1e293b;
    --sidebar-width: 260px;
}

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

body {
    background-color: var(--darker);
    color: var(--light);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--darker), var(--dark));
}

.login-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--light);
}

.login-header p {
    color: var(--gray);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--light);
}

.form-group input {
    padding: 0.75rem;
    border: 1px solid var(--secondary);
    border-radius: 6px;
    background: var(--dark);
    color: var(--light);
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.error-message {
    background: var(--danger);
    color: white;
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
}

/* App Layout */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    background: var(--dark);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--secondary);
}

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

.logo i {
    font-size: 1.5rem;
    color: var(--primary);
}

.logo h1 {
    font-size: 1.25rem;
    color: var(--light);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.main-content {
    display: flex;
    flex: 1;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    padding: 1.5rem 0;
    border-right: 1px solid var(--secondary);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--gray);
    text-decoration: none;
    transition: all 0.2s;
}

.nav-item:hover, .nav-item.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-right: 3px solid var(--primary);
}

.nav-item i {
    font-size: 1.25rem;
}

.content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.8rem;
    color: var(--light);
}

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

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 1.5rem;
    color: var(--primary);
}

.stat-info h3 {
    font-size: 1.5rem;
    color: var(--light);
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--gray);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.recent-section {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
}

.recent-section h2 {
    font-size: 1.25rem;
    color: var(--light);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--secondary);
}

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

.list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.list-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.list-item i {
    font-size: 1.25rem;
    color: var(--primary);
}

.item-info h4 {
    color: var(--light);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

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

.empty-state {
    color: var(--gray);
    text-align: center;
    padding: 2rem;
}

/* Icons */
.icon-cloud:before { content: "☁️"; }
.icon-file:before { content: "📄"; }
.icon-storage:before { content: "💾"; }
.icon-note:before { content: "📝"; }
.icon-image:before { content: "🖼️"; }
.icon-audio:before { content: "🎵"; }
.icon-video:before { content: "🎬"; }
.icon-folder:before { content: "📁"; }

/* Responsive */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        z-index: 100;
        transition: left 0.3s;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
}

/* Utility Functions */
.format-bytes {
    font-size: 0.875rem;
    color: var(--gray);
}

/* Notes Grid */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.note-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    transition: transform 0.2s;
}

.note-card:hover {
    transform: translateY(-2px);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.note-header h3 {
    color: var(--light);
    font-size: 1.1rem;
    margin-right: 1rem;
}

.note-date {
    color: var(--gray);
    font-size: 0.875rem;
    white-space: nowrap;
}

.note-content {
    color: var(--gray);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.note-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* Files List */
.files-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    transition: background 0.2s;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.file-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-icon i {
    font-size: 1.5rem;
    color: var(--primary);
}

.file-info {
    flex: 1;
}

.file-info h4 {
    color: var(--light);
    margin-bottom: 0.25rem;
}

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

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

/* Upload Area */
.upload-area {
    margin-bottom: 2rem;
}

.upload-dropzone {
    border: 2px dashed var(--secondary);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.upload-dropzone:hover {
    border-color: var(--primary);
}

.upload-dropzone i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.upload-dropzone p {
    color: var(--gray);
}

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

.modal-content {
    background: var(--card-bg);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.modal-header h2 {
    color: var(--light);
}

.modal-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--secondary);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.btn-close {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 1.5rem;
    cursor: pointer;
}

.btn-close:hover {
    color: var(--light);
}

/* Buttons */
.btn-icon {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-icon:hover {
    color: var(--light);
    background: rgba(255, 255, 255, 0.1);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #586576;
}

/* Utility */
.storage-info {
    display: flex;
    gap: 1rem;
    color: var(--gray);
    font-size: 0.875rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

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

/* Additional Icons */
.icon-add:before { content: "➕"; }
.icon-edit:before { content: "✏️"; }
.icon-delete:before { content: "🗑️"; }
.icon-download:before { content: "📥"; }
.icon-upload:before { content: "📤"; }
.icon-dashboard:before { content: "📊"; }
.icon-logout:before { content: "🚪"; }


/* Add to existing style.css */
.note-meta {
    display: flex;
    gap: 1rem;
    color: var(--gray);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.note-content-full {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.note-actions-full {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

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

.btn-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.btn-link:hover {
    text-decoration: underline;
}

.section-actions {
    margin-top: 1rem;
    text-align: right;
}

/* Additional Icons */
.icon-view:before { content: "👁️"; }
.icon-download:before { content: "📥"; }