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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 30px;
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2.5em;
    font-weight: 300;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 1em;
}

.back-link {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    margin-bottom: 20px;
    font-weight: 500;
}

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

.info-box, .warning-box, .success-box, .error-box {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.info-box { background: #e3f2fd; border-left: 4px solid #2196F3; color: #1565c0; }
.warning-box { background: #fff3cd; border-left: 4px solid #ffc107; color: #856404; }
.success-box { background: #d4edda; border-left: 4px solid #28a745; color: #155724; }
.error-box { background: #f8d7da; border-left: 4px solid #dc3545; color: #721c24; }

.login-section {
    max-width: 500px;
    margin: 40px auto;
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
}

textarea {
    min-height: 80px;
    resize: vertical;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.scratch-list {
    margin-top: 30px;
}

.scratch-item {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.scratch-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.scratch-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
}

.scratch-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
}

.scratch-content {
    flex: 1;
}

.task-text-display {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
}

.scratch-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 15px;
}

.due-date-badge, .urgency-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.due-date-badge { background: #e3f2fd; color: #1565c0; }
.urgency-urgent { background: #fee2e2; color: #991b1b; }
.urgency-not-urgent { background: #fed7aa; color: #92400e; }

.scratch-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: end;
}

.move-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    width: 100%;
}

.delete-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    width: 100%;
}

.bulk-actions {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: none;
}

.bulk-actions.visible {
    display: block;
}

.bulk-actions h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2em;
}

.bulk-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.bulk-controls select {
    flex: 1;
    min-width: 200px;
}

.bulk-controls button {
    flex-shrink: 0;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #667eea;
    font-style: italic;
}

.hidden {
    display: none !important;
}

.notes-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.notes-display {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    white-space: pre-wrap;
    color: #4b5563;
    font-size: 14px;
    margin-bottom: 10px;
}

.small-btn {
    padding: 6px 12px;
    font-size: 13px;
    background: #6c757d;
}

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

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 600px;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.modal-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-close-btn:hover {
    color: #333;
}

#processModalContent {
    position: relative;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .scratch-header {
        flex-direction: column;
    }
    
    .scratch-actions {
        grid-template-columns: 1fr;
    }
    
    .bulk-controls {
        flex-direction: column;
    }
    
    .bulk-controls select,
    .bulk-controls button {
        width: 100%;
    }
}