:root {
    --bg-color: #0d1117;
    --card-bg: #161b22;
    --text-main: #c9d1d9;
    --text-muted: #8b949e;
    --primary: #2f81f7;
    --primary-light: rgba(47, 129, 247, 0.15);
    --border: #30363d;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    --hover-bg: #21262d;
    --input-bg: #0d1117;
}

* { box-sizing: border-box; }

body {
    margin: 0; padding: 0; font-family: 'Fira Code', monospace;
    background-color: var(--bg-color); color: var(--text-main); font-size: 13px;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

.app-container {
    background: var(--card-bg);
    width: 100%;
    padding: 24px 30px;
}

.login-container { display: flex; justify-content: center; min-height: 100vh; align-items: center; }
.login-card {
    background: var(--card-bg); width: 100%; max-width: 420px;
    border-radius: 16px; box-shadow: var(--shadow); padding: 40px;
    border: 1px solid var(--border);
}
.text-center { text-align: center; }
.login-title { margin: 0 0 10px 0; font-size: 28px; color: var(--primary); font-weight: 700; }
.login-subtitle { margin: 0 0 30px 0; font-size: 13px; color: var(--text-muted); }

.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 12px; border-radius: 8px; background: #ffffff; color: #111827;
    font-size: 14px; font-weight: 600; border: none; cursor: pointer; transition: opacity 0.2s;
}
.btn-google:hover { opacity: 0.9; }

.btn-secondary {
    width: 100%; padding: 12px; border-radius: 8px; background: var(--hover-bg); color: var(--text-main);
    font-size: 13px; font-weight: 500; border: 1px solid var(--border); cursor: pointer; transition: background 0.2s;
}
.btn-secondary:hover { background: #30363d; }

.divider {
    display: flex; align-items: center; text-align: center; margin: 25px 0; color: var(--text-muted); font-size: 11px;
}
.divider::before, .divider::after {
    content: ''; flex: 1; border-bottom: 1px solid var(--border);
}
.divider span { padding: 0 15px; opacity: 0.6; }

.input-group { text-align: left; margin-bottom: 15px; }
.input-group label { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.auth-input {
    width: 100%; padding: 12px 16px; border-radius: 8px; background: var(--input-bg);
    border: 1px solid var(--border); color: var(--text-main); font-size: 13px; font-family: inherit;
    outline: none; transition: border-color 0.2s;
}
.auth-input:focus { border-color: var(--primary); }

.auth-error { margin-top: 20px; color: #f85149; font-size: 12px; background: rgba(248, 81, 73, 0.1); padding: 10px; border-radius: 6px;}

.email-success { padding: 20px 0; }
.success-icon { font-size: 32px; color: #3fb950; margin-bottom: 10px; }
.success-title { font-size: 16px; font-weight: bold; margin: 0 0 5px 0; }
.success-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 15px; }
.text-primary { color: var(--primary) !important; font-weight: 600; }

.header-section { margin-bottom: 25px; border-bottom: 1px solid var(--border); padding-bottom: 15px;}
.global-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;}
.spacer { flex: 1; }

.user-profile { display: flex; align-items: center; gap: 8px; }
.avatar {
    width: 26px;
    font-size: 0.75rem;
    line-height: 1rem;
    height: 26px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.day-header { display: flex; justify-content: space-between; align-items: center; margin: 30px 0 15px 0; }
.day-title h2 { margin: 0; font-size: 16px; font-weight: 600; color: var(--text-main); }
.day-subtitle { color: var(--text-muted); font-size: 12px; margin-top: 2px; display: block; }

.task-card {
    background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
    padding: 12px 16px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center;
    transition: transform 0.2s, border-color 0.2s; cursor: pointer;
}
.task-card:hover { border-color: #484f58; }
.task-card:active { cursor: grabbing; }
.task-card.dragging { opacity: 0.4; transform: scale(0.98); }
.task-card.drag-over { border-top: 2px solid var(--primary); }

.task-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.task-info input {
    border: none; background: transparent; font-size: 13px; font-weight: 500;
    color: var(--text-main); width: 100%; outline: none; font-family: inherit; cursor: text;
}
.task-info input::placeholder { color: var(--text-muted); opacity: 0.6; }
.task-info input.task-done { text-decoration: line-through; color: var(--text-muted); opacity: 0.7; }
.task-subtitle { font-size: 11px; color: var(--primary); opacity: 0.8; }

.task-actions { display: flex; align-items: center; gap: 12px; }
.checkbox {
    width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; color: white;
}
.checkbox.checked { background: var(--primary); border-color: var(--primary); }
.checkbox svg { width: 12px; height: 12px; }

button { font-family: inherit; border: none; cursor: pointer; border-radius: 6px; font-weight: 500; transition: all 0.2s; }
.btn-primary { background: var(--primary); color: white; padding: 8px 16px; font-size: 12px; }
.btn-primary:hover { filter: brightness(1.2); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary-light { background: var(--primary-light); color: var(--primary); padding: 6px 12px; font-size: 12px; font-weight: 600; border: 1px solid transparent; }
.btn-primary-light:hover { background: rgba(47, 129, 247, 0.25); border-color: var(--primary); }

.btn-light { background: transparent; border: 1px solid var(--border); color: var(--text-main); padding: 6px 12px; font-size: 12px;}
.btn-light:hover { background: var(--hover-bg); border-color: #8b949e; }

.btn-text { background: transparent; color: var(--text-muted); padding: 6px 10px; font-size: 12px;}
.btn-text:hover { color: var(--text-main); background: var(--hover-bg); }

.text-danger:hover { color: #f85149 !important; background: rgba(248, 81, 73, 0.1); }
.btn-delete { background: transparent; color: var(--text-muted); font-size: 16px; padding: 0 4px; opacity: 0; }
.task-card:hover .btn-delete { opacity: 1; }
.btn-delete:hover { color: #f85149; }

.modal-backdrop {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: center; z-index: 100;
}
.modal-card { 
    background: var(--card-bg); width: 90%; max-width: 450px; border-radius: 12px; 
    padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--border);
}
.modal-card h3 { margin: 0 0 5px 0; font-size: 16px; color: var(--text-main); }
.modal-task-name { font-size: 12px; color: var(--primary); margin: 0 0 15px 0; font-weight: 500; word-break: break-all; }
.modal-card textarea {
    width: 100%; border: 1px solid var(--border); border-radius: 6px; padding: 12px; font-family: inherit;
    font-size: 13px; outline: none; resize: vertical; background: var(--bg-color); color: var(--text-main);
}
.modal-card textarea:focus { border-color: var(--primary); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 15px; }

.loader { border: 3px solid var(--border); border-top: 3px solid var(--primary); border-radius: 50%; width: 24px; height: 24px; animation: spin 1s linear infinite; margin: 100px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }