:root {
    --app-bg: #f4f6f9; --app-surface: #ffffff;
    --primary-50: #e6f7f7; --primary-100: #b3eeec; --primary-500: #0EB7B2;
    --danger-bg: #fee2e2; --danger-text: #ef4444;
    --text-primary: #0f172a; --text-secondary: #64748b; --border: #e2e8f0;
    --shadow-soft: 0 10px 30px rgba(2, 6, 23, 0.06);
    --header-height: 68px; --nav-height: 76px;
}

body { 
    font-family: "Noto Sans Bengali", sans-serif; 
    background: var(--app-bg); color: var(--text-primary); margin: 0; overflow-x: hidden; 
    -webkit-tap-highlight-color: transparent; 
    -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; 
}
input, textarea { -webkit-user-select: auto; -moz-user-select: auto; -ms-user-select: auto; user-select: auto; }

a { text-decoration: none; color: inherit; cursor: pointer; }

.app-viewport { min-height: 100vh; padding-top: calc(var(--header-height) + 16px); padding-bottom: calc(var(--nav-height) + 30px); background: var(--app-bg); max-width: 100%; margin: 0 auto; position: relative; }
.app-header { height: var(--header-height); background: var(--app-surface); display: flex; align-items: center; justify-content: space-between; padding: 0 12px; position: fixed; top: 8px; left: 8px; right: 8px; z-index: 1000; border-radius: 20px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); border: 1px solid var(--border); }
.app-header-btn { width: 44px; height: 44px; border: none; background: transparent; border-radius: 12px; font-size: 20px; color: var(--text-primary); display: flex; align-items: center; justify-content: center; }
.app-header-title { font-size: 17px; font-weight: 700; color: var(--primary-500); margin: 0; text-align: center; flex: 1; }

.app-bottom-nav-wrap { position: fixed; bottom: 0; left: 0; right: 0; padding: 0 8px 16px; z-index: 1000; }
.app-bottom-nav { height: var(--nav-height); background: var(--app-surface); border-radius: 24px; box-shadow: 0 -4px 20px rgba(0,0,0,0.06); display: flex; align-items: center; justify-content: space-around; padding: 0 8px; border: 1px solid var(--border); }
.app-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; color: var(--text-secondary); font-size: 11px; font-weight: 600; gap: 4px; }
.app-nav-item.active { color: var(--primary-500); }
.app-nav-center-wrap { margin-top: -35px; }
.app-nav-center-btn { width: 56px; height: 56px; border-radius: 50%; background: var(--primary-500); color: white; border: 4px solid var(--app-bg); box-shadow: 0 4px 15px rgba(14, 183, 178, 0.4); display: flex; align-items: center; justify-content: center; font-size: 24px; }

.drawer-menu { position: fixed; left: -280px; top: 0; width: 280px; height: 100%; background: var(--app-surface); z-index: 2000; transition: left 0.3s ease; display: flex; flex-direction: column; box-shadow: 2px 0 15px rgba(0,0,0,0.1); }
.drawer-menu.drawer-open { left: 0; }
#overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1500; }

.app-hero { border-radius: 16px; margin: 0 16px 20px; overflow: hidden; box-shadow: var(--shadow-soft); position: relative;}
.carousel-inner img { width: 100%; height: 180px; object-fit: cover; }
.edit-slider-btn { display: none; position: absolute; top: 10px; right: 10px; z-index: 10; background: rgba(0,0,0,0.6); color: white; border: none; padding: 6px 12px; border-radius: 8px; font-size: 12px; cursor: pointer; }

.app-notice-card { display: flex; align-items: center; gap: 10px; background: var(--app-surface); border-radius: 12px; padding: 12px 16px; margin: 0 16px 20px; box-shadow: var(--shadow-soft); border: 1px solid var(--border); overflow: hidden; }
.app-notice-chip { background: var(--primary-500); color: white; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 8px; flex-shrink: 0; z-index: 2; }
.app-notice-marquee-wrap { flex: 1; overflow: hidden; position: relative; }
.app-notice-marquee-content { display: inline-block; white-space: nowrap; font-size: 14px; animation: scrollText 20s linear infinite; }
@keyframes scrollText { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

.app-category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0 16px; margin-bottom: 20px; }
.app-category-card { background: var(--app-surface); border-radius: 16px; padding: 16px 8px; text-align: center; box-shadow: var(--shadow-soft); border: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.app-category-icon { width: 50px; height: 50px; border-radius: 14px; background: var(--primary-50); display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--primary-500); }
.app-category-icon.emergency { background: var(--danger-bg); color: var(--danger-text); }
.app-category-title { font-size: 12px; font-weight: 600; line-height: 1.3; }

