:root {
    --primary: #1e6b35; 
    --primary-light: #2da953;
    --primary-grad: linear-gradient(135deg, #1e6b35 0%, #2da953 100%);
    --bg-color: #f0f4f3;
    --card-bg: #ffffff;
    --text-dark: #2d3748;
    --text-light: #718096;
    --danger: #e53e3e;
    --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 35px rgba(45, 169, 83, 0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Poppins', sans-serif; }
body { background-color: var(--bg-color); color: var(--text-dark); -webkit-font-smoothing: antialiased; }

/* Animations */
.fade-in { animation: fadeIn 0.6s ease-out forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* --- LOGIN PAGE --- */
.auth-bg { background: linear-gradient(135deg, #e2eae7 0%, #f0f4f3 100%); display: flex; align-items: center; justify-content: center; height: 100vh; }
.auth-card { background: var(--card-bg); padding: 40px 30px; border-radius: 24px; width: 90%; max-width: 400px; box-shadow: var(--shadow-soft); text-align: center; }
.auth-header { margin-bottom: 30px; }
.auth-icon { font-size: 40px; color: var(--primary); margin-bottom: 15px; }
.auth-header h2 { font-weight: 700; font-size: 24px; color: var(--text-dark); }
.auth-header .subtitle { color: var(--text-light); font-size: 14px; }

/* Inputs with Icons */
.input-wrapper { position: relative; margin-bottom: 15px; }
.input-wrapper i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #a0aec0; }
.input-wrapper input { width: 100%; padding: 14px 14px 14px 45px; border: 1.5px solid #e2e8f0; border-radius: 12px; font-size: 14px; transition: 0.3s; background: #f8fafc; outline: none; }
.input-wrapper input:focus { border-color: var(--primary); background: white; box-shadow: 0 0 0 4px rgba(45,169,83,0.1); }

/* Buttons */
.btn-primary { width: 100%; background: var(--primary-grad); color: white; padding: 14px; border: none; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; transition: 0.3s; display: flex; justify-content: center; align-items: center; gap: 8px; box-shadow: 0 4px 12px rgba(45,169,83,0.2); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(45,169,83,0.3); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { width: 100%; background: transparent; color: var(--primary); border: 2px solid var(--primary); padding: 12px; border-radius: 12px; cursor: pointer; font-weight: 600; transition: 0.3s; display: flex; justify-content: center; align-items: center; gap: 8px; }
.btn-secondary:hover { background: rgba(45,169,83,0.05); }

.auth-switch { margin-top: 20px; font-size: 13px; color: var(--text-light); }
.auth-switch a { color: var(--primary); font-weight: 600; text-decoration: none; }

/* --- DASHBOARD --- */
.dashboard-bg { padding-bottom: 40px; }
.app-header { background: var(--primary-grad); color: white; padding: 30px 20px 40px; display: flex; justify-content: space-between; align-items: flex-start; border-bottom-left-radius: 30px; border-bottom-right-radius: 30px; box-shadow: 0 10px 20px rgba(30,107,53,0.2); margin-bottom: -25px; }
.header-content h3 { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.header-content p { font-size: 13px; opacity: 0.9; display: flex; align-items: center; gap: 6px; }
.btn-logout { background: rgba(255,255,255,0.2); color: white; border: none; width: 40px; height: 40px; border-radius: 50%; font-size: 16px; cursor: pointer; transition: 0.3s; backdrop-filter: blur(5px); }
.btn-logout:hover { background: rgba(255,255,255,0.3); transform: rotate(10deg); }

.container { padding: 0 20px; max-width: 600px; margin: auto; position: relative; z-index: 10; }
.mt-10 { margin-top: 15px; }
.text-sm { font-size: 12px; color: var(--text-light); }

/* Cards */
.card { background: var(--card-bg); padding: 25px 20px; border-radius: 20px; box-shadow: var(--shadow-soft); margin-bottom: 20px; transition: 0.3s; border: 1px solid rgba(0,0,0,0.02); }
.card:hover { box-shadow: var(--shadow-hover); }
.chart-card { text-align: center; }

/* Namaz Grid */
#salahCards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.salah-card { padding: 18px 15px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.salah-header { display: flex; flex-direction: column; align-items: flex-start; width: 100%; gap: 10px; }
.salah-info { width: 100%; }
.salah-info h4 { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.salah-info p { font-size: 11px; color: var(--text-light); }
.remaining-badge { color: var(--danger); font-weight: 700; font-size: 13px; }

/* Icon Colors */
.icon-fajar { color: #f6ad55; }
.icon-dhuhr { color: #ecc94b; }
.icon-asr { color: #ed8936; }
.icon-maghrib { color: #9f7aea; }
.icon-isha { color: #4299e1; }
.icon-witr { color: #a0aec0; }

/* Inputs in Grid */
.action-area { display: flex; width: 100%; gap: 6px; }
.qty-input { flex: 1; min-width: 0; padding: 8px; border: 1.5px solid #e2e8f0; border-radius: 8px; text-align: center; font-size: 14px; font-weight: 500; outline: none; }
.qty-input:focus { border-color: var(--primary-light); }
.btn-submit-qty { background: var(--primary-light); color: white; border: none; padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; transition: 0.2s; box-shadow: 0 3px 8px rgba(45,169,83,0.2); }
.btn-submit-qty:active { transform: scale(0.95); }
.btn-submit-qty:disabled { background: #cbd5e0; box-shadow: none; cursor: not-allowed; }

/* Progress Bar */
.progress-bg { background: #edf2f7; border-radius: 10px; height: 8px; width: 100%; overflow: hidden; margin-top: 5px; }
.progress-fill { background: var(--primary-grad); height: 100%; border-radius: 10px; transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); }

/* Modal */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); align-items: center; justify-content: center; z-index: 1000; }
.modal-content { background: white; padding: 25px; border-radius: 20px; width: 90%; max-width: 400px; max-height: 85vh; overflow-y: auto; box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.modal-header h3 { font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.btn-close { background: transparent; border: none; font-size: 20px; color: #a0aec0; cursor: pointer; }
.modal-sub { margin-bottom: 20px; }
.input-group { display: flex; justify-content: space-between; align-items: center; margin: 12px 0; background: #f8fafc; padding: 10px 15px; border-radius: 12px; }
.input-group label { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; }
.input-group input { width: 80px; padding: 8px; border: 1.5px solid #cbd5e0; border-radius: 8px; text-align: center; font-weight: 600; outline: none; }
.input-group input:focus { border-color: var(--primary); }