@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background: linear-gradient(135deg, #f8f9fd 0%, #e8ecf4 100%);
    min-height: 100vh;
    color: #333;
}

/* ===== Layout ===== */
.app-wrapper {
    max-width: 520px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

.page-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.page-subtitle {
    text-align: center;
    font-size: 13px;
    color: #888;
    margin-bottom: 24px;
}

/* ===== Auth Page ===== */
.auth-container {
    max-width: 400px;
    margin: 80px auto 0;
    padding: 0 16px;
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 36px 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.auth-card h1 {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.auth-card .subtitle {
    text-align: center;
    color: #888;
    font-size: 14px;
    margin-bottom: 28px;
}

.auth-tabs {
    display: flex;
    background: #f0f0f5;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #888;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-tab.active {
    background: white;
    color: #e53950;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e8e8ee;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: border-color 0.3s;
    outline: none;
}

.form-group input:focus {
    border-color: #e53950;
}

.btn-primary {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #e53950, #d62839);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 8px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(229, 57, 80, 0.35);
}

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

.error-msg {
    background: #fff0f0;
    color: #d62839;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
    text-align: center;
}

.error-msg.show {
    display: block;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* ===== Tabs ===== */
.tabs {
    display: flex;
    background: white;
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.tab-btn {
    flex: 1;
    padding: 11px 16px;
    border: none;
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #999;
    border-radius: 11px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: linear-gradient(135deg, #e53950, #d62839);
    color: white;
    box-shadow: 0 4px 12px rgba(229, 57, 80, 0.3);
}

.tab-btn:hover:not(.active) {
    color: #555;
    background: #f5f5fa;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Artikel Card ===== */
.artikel-card {
    background: white;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.artikel-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.artikel-card h3 {
    color: #e53950;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.artikel-card p {
    color: #666;
    font-size: 13px;
    line-height: 1.6;
}

.artikel-card .card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    justify-content: flex-end;
}

.btn-sm {
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-edit {
    background: #eef4ff;
    color: #3b82f6;
}

.btn-edit:hover {
    background: #3b82f6;
    color: white;
}

.btn-delete {
    background: #fff0f0;
    color: #e53950;
}

.btn-delete:hover {
    background: #e53950;
    color: white;
}

.btn-add {
    width: 100%;
    padding: 13px;
    background: white;
    color: #e53950;
    border: 2px dashed #e5395050;
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
}

.btn-add:hover {
    background: #fff5f6;
    border-color: #e53950;
}

/* ===== Calendar ===== */
.month-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin-top: 24px;
    margin-bottom: 4px;
    padding-bottom: 8px;
    border-bottom: 3px solid #e5395030;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 10px;
    margin-bottom: 8px;
}

.day-label {
    text-align: center;
    font-weight: 700;
    font-size: 12px;
    color: #999;
    padding: 4px 0;
}

.day {
    text-align: center;
    padding: 6px 2px;
    border-radius: 10px;
    transition: background 0.2s;
}

.day.checked {
    background: #d4edda;
}

.day input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #28a745;
}

.tanggal {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none;
    padding: 16px;
}

.modal-overlay.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: white;
    border-radius: 20px;
    padding: 28px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal h3 {
    font-size: 18px;
    color: #1a1a2e;
    margin-bottom: 18px;
}

.modal textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e8e8ee;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    outline: none;
    transition: border-color 0.3s;
}

.modal textarea:focus {
    border-color: #e53950;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    justify-content: flex-end;
}

.btn-cancel {
    padding: 10px 20px;
    background: #f0f0f5;
    color: #666;
    border: none;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-save {
    padding: 10px 20px;
    background: linear-gradient(135deg, #e53950, #d62839);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* ===== Recap Table ===== */
.recap-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.recap-controls select {
    padding: 10px 14px;
    border: 2px solid #e8e8ee;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    background: white;
    cursor: pointer;
    flex: 1;
}

.recap-controls select:focus {
    border-color: #e53950;
}

.recap-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.recap-table th {
    background: linear-gradient(135deg, #e53950, #d62839);
    color: white;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}

.recap-table td {
    padding: 11px 14px;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f5;
    color: #555;
}

.recap-table tr:last-child td {
    border-bottom: none;
}

.recap-table tr:hover td {
    background: #fafafe;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-good {
    background: #d4edda;
    color: #28a745;
}

.badge-low {
    background: #fff3cd;
    color: #e67e22;
}

.badge-none {
    background: #f0f0f5;
    color: #999;
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #888;
}

.user-info .username {
    font-weight: 600;
    color: #1a1a2e;
}

.btn-logout {
    padding: 8px 16px;
    background: #f0f0f5;
    color: #888;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: #e53950;
    color: white;
}

/* ===== No Data ===== */
.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #bbb;
    font-size: 14px;
}

.no-data .icon {
    font-size: 40px;
    margin-bottom: 10px;
}

/* ===== Loading ===== */
.loading {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 14px;
}
