/* ===== Base ===== */
body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ===== Login ===== */
.login-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-container body {
    margin: 40px;
}

.error {
    color: red;
    margin: 10px 0;
}

/* ===== Header ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

button {
    padding: 12px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

button:hover {
    background: #0056b3;
}

.logout-btn {
    background: #dc3545;
}

.logout-btn:hover {
    background: #c82333;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr 100px;
    gap: 15px;
    align-items: end;
}

/* ===== Week Picker ===== */
.week-picker {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.week-picker-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.week-picker-controls label {
    margin-bottom: 0;
    white-space: nowrap;
}

.week-arrow {
    padding: 6px 12px;
    background: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    color: #495057;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    margin-right: 0;
}

.week-arrow:hover {
    background: #dee2e6;
}

.week-arrow.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

.week-label {
    font-weight: bold;
    font-size: 14px;
    padding: 0 8px;
    white-space: nowrap;
}

.week-date-input {
    width: auto;
    padding: 6px 10px;
    font-size: 13px;
}

.today-btn {
    padding: 6px 14px;
    background: #ffc107;
    color: #212529;
    border: 1px solid #ffc107;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    margin-right: 0;
}

.today-btn:hover {
    background: #e0a800;
    border-color: #e0a800;
}

/* ===== Day Nav ===== */
.week-nav {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.day-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 12px;
}

.day-btn:hover {
    background: #e9ecef;
}

.day-btn.today {
    background: #fff3cd;
    border-color: #ffeaa7;
}

.day-btn.selected {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* ===== Tasks ===== */
.task-list {
    margin-top: 30px;
}

.task-item {
    padding: 15px;
    margin: 10px 0;
    border: 1px solid #eee;
    border-radius: 4px;
    background: #f9f9f9;
}

.percentage-total {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
}

.percentage-total.ok {
    background: #d4edda;
}

.percentage-total.warn {
    background: #f8d7da;
}

.delete-btn {
    background: #dc3545;
    padding: 5px 10px;
    font-size: 12px;
}

.delete-btn:hover {
    background: #c82333;
}

/* ===== Meeting Form ===== */
.meeting-section {
    margin-top: 30px;
    padding: 20px;
    background: #f0f8ff;
    border-radius: 8px;
    border: 2px dashed #17a2b8;
}

.meeting-section h3 {
    margin-top: 0;
}

.meeting-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 15px;
    align-items: end;
}

.meeting-submit {
    background: #17a2b8;
    margin-top: 10px;
}

.meeting-note {
    font-size: 12px;
    color: #666;
    margin: 10px 0 0 0;
}

/* ===== Footer Actions ===== */
.footer-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.sync-btn {
    background: #28a745;
}

.sync-btn:hover {
    background: #218838;
}

/* ===== History ===== */
.day-group {
    margin-bottom: 30px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
}

.day-group .task-item {
    padding: 10px;
    margin: 5px 0;
}

.back-btn {
    margin-bottom: 20px;
}

/* ===== Synced Status ===== */
.synced {
    color: green;
}

.pending {
    color: orange;
}
