/* Day 2 Enhanced Styles */

/* Reset dan Base 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, #f5f7ff 0%, #eef2ff 100%);
    min-height: 100vh;
}

.app-container {
    max-width: 1200px;
    margin: 2rem auto;
    background: white;
    min-height: calc(100vh - 4rem);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    overflow: hidden;
}

/* Header Styles */
.app-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2.25rem 1.5rem;
    text-align: center;
}

.header-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.05rem;
    opacity: 0.95;
    margin-bottom: 1.5rem;
}

.user-section {
    max-width: 420px;
    margin: 0 auto;
}

.login-section {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
}

.login-section input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

#welcomeMessage {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Messages */
.messages-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1200;
    max-width: 420px;
}

.message {
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    animation: slideIn 0.3s ease-out;
}

.message-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.message-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.message-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Main Content */
.main-content {
    padding: 2rem;
}

/* Sections */
section {
    margin-bottom: 3rem;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 6px 30px rgba(16, 24, 40, 0.03);
    border: 1px solid #eef2f7;
}

section h2 {
    color: #495057;
    margin-bottom: 1.2rem;
    font-size: 1.4rem;
    font-weight: 700;
}

/* Stats Section */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.25rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #e6e9ef;
    transition: all 0.25s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.stat-item.priority-high .stat-number {
    color: #dc3545;
}

/* Quick Actions and Forms */
.quick-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.task-form {
    display: grid;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

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

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.08);
}

.form-group textarea {
    resize: vertical;
    min-height: 90px;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(102, 126, 234, 0.16); }

.btn-secondary { background-color: #6c757d; color: white; }
.btn-secondary:hover { background-color: #5a6268; transform: translateY(-1px); }

.btn-outline { background: transparent; border: 2px solid #667eea; color: #667eea; }
.btn-outline:hover { background: #667eea; color: white; }

.btn-danger { background-color: #dc3545; color: white; }
.btn-danger:hover { background-color: #c82333; }

.btn-warning { background-color: #ffc107; color: #212529; }
.btn-info { background-color: #17a2b8; color: white; }

.btn-large { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-toggle { background-color: #28a745; color: white; height: 40px; }
.btn-edit { background-color: #ffc107; color: #212529; height: 40px; }
.btn-delete { background-color: #dc3545; color: white; height: 40px; }

/* Search and Filter */
.search-filter-section { background: #f8f9fa; padding: 1rem; border-radius: 8px; }
.search-controls { display: flex; gap: 0.75rem; margin-bottom: 1rem; }
.search-input { flex: 1; padding: 0.75rem; border-radius: 8px; border: 1px solid #e9ecef; }
.sort-select { padding: 0.75rem; min-width: 200px; }

.filter-groups { display: grid; gap: 1rem; }
.filter-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filter-btn { padding: 0.5rem 0.9rem; border: 1px solid #e9ecef; background: white; border-radius: 6px; }
.filter-btn:hover { border-color: #667eea; color: #667eea; }
.filter-btn.active { background-color: #667eea; color: white; border-color: #667eea; }

/* Tasks Section */
.tasks-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.tasks-actions { display: flex; gap: 0.75rem; }
.task-list { display: grid; gap: 1rem; }

.task-item { background: white; border: 1px solid #eef2f7; border-radius: 10px; padding: 1rem; display: flex; gap: 1rem; align-items: flex-start; border-left: 6px solid #eef2f7; transition: all 0.18s ease; }
.task-item:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06); }

.task-item.priority-urgent { border-left-color: #dc3545; background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%); }
.task-item.priority-high { border-left-color: #fd7e14; background: linear-gradient(135deg, #fff8f0 0%, #ffffff 100%); }
.task-item.priority-medium { border-left-color: #ffc107; }
.task-item.priority-low { border-left-color: #28a745; }

.task-item.status-completed { opacity: 0.75; }
.task-item.status-completed .task-title { text-decoration: line-through; color: #6c757d; }

.task-content { flex: 1; }
.task-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.task-title { font-size: 1.15rem; font-weight: 700; color: #222; margin: 0; }

.task-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.task-badges span { padding: 0.25rem 0.6rem; border-radius: 999px; font-size: 0.75rem; text-transform: uppercase; }

.badge-urgent { background-color: #f8d7da; color: #721c24; }
.badge-high { background-color: #ffeaa7; color: #856404; }
.badge-medium { background-color: #fff3cd; color: #856404; }
.badge-low { background-color: #d4edda; color: #155724; }
.badge-category { background-color: #e2e3e5; color: #495057; }
.badge-status { background-color: #d1ecf1; color: #0c5460; }

.task-description { color: #6c757d; line-height: 1.6; margin: 0.5rem 0; }
.task-tags { display: flex; gap: 0.5rem; margin: 0.5rem 0; }
.tag { background-color: #f8f9fa; border: 1px solid #dee2e6; padding: 0.25rem 0.5rem; border-radius: 6px; font-size: 0.85rem; }

.task-meta { display: flex; gap: 1rem; margin-top: 0.5rem; align-items: center; }
.task-meta small { color: #6c757d; font-size: 0.85rem; }
.overdue-text { color: #dc3545 !important; font-weight: 700; }

.task-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

/* Empty State */
.empty-state { text-align: center; color: #6c757d; padding: 2rem; }
.empty-state p { font-size: 1.2rem; font-weight: 600; }

/* Modal */
.modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 2000; }
.modal-content { background: white; width: min(720px, 95%); border-radius: 10px; box-shadow: 0 20px 60px rgba(2, 6, 23, 0.2); overflow: hidden; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid #eef2f7; }
.modal-form { padding: 1.25rem; }
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; padding: 1rem 1.25rem; }

/* Footer */
.app-footer { background-color: #f8f9fa; padding: 1rem; border-top: 1px solid #eef2f7; text-align: center; }
.app-footer p { margin: 0; color: #6c757d; }

/* Responsive Design */
@media (max-width: 768px) {
    .app-container { margin: 1rem; }
    .header-content h1 { font-size: 1.75rem; }
    .main-content { padding: 1rem; }
    .task-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

@media (max-width: 480px) {
    .header-content h1 { font-size: 1.5rem; }
    .stat-number { font-size: 1.6rem; }
}

/* Utility */
.text-center { text-align: center; }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }

/* ============================================
   UI IMPROVEMENTS - Day 4
   ============================================ */

/* Smooth transitions untuk task items */
.task-item {
    transition: all 0.3s ease;
}

/* Hover effect untuk task cards */
.task-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Improve button styling */
.btn {
    transition: all 0.2s ease;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

/* Better priority badges */
.task-priority {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Improve form inputs */
input[type="text"],
input[type="email"],
textarea,
select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* Loading state untuk buttons */
.btn.loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn.loading::after {
    content: "...";
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Better message notifications */
.message {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Button Improvements - Version 1 */
.btn-primary {
    background-color: #667eea;
    border-radius: 8px;
    font-weight: 600;
}

.btn-secondary {
    background-color: #6c757d;
    border-radius: 8px;
}