:root {
    --primary-color: #00838f;
    --primary-light: #e0f7fa;
    --accent-red: #d32f2f;
    --bg-color: #f4fbfb;
    --card-bg: #ffffff;
    --text-main: #333333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
}

/* Container Utama diberi jarak atas (padding-top) agar konten tidak tertutup header fixed */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 170px 10px 20px 10px; /* Padding atas menyesuaikan tinggi header & progress */
}

@media (min-width: 768px) {
    .container {
        padding: 190px 20px 20px 20px;
    }
}

/* Header Fixed */
.fixed-header-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    z-index: 999;
    padding: 10px 10px 0 10px;
    box-sizing: border-box;
}

.inner-header-container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    background: linear-gradient(135deg, #006064, #00838f);
    color: white;
    padding: 12px 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 8px;
}

header h1 {
    margin: 0 0 3px 0;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

header p {
    margin: 0;
    font-size: 0.75rem;
}

/* Progress Bar di dalam Wrapper Fixed */
.progress-container {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 10px 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-info {
    flex-grow: 1;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 0.8rem;
    margin-bottom: 4px;
    color: var(--primary-color);
}

.progress-bar-bg {
    background-color: #e0f7fa;
    border-radius: 8px;
    height: 10px;
    width: 100%;
    overflow: hidden;
}

.progress-bar-fill {
    background: linear-gradient(135deg, #00838f, #00acc1);
    height: 100%;
    width: 0%;
    border-radius: 8px;
    transition: width 0.4s ease-in-out;
}

@media (min-width: 768px) {
    .fixed-header-wrapper {
        padding: 15px 20px 0 20px;
    }
    header {
        padding: 15px;
        margin-bottom: 10px;
    }
    header h1 {
        font-size: 1.5rem;
    }
    header p {
        font-size: 0.9rem;
    }
    .progress-container {
        padding: 12px 20px;
        margin-bottom: 12px;
    }
    .progress-label {
        font-size: 0.85rem;
    }
}

.alert-banner {
    background-color: #fff3e0;
    border-left: 5px solid #ff9800;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

@media (min-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 20px;
    }
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-top: 4px solid var(--primary-color);
}

.card h3 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 8px;
    font-size: 1.1rem;
}

ul.checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

ul.checklist li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
    font-size: 0.9rem;
}

.item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
    overflow: hidden;
}

.item-text {
    word-break: break-word;
}

.item-text.completed {
    text-decoration: line-through;
    color: #888;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.badge {
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: bold;
}

.badge.urgent {
    background-color: #ffebee;
    color: var(--accent-red);
    border: 1px solid #ffcdd2;
}

.badge.ready {
    background-color: #e8f5e9;
    color: #2e7d32;
}

input[type="checkbox"] {
    cursor: pointer;
    width: 20px;
    height: 20px;
}

/* Tombol Comment / Note */
.btn-note {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
    position: relative;
}

.btn-note:hover {
    background-color: #f0f0f0;
}

.btn-note.has-note::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 7px;
    height: 7px;
    background-color: var(--accent-red);
    border-radius: 50%;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.modal-content h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.modal-content textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 15px;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
}

.btn-secondary {
    background-color: #e0e0e0;
    color: #333;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}
/* Login Screen Styles */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(135deg, #006064, #00838f);
    margin: 0;
}

.login-card {
    background: white;
    padding: 30px;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 340px;
    text-align: center;
    box-sizing: border-box;
}

.login-card h2 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.4rem;
}

.login-card p {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.login-input {
    width: 100%;
    padding: 12px;
    font-size: 1.2rem;
    text-align: center;
    letter-spacing: 4px;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    margin-bottom: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.login-input:focus {
    border-color: var(--primary-color);
}

.login-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.login-btn:hover {
    background-color: #006064;
}

.error-msg {
    color: var(--accent-red);
    font-size: 0.8rem;
    margin-bottom: 15px;
    background-color: #ffebee;
    padding: 8px;
    border-radius: 6px;
}

.btn-logout {
    background-color: #d32f2f;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
}

.btn-logout:hover {
    background-color: #b71c1c;
}

/* Header penyesuaian tombol logout */
.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
/* Tombol Hapus Task */
.btn-delete {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    border-radius: 4px;
    color: var(--accent-red);
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-delete:hover {
    background-color: #ffebee;
}

/* Penyesuaian Tombol Header */
.btn-add {
    background-color: #2e7d32;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-add:hover {
    background-color: #1b5e20;
}

.header-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}