:root {
    --primary: #4361ee;
    --primary-light: #4895ef;
    --secondary: #3f37c9;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #f8961e;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --border-radius: 12px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
    color: var(--primary);
    background: white;
    padding: 15px;
    border-radius: 50%;
    box-shadow: var(--shadow);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

.app-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    height: 70vh;
    min-height: 600px;
}

@media (max-width: 992px) {
    .app-container {
        grid-template-columns: 1fr;
        height: auto;
    }
}

.form-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.form-container h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    color: var(--primary);
    font-weight: 600;
}

.form-container h2 i {
    background: var(--primary-light);
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
    font-size: 0.95rem;
}

input, select, textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.btn {
    padding: 14px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(67, 97, 238, 0.3);
}

.btn-secondary {
    background: var(--gray-light);
    color: var(--dark);
}

.btn-secondary:hover {
    background: var(--gray);
    color: white;
}

.content-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tabs {
    display: flex;
    background: var(--light);
    border-bottom: 1px solid var(--gray-light);
    flex-shrink: 0;
}

.tab {
    flex: 1;
    padding: 18px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--gray);
}

.tab:hover {
    background: rgba(255, 255, 255, 0.7);
    color: var(--primary);
}

.tab.active {
    background: white;
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

.tab-badge {
    background: var(--gray-light);
    color: var(--dark);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tab.active .tab-badge {
    background: var(--primary-light);
    color: white;
}

.table-container {
    overflow: auto;
    flex-grow: 1;
    position: relative;
}

table {
    width: 100%;
    border-collapse: collapse;
    position: relative;
}

thead {
    background: var(--light);
    position: sticky;
    top: 0;
    z-index: 10;
}

th, td {
    padding: 18px 20px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

th {
    font-weight: 600;
    color: var(--gray);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: rgba(67, 97, 238, 0.03);
}

.completed td:not(:last-child) {
    text-decoration: line-through;
    color: var(--gray);
}

.importance-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.importance-5 {
    background: rgba(247, 37, 133, 0.1);
    color: var(--danger);
}

.importance-4 {
    background: rgba(248, 150, 30, 0.1);
    color: var(--warning);
}

.importance-3 {
    background: rgba(76, 201, 240, 0.1);
    color: var(--success);
}

.importance-2 {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
}

.importance-1 {
    background: rgba(108, 117, 125, 0.1);
    color: var(--gray);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.complete-btn {
    background: rgba(76, 201, 240, 0.1);
    color: var(--success);
}

.complete-btn:hover {
    background: var(--success);
    color: white;
    transform: scale(1.05);
}

.delete-btn {
    background: rgba(247, 37, 133, 0.1);
    color: var(--danger);
}

.delete-btn:hover {
    background: var(--danger);
    color: white;
    transform: scale(1.05);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.total-tasks .stat-value {
    color: var(--primary);
}

.completed-tasks .stat-value {
    color: var(--success);
}

.pending-tasks .stat-value {
    color: var(--warning);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
    font-weight: 500;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--gray-light);
}

.empty-state h3 {
    font-weight: 500;
    margin-bottom: 10px;
}

.deadline-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.deadline-urgent {
    background: rgba(247, 37, 133, 0.1);
    color: var(--danger);
}

.deadline-near {
    background: rgba(248, 150, 30, 0.1);
    color: var(--warning);
}

.deadline-normal {
    background: rgba(76, 201, 240, 0.1);
    color: var(--success);
}

.welcome-message {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    text-align: center;
}

.welcome-message h2 {
    color: var(--primary);
    margin-bottom: 15px;
}

.welcome-message p {
    color: var(--gray);
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .form-container, .content-container {
        padding: 20px;
    }
    
    th, td {
        padding: 12px 15px;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

.priority-indicator {
    width: 6px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.task-row {
    position: relative;
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.data-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.data-actions .btn {
    flex: 1;
    padding: 10px 15px;
    font-size: 14px;
}

.form-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.form-footer {
    margin-top: auto;
}