/* =========================================
   RESET & GLOBAL KHUNG CƠ BẢN
   ========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, sans-serif; -webkit-tap-highlight-color: transparent; }

/* =========================================
   1. THEME: LỊCH VẠN NIÊN (Trang Chủ)
   ========================================= */
body.page-home { --primary: #c0392b; --gold: #f1c40f; --bg: #fdfaf6; --text: #2c3e50; background-color: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
.page-home .navbar { background: var(--primary); color: white; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 100; }
.page-home .navbar .logo { font-size: 18px; font-weight: bold; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; }
.page-home .btn-login { background: transparent; border: 1px solid var(--gold); color: var(--gold); padding: 6px 15px; border-radius: 20px; font-size: 13px; font-weight: bold; text-decoration: none; transition: 0.2s; }
.page-home .btn-login:hover { background: var(--gold); color: var(--primary); }
.page-home .container { max-width: 600px; margin: 0 auto; padding: 20px; padding-bottom: 80px; }

/* Form tra cứu */
.page-home .search-box { background: white; border-radius: 12px; padding: 15px; margin-bottom: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 1px solid #fae5d3; }
.page-home .search-box label { display: block; font-size: 14px; font-weight: bold; color: var(--primary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.page-home .search-flex { display: flex; gap: 10px; }
.page-home .search-flex input[type="date"] { flex: 1; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 16px; font-family: inherit; color: var(--text); outline: none; }
.page-home .search-flex input[type="date"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1); }
.page-home .search-flex button { background: var(--primary); color: white; border: none; padding: 0 20px; border-radius: 8px; font-weight: bold; font-size: 15px; cursor: pointer; transition: 0.2s; white-space: nowrap; }
.page-home .search-flex button:hover { background: #a52a2a; }

/* Navigator & Tờ Lịch */
.page-home .date-navigator { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-home .nav-btn { background: #f1f2f6; border: none; padding: 10px 15px; border-radius: 8px; font-weight: bold; color: var(--primary); cursor: pointer; text-decoration: none; font-size: 14px; transition: 0.2s; display: flex; align-items: center; gap: 5px; }
.page-home .nav-btn:hover { background: #dfe4ea; }
.page-home .current-month { font-weight: bold; font-size: 16px; color: var(--text); }
.page-home .calendar-sheet { background: white; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.08); text-align: center; margin-bottom: 25px; border: 1px solid #fae5d3; }
.page-home .calendar-header { background: var(--primary); color: var(--gold); padding: 10px; font-size: 18px; font-weight: bold; text-transform: uppercase; letter-spacing: 2px; }
.page-home .calendar-body { padding: 30px 20px; position: relative; }
.page-home .solar-day { font-size: 90px; font-weight: 900; line-height: 1; color: var(--primary); margin-bottom: 10px; text-shadow: 2px 2px 0px rgba(192, 57, 43, 0.1); }
.page-home .lunar-info { font-size: 20px; color: #7f8c8d; font-weight: 500; margin-bottom: 15px; }
.page-home .lunar-info span { color: #d35400; font-weight: bold; }
.page-home .badge-type { display: inline-block; padding: 5px 15px; border-radius: 20px; font-size: 14px; font-weight: bold; color: white; background: #27ae60; }
.page-home .badge-type.bad { background: #e74c3c; }

/* Thông tin phong thủy */
.page-home .card-fs { background: white; border-radius: 12px; padding: 20px; margin-bottom: 15px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); border-left: 4px solid var(--primary); }
.page-home .card-fs h3 { font-size: 16px; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; border-bottom: 1px dashed #eee; padding-bottom: 10px; }
.page-home .fs-content { font-size: 15px; line-height: 1.6; color: #444; }
.page-home .fs-content br { margin-bottom: 8px; content: ""; display: block; }
.page-home .good-things { border-left-color: #27ae60; }
.page-home .good-things h3 { color: #27ae60; }
.page-home .bad-things { border-left-color: #e74c3c; }
.page-home .bad-things h3 { color: #e74c3c; }
.page-home .hours { border-left-color: #f39c12; }
.page-home .hours h3 { color: #f39c12; }
.page-home .btn-today { display: block; width: 100%; text-align: center; background: var(--primary); color: white; text-decoration: none; padding: 14px; border-radius: 8px; font-weight: bold; font-size: 16px; box-shadow: 0 4px 10px rgba(192, 57, 43, 0.3); transition: 0.2s; }
.page-home .btn-today:active { transform: scale(0.98); }


/* =========================================
   2. THEME: ĐĂNG NHẬP (LOGIN)
   ========================================= */
body.page-login { --primary: #c0392b; --bg: #f4f6f9; --text: #2c3e50; background-color: var(--bg); display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; }
.page-login .login-box { background: white; width: 100%; max-width: 400px; padding: 40px 30px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); text-align: center; }
.page-login .logo-icon { font-size: 50px; margin-bottom: 10px; line-height: 1; }
.page-login .login-box h2 { color: var(--text); font-size: 24px; margin-bottom: 5px; }
.page-login .login-box p { color: #7f8c8d; font-size: 14px; margin-bottom: 30px; }
.page-login .form-group { margin-bottom: 20px; text-align: left; }
.page-login .form-group label { display: block; font-size: 13px; font-weight: bold; color: var(--text); margin-bottom: 8px; }
.page-login .form-group input { width: 100%; padding: 14px; border: 1.5px solid #e0e6ed; border-radius: 12px; font-size: 15px; outline: none; transition: 0.2s; }
.page-login .form-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.1); }
.page-login .btn-submit { width: 100%; background: var(--primary); color: white; border: none; padding: 15px; border-radius: 12px; font-size: 16px; font-weight: bold; cursor: pointer; transition: 0.2s; margin-top: 10px; }
.page-login .btn-submit:active { transform: scale(0.98); }
.page-login .alert-error { background: #fee2e2; color: #e74c3c; padding: 12px; border-radius: 8px; font-size: 14px; margin-bottom: 20px; font-weight: bold; border-left: 4px solid #e74c3c; text-align: left; }
.page-login .back-link { display: inline-block; margin-top: 25px; color: #95a5a6; text-decoration: none; font-size: 14px; font-weight: 500; }


/* =========================================
   3. THEME: DASHBOARD APP (SAU KHI LOGIN)
   ========================================= */
body.page-dashboard { --primary: #3498db; --bg: #f4f6f9; --text: #2c3e50; --card-bg: #ffffff; background-color: var(--bg); color: var(--text); padding-bottom: 80px; }
.page-dashboard .app-header { background: var(--card-bg); padding: 25px 20px 20px; border-bottom-left-radius: 25px; border-bottom-right-radius: 25px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-dashboard .greeting h1 { font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.page-dashboard .greeting p { font-size: 14px; color: #7f8c8d; }
.page-dashboard .avatar { width: 50px; height: 50px; background: var(--primary); border-radius: 50%; display: flex; justify-content: center; align-items: center; color: white; font-size: 20px; font-weight: bold; }
.page-dashboard .container { padding: 0 20px; max-width: 600px; margin: 0 auto; }

/* Bento Grid */
.page-dashboard .bento-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 25px; }
.page-dashboard .bento-item { background: var(--card-bg); border-radius: 20px; padding: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); display: flex; flex-direction: column; justify-content: space-between; }
.page-dashboard .bento-item.full { grid-column: span 2; flex-direction: row; align-items: center; }
.page-dashboard .bento-icon { font-size: 28px; margin-bottom: 10px; }
.page-dashboard .bento-val { font-size: 24px; font-weight: 800; color: var(--text); line-height: 1.2; }
.page-dashboard .bento-title { font-size: 13px; color: #95a5a6; font-weight: 600; margin-top: 5px; }

/* Danh sách Việc cần làm */
.page-dashboard .section-title { font-size: 18px; font-weight: bold; margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; }
.page-dashboard .section-title a { font-size: 13px; color: var(--primary); text-decoration: none; font-weight: 600; }
.page-dashboard .task-card { background: var(--card-bg); border-radius: 16px; padding: 16px; margin-bottom: 12px; display: flex; gap: 15px; align-items: center; box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
.page-dashboard .task-icon { width: 40px; height: 40px; border-radius: 12px; background: #ebf5fb; color: var(--primary); display: flex; justify-content: center; align-items: center; font-size: 18px; }
.page-dashboard .task-info { flex: 1; }
.page-dashboard .task-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.page-dashboard .task-time { font-size: 12px; color: #e67e22; font-weight: 600; display: flex; align-items: center; gap: 4px; }

/* Thanh Điều Hướng Đáy */
.page-dashboard .bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); box-shadow: 0 -5px 20px rgba(0,0,0,0.05); display: flex; justify-content: space-around; padding: 10px 10px 25px; border-top-left-radius: 20px; border-top-right-radius: 20px; z-index: 1000; }
.page-dashboard .nav-item { display: flex; flex-direction: column; align-items: center; color: #95a5a6; text-decoration: none; font-size: 11px; font-weight: 600; gap: 4px; width: 60px; }
.page-dashboard .nav-item i { font-size: 22px; font-style: normal; }
.page-dashboard .nav-item.active { color: var(--primary); }
