:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --background-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    padding: 2rem 1rem;
}

/* Header Profile */
.header-profile {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.profile-avatar {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    margin-right: 1rem;
}

/* Cards */
.note-card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.note-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Clean Card Header */
.note-card h5 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.note-card .text-muted {
    color: var(--text-secondary) !important;
    font-size: 0.9rem;
    margin: 0.5rem 0 0 0;
}

/* Info Alert */
.alert-info {
    background-color: #ebf8ff;
    border: 1px solid #bee3f8;
    color: #2c5282;
    border-radius: 10px;
    font-size: 0.875rem;
}

/* Form Elements */
.form-label {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.form-control, .date-picker {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background-color: var(--card-bg);
}

.form-control:focus, .date-picker:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* Textarea */
.note-input {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    resize: vertical;
    min-height: 120px;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.note-input::placeholder {
    color: #a0aec0;
}

.note-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* Buttons */
.btn {
    border-radius: 10px;
    padding: 0.625rem 1.5rem;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    opacity: 0.95;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
    background: #cbd5e0;
}

.btn-light {
    background: rgba(255,255,255,0.95);
    color: var(--text-primary);
    font-weight: 500;
}

.btn-outline-light {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
}

.btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
}

/* Week Notes */
.week-note {
    background: var(--card-bg);
    border-left: 3px solid var(--primary-color);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
}

.day-label {
    background: var(--primary-gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* Summary Box */
.summary-box {
    background: var(--primary-gradient);
    color: white;
    border-radius: 16px;
    padding: 2rem;
    min-height: 350px;
    box-shadow: var(--shadow-md);
}

.summary-box h5 {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

.summary-box p {
    opacity: 0.9;
}

.summary-content {
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
    backdrop-filter: blur(10px);
}

.summary-text {
    line-height: 1.8;
    font-size: 0.9375rem;
}

.summary-text p {
    margin-bottom: 0.75rem;
}

.summary-text h3,
.summary-text h4,
.summary-text h5 {
    color: white;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.summary-text h3 {
    font-size: 1.25rem;
}

.summary-text h4 {
    font-size: 1.1rem;
}

.summary-text h5 {
    font-size: 1rem;
}

.summary-text strong {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.summary-text em {
    font-style: italic;
}

.summary-text ul,
.summary-text ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.summary-text li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.summary-text br {
    content: "";
    display: block;
    margin-bottom: 0.5rem;
}

/* Navigation Pills */
.nav-pills {
    background: var(--card-bg);
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.nav-pills .nav-link {
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    transition: all 0.2s ease;
}

.nav-pills .nav-link:hover {
    background-color: #f7fafc;
    color: var(--text-primary);
}

.nav-pills .nav-link.active {
    background: var(--primary-gradient);
    color: white;
}

/* Week Selector */
input[type="week"], input[type="date"] {
    cursor: pointer;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
    font-size: 0.9375rem;
}

.alert-success {
    background-color: #c6f6d5;
    color: #22543d;
}

.alert-danger {
    background-color: #fed7d7;
    color: #742a2a;
}

/* Spacing Utilities */
.p-4 {
    padding: 1.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

/* Icons */
i.fas, i.fa {
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .note-card {
        padding: 1.25rem !important;
    }
    
    .summary-box {
        padding: 1.5rem;
    }
    
    .header-profile {
        padding: 1rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background-color: rgba(102, 126, 234, 0.2);
    color: var(--text-primary);
}
