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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    height: 50px;
    width: auto;
}

.app-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
    flex-wrap: wrap;
}

nav a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

nav a:hover {
    background: #f1f1f1;
    color: #3498db;
}

/* Mobile Navigation */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background: #2c3e50;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
}

.card h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #219653;
    transform: translateY(-2px);
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
    min-width: 300px;
    margin-bottom: 30px;
}

.col-2 {
    flex: 0 0 50%;
    padding: 0 15px;
    margin-bottom: 30px;
}

.col-3 {
    flex: 0 0 33.333%;
    padding: 0 15px;
    margin-bottom: 30px;
}

/* Note Content */
.note-content {
    line-height: 1.6;
}

.note-content h1, .note-content h2, .note-content h3 {
    color: #2c3e50;
    margin: 20px 0 10px;
}

.note-content p {
    margin-bottom: 15px;
}

.note-content ul, .note-content ol {
    margin-bottom: 15px;
    padding-left: 20px;
}

.note-content li {
    margin-bottom: 5px;
}

/* Notes List */
.notes-list {
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
}

.note-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background 0.3s ease;
}

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

.note-item.active {
    background: #e3f2fd;
    border-left: 4px solid #3498db;
}

.note-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.note-meta {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.note-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

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

.stat-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.stat-card i {
    font-size: 2rem;
    color: #3498db;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
}

tr:hover {
    background-color: #f9f9f9;
}

/* Alert Messages */
.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d5f4e6;
    color: #27ae60;
    border: 1px solid #27ae60;
}

.alert-error {
    background: #fadbd8;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    padding: 20px 0;
    margin-top: 40px;
}

footer a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 20px;
    color: #3498db;
}

.loading i {
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    nav ul {
        flex-direction: column;
        width: 100%;
        display: none;
        margin-top: 15px;
    }
    
    nav ul.show {
        display: flex;
    }
    
    .menu-toggle {
        display: flex;
        position: absolute;
        top: 20px;
        right: 15px;
    }
    
    .col, .col-2, .col-3 {
        flex: 0 0 100%;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .note-actions {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .card {
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-control {
        padding: 10px;
    }
}