/* 
 * Rx Ariful Telecom Server V10 - Main Stylesheet
 * DESIGN: Premium Green Theme | Mobile App View | No Scrollbars
 */

/* --- 1. VARIABLES & RESET --- */
:root {
    --brand-color: #00897b;       /* Main Green */
    --brand-dark: #00695c;        /* Darker Green */
    --bg-color: #f2f2f2;          /* App Background */
    --white: #ffffff;
    --text-main: #333333;
    --text-light: #777777;
    --danger: #e53935;
    --success: #43a047;
    --warning: #fb8c00;
    --border-radius: 15px;
    --font-main: 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Remove blue highlight on tap */
}

body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background-color: #e0e0e0; /* Desktop background */
    overflow: hidden; /* Hide browser scrollbar */
}

/* --- 2. APP LAYOUT CONTAINER --- */
.app-container {
    height: 100%;
    max-width: 480px; /* Mobile width limit */
    margin: 0 auto;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Scrollable Area Setup (Hidden Scrollbar) */
.scroll-content {
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 80px; /* Space for bottom nav */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE */
}
.scroll-content::-webkit-scrollbar { 
    display: none; /* Chrome/Safari */
}

/* --- 3. HEADER STYLES --- */
.app-header {
    background-color: var(--brand-color);
    padding: 15px 20px 25px 20px;
    border-bottom-left-radius: 25px;
    border-bottom-right-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--white);
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,137,123, 0.3);
}

.profile-box {
    display: flex;
    align-items: center;
    gap: 12px;
}
.user-avatar {
    width: 45px;
    height: 45px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ccc;
    border: 2px solid rgba(255,255,255,0.8);
    object-fit: cover;
}
.user-info { line-height: 1.2; }
.u-name { font-size: 15px; font-weight: 600; }
.u-id { font-size: 11px; opacity: 0.9; }

/* Notification Bell */
.notif-btn {
    position: relative;
    color: var(--white);
    font-size: 22px;
    text-decoration: none;
}
.badge-dot {
    position: absolute;
    top: 0; right: 0;
    width: 9px; height: 9px;
    background: #ff5252;
    border-radius: 50%;
    border: 1px solid var(--white);
}

/* --- 4. BALANCE ANIMATION (Tap to See) --- */
.balance-wrapper {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 20px;
    z-index: 15;
}
.balance-pill {
    background: var(--white);
    color: var(--brand-color);
    padding: 0;
    width: 160px;
    height: 38px;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.bal-placeholder, .bal-actual {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0; left: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bal-placeholder {
    font-size: 12px;
    font-weight: 600;
    transform: translateY(0);
}
.bal-placeholder i { margin-right: 5px; font-size: 14px; }

.bal-actual {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    transform: translateY(100%);
    background: var(--white);
}

/* Active State */
.balance-pill.active .bal-placeholder { transform: translateY(-100%); }
.balance-pill.active .bal-actual { transform: translateY(0); }


/* --- 5. AUTH PAGES (Login/Register) --- */
.auth-header {
    text-align: center;
    padding: 40px 20px;
    background: var(--white);
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    margin-bottom: 20px;
}
.logo-img { width: 60px; margin-bottom: 10px; }
.auth-title { font-size: 22px; font-weight: 700; color: var(--brand-color); margin: 0; }
.auth-sub { font-size: 13px; color: var(--text-light); }

.auth-form { padding: 20px; }
.input-group { margin-bottom: 20px; position: relative; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-main); margin-bottom: 8px; }
.form-control {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    transition: 0.3s;
    background: #f9f9f9;
}
.form-control:focus {
    border-color: var(--brand-color);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(0, 137, 123, 0.1);
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--brand-color), var(--brand-dark));
    color: var(--white);
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 137, 123, 0.3);
    transition: transform 0.2s;
}
.btn-primary:active { transform: scale(0.98); }

/* --- 6. DASHBOARD COMPONENTS --- */