.view-section { display: none; animation: fadeIn 0.3s; padding: 0 16px 20px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.search-box { position: relative; width: 100%; margin-bottom: 15px; }
.search-box input { width: 100%; padding: 12px 16px 12px 40px; border-radius: 16px; border: 1px solid var(--border); background: var(--app-surface); outline: none; }
.search-box i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); }
.list-container { display: flex; flex-direction: column; gap: 12px; }
.list-card { background: var(--app-surface); border-radius: 16px; padding: 16px; display: flex; align-items: center; gap: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid var(--border); position: relative;}
.list-icon { width: 50px; height: 50px; border-radius: 12px; background: var(--primary-50); color: var(--primary-500); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.list-info { flex: 1; overflow: hidden; }
.list-title { font-size: 15px; font-weight: 600; margin: 0 0 4px 0; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-desc { font-size: 12px; color: var(--text-secondary); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-btn { width: 40px; height: 40px; border-radius: 50%; background: #25D366; color: white; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }

.add-data-btn { display: none; background: var(--primary-500); color: white; width: 100%; padding: 12px; border-radius: 12px; font-weight: 600; border: none; margin-bottom: 20px; cursor: pointer;}
.action-btns { position: absolute; top: 10px; right: 10px; display: none; gap: 8px; } 

body.logged-in .add-data-btn { display: block; }
body.logged-in .action-btns { display: flex; }

.admin-add-btn { display: none !important; }
.admin-action-btns { display: none !important; position: absolute; top: 10px; right: 10px; gap: 8px; }

body.admin-mode .admin-add-btn { display: block !important; }
body.admin-mode .admin-action-btns { display: flex !important; }
body.admin-mode .edit-slider-btn { display: block; } 

.btn-edit, .btn-delete { background: none; border: none; font-size: 14px; padding: 5px; cursor: pointer; }
.btn-edit { color: var(--primary-500); }
.btn-delete { color: var(--danger-text); }

.noti-card, .msg-card { background: var(--app-surface); border-radius: 12px; padding: 15px; margin-bottom: 12px; border-left: 4px solid var(--primary-500); box-shadow: var(--shadow-soft); position: relative; }
.noti-card h4, .msg-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.contact-form { background: var(--app-surface); padding: 20px; border-radius: 16px; box-shadow: var(--shadow-soft); max-width: 600px; margin: 0 auto; }
.contact-form .form-control { border-radius: 10px; padding: 12px; margin-bottom: 15px; border: 1px solid var(--border); width: 100%; }
.contact-form .btn-submit { background: var(--primary-500); color: white; width: 100%; padding: 12px; border-radius: 10px; font-weight: 600; border: none; cursor: pointer; }

.content-card { background: var(--app-surface); border-radius: 16px; padding: 25px; box-shadow: var(--shadow-soft); max-width: 800px; margin: 0 auto; text-align: justify; font-size: 15px; color: var(--text-secondary); }

.profile-header-text { background: var(--app-surface); border-radius: 16px; padding: 20px; box-shadow: var(--shadow-soft); margin-bottom: 25px; border: 1px solid var(--border); text-align: justify; font-size: 14px; color: var(--text-secondary); }
.team-divider { text-align: center; position: relative; margin: 30px 0; border-top: 2px solid var(--primary-500); }
.team-divider span { background: var(--app-bg); padding: 0 15px; position: relative; top: -14px; font-weight: 700; font-size: 16px; color: #1f2937; }

.team-grid { display: grid; grid-template-columns: 1fr; gap: 15px; max-width: 900px; margin: 0 auto; }
.profile-card { position: relative; background: var(--app-surface); border-radius: 16px; padding: 25px 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); text-align: center; border: 1px solid var(--border); }
.profile-img-wrap { width: 100px; height: 100px; border-radius: 50%; border: 4px solid var(--primary-500); padding: 3px; margin: 0 auto 15px; overflow: hidden; background: #fff; }
.profile-img-wrap img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.profile-name { font-size: 18px; font-weight: 700; margin: 0 0 5px 0; color: #111827; }
.profile-role { font-size: 13px; color: var(--primary-500); font-weight: 600; margin: 0 0 5px 0; }
.profile-subtext { font-size: 11px; color: #9ca3af; margin: 0; }

@media (min-width: 768px) {
    .app-category-grid { grid-template-columns: repeat(4, 1fr); gap: 15px; }
    .list-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .carousel-inner img { height: 250px; }
    .team-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (min-width: 992px) {
    body { background: #eef2f6; } 
    .app-viewport { max-width: 1000px; margin: 30px auto; border-radius: 24px; box-shadow: 0 15px 50px rgba(0,0,0,0.1); padding-top: calc(var(--header-height) + 40px); padding-bottom: calc(var(--nav-height) + 50px); padding-left: 40px; padding-right: 40px; }
    .app-header { width: calc(1000px - 80px) !important; left: 50% !important; transform: translateX(-50%); top: 45px; border-radius: 15px; padding: 0 20px; }
    .app-bottom-nav-wrap { width: calc(1000px - 80px) !important; left: 50% !important; transform: translateX(-50%); bottom: 45px; padding: 0; }
    .app-category-grid { grid-template-columns: repeat(5, 1fr); gap: 20px; padding: 0; margin-bottom: 30px; }
    .app-hero { margin: 0 0 30px 0; border-radius: 20px; }
    .carousel-inner img { height: 350px; }
    .list-container { grid-template-columns: repeat(2, 1fr); padding: 0; gap: 20px; }
    .search-container { padding: 0; max-width: 60%; margin: 0 auto 30px; }
    .team-grid { grid-template-columns: repeat(3, 1fr); }
    #drawerMenu { width: 320px !important; left: -320px !important; }
    #drawerMenu.drawer-open { left: calc(50% - 500px) !important; border-radius: 24px 0 0 24px; box-shadow: 5px 0 25px rgba(0,0,0,0.15); }
}

.modal-content { border-radius: 16px; border: none; }
.modal-header { border-bottom: 1px solid var(--border); background: var(--primary-50); border-radius: 16px 16px 0 0; }
.form-label { font-weight: 600; font-size: 13px; color: var(--text-secondary); margin-bottom: 5px; }
.form-control, .form-select { border-radius: 10px; border: 1px solid var(--border); padding: 10px 15px; font-size: 14px; }