/* Notice Bar */
.notice-box {
    background: var(--white);
    margin: 15px 15px 0 15px;
    padding: 8px 12px;
    border-radius: 50px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--text-main);
}
.notice-icon { color: #e65100; margin-right: 10px; font-size: 16px; }

/* Slider */
.slider-container {
    margin: 15px;
    height: 150px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    background: #ddd;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.slider-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}
.slider-img.active { display: block; animation: fadeIn 1s; }
@keyframes fadeIn { from { opacity: 0.5; } to { opacity: 1; } }

/* Grid Menu */
.section-title { font-size: 14px; font-weight: 700; color: var(--text-main); margin: 0 15px 15px 15px; border-left: 3px solid var(--brand-color); padding-left: 10px; }
.grid-menu {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px 8px;
    padding: 0 15px;
    margin-bottom: 25px;
}
.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-main);
}
.grid-icon {
    width: 55px; height: 55px;
    border-radius: 15px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    margin-bottom: 8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
    transition: transform 0.1s;
}
.grid-item:active .grid-icon { transform: scale(0.9); }
.grid-text { font-size: 11px; font-weight: 500; text-align: center; }

/* Pastel Colors */
.bg-peach { background: #ffe0b2; color: #e65100; }
.bg-blue { background: #e3f2fd; color: #1565c0; }
.bg-purple { background: #f3e5f5; color: #7b1fa2; }
.bg-green { background: #e8f5e9; color: #2e7d32; }
.bg-mint { background: #e0f2f1; color: #00695c; }
.bg-pink { background: #fce4ec; color: #c2185b; }

/* Offer Cards */
.offer-scroll {
    display: flex;
    overflow-x: auto;
    padding: 0 15px 20px 15px;
    gap: 15px;
    scrollbar-width: none;
}
.offer-scroll::-webkit-scrollbar { display: none; }

.offer-card {
    min-width: 260px;
    background: var(--white);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    position: relative;
}
.offer-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.offer-logo { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.offer-title { font-size: 14px; font-weight: 700; color: var(--text-main); }
.offer-price { display: flex; justify-content: space-between; align-items: flex-end; }
.p-new { font-size: 18px; font-weight: 700; color: var(--brand-color); }
.p-old { font-size: 12px; text-decoration: line-through; color: #aaa; }
.offer-tag {
    position: absolute; bottom: 0; right: 0;
    background: var(--brand-dark); color: var(--white);
    font-size: 10px; padding: 4px 12px;
    border-top-left-radius: 12px; border-bottom-right-radius: 12px;
}

/* --- 7. BOTTOM NAVIGATION --- */
.bottom-nav {
    height: 70px;
    background: var(--white);
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: absolute;
    bottom: 0;
    width: 100%;
    z-index: 50;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.03);
}
.nav-item {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    color: #999;
    font-weight: 500;
    transition: 0.3s;
}
.nav-item i { font-size: 22px; margin-bottom: 4px; }
.nav-item.active { color: var(--brand-color); }

/* --- 8. MODAL (Notice) --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 1000;
    display: none; align-items: center; justify-content: center;
    backdrop-filter: blur(2px);
}
.modal-box {
    background: var(--white); width: 85%; max-width: 350px;
    border-radius: 20px; overflow: hidden; animation: popUp 0.3s;
}
.modal-head {
    background: var(--brand-color); color: var(--white);
    padding: 15px; font-weight: 600; text-align: center;
}
.modal-body { padding: 25px 20px; font-size: 14px; color: var(--text-main); text-align: center; line-height: 1.6; }
.modal-close {
    background: var(--brand-color); color: var(--white); border: none;
    padding: 12px; border-radius: 12px; cursor: pointer;
    margin: 0 20px 20px 20px; display: block; width: calc(100% - 40px);
    font-weight: 600;
}
@keyframes popUp { from{transform:scale(0.8); opacity:0;} to{transform:scale(1); opacity:1;} }

/* --- 9. ALERTS --- */
.flash-message {
    padding: 12px; margin-bottom: 20px; border-radius: 10px;
    font-size: 13px; text-align: center;
}
.flash-message.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.flash-message.error { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }

/* --- 10. LIST ITEMS (History) --- */
.trx-list { padding: 15px; }
.trx-item {
    background: var(--white); padding: 15px; border-radius: 15px;
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px; box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}
.trx-left { display: flex; align-items: center; gap: 12px; }
.trx-icon {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.icon-credit { background: #e8f5e9; color: var(--success); }
.icon-debit { background: #ffebee; color: var(--danger); }
.trx-text h4 { margin: 0; font-size: 14px; color: var(--text-main); }
.trx-text span { font-size: 11px; color: var(--text-light); }
.trx-amount { font-weight: 700; font-size: 15px; }
.trx-status { font-size: 10px; padding: 2px 8px; border-radius: 4px; }
.st-completed { background: #e8f5e9; color: green; }
.st-pending { background: #fff3e0; color: orange; }
.st-failed { background: #ffebee; color: red; }