/* ===== Lotto Bangla — Mobile-first stylesheet ===== */
:root {
    --green: #1a7d3c;
    --green-dark: #146030;
    --green-light: #e8f5ec;
    --red: #d63031;
    --gold: #f0b429;
    --text-dark: #1c1c1c;
    --text-muted: #6b7280;
    --border: #e2e5e9;
    --bg: #f4f6f5;
    --white: #ffffff;
    --radius: 12px;
    --shadow: 0 2px 10px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Noto Sans Bengali', 'Hind Siliguri', Arial, sans-serif;
    background: var(--bg);
    color: var(--text-dark);
    -webkit-tap-highlight-color: transparent;
}

.app-shell {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    padding-bottom: 78px;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

/* ---------- Auth pages (login/register) ---------- */
.auth-shell {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--white);
}

.auth-header {
    background: var(--green);
    padding: 28px 20px 22px;
    text-align: center;
}

.auth-header .logo {
    font-size: 26px;
    font-weight: 800;
    color: var(--white);
}
.auth-header .logo span.accent {
    background: var(--red);
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 4px;
    display: inline-block;
}

.auth-body { padding: 26px 20px 40px; }

.auth-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin: 6px 0 26px;
    color: var(--text-dark);
}

.form-group { margin-bottom: 16px; position: relative; }

.form-control {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    background: var(--white);
    outline: none;
    transition: border-color .15s;
}
.form-control:focus { border-color: var(--green); }

.phone-input-group {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--white);
}
.phone-input-group .country-flag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    background: var(--white);
    border-right: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-dark);
    white-space: nowrap;
}
.phone-input-group .country-flag img { width: 22px; height: 16px; object-fit: cover; border-radius: 2px; }
.phone-input-group input {
    border: none;
    flex: 1;
    padding: 15px 12px;
    font-size: 15px;
    outline: none;
    min-width: 0;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 17px;
}

.forgot-link {
    text-align: right;
    margin: -6px 0 20px;
}
.forgot-link a { color: var(--green); font-size: 14px; font-weight: 600; }

.btn-primary {
    width: 100%;
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: 10px;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.btn-primary:hover { background: var(--green-dark); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.switch-auth {
    text-align: center;
    margin-top: 22px;
    font-size: 14.5px;
    color: var(--text-dark);
}
.switch-auth a { color: var(--green); font-weight: 700; }

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 16px;
}
.alert-error { background: #fdecea; color: #b3261e; border: 1px solid #f5c2bd; }
.alert-success { background: #e8f5ec; color: var(--green-dark); border: 1px solid #b9e3c6; }

/* ---------- Top app bar ---------- */
.topbar {
    background: var(--green);
    color: var(--white);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 40;
}
.topbar .menu-btn, .topbar .notif-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 21px;
    cursor: pointer;
    position: relative;
    padding: 4px;
}
.topbar .site-title { font-size: 20px; font-weight: 800; }
.topbar .notif-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 9px;
    height: 9px;
    background: var(--gold);
    border-radius: 50%;
    border: 1.5px solid var(--green);
}

/* ---------- Side drawer menu ---------- */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 60;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 78%;
    max-width: 300px;
    background: var(--white);
    z-index: 70;
    transform: translateX(-100%);
    transition: transform .28s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
    background: var(--green);
    color: var(--white);
    padding: 26px 20px;
    font-size: 20px;
    font-weight: 800;
}
.drawer-nav { padding: 10px 0; flex: 1; }
.drawer-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 22px;
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 600;
}
.drawer-nav a:active { background: var(--green-light); }
.drawer-nav a.logout { color: var(--red); }

/* ---------- Notification side panel ---------- */
.notif-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 82%;
    max-width: 320px;
    background: var(--white);
    z-index: 70;
    transform: translateX(100%);
    transition: transform .28s ease;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
}
.notif-panel.open { transform: translateX(0); }
.notif-panel-head {
    background: var(--green);
    color: var(--white);
    padding: 20px;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.notif-panel-head button { background: none; border: none; color: var(--white); font-size: 20px; }
.notif-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.notif-item {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    font-size: 14px;
    color: var(--text-dark);
}
.notif-item.unread { background: var(--green-light); font-weight: 600; }
.notif-item .notif-snippet {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.notif-item .notif-time { color: var(--text-muted); font-size: 12px; margin-top: 4px; }
.notif-empty { text-align: center; color: var(--text-muted); padding: 40px 20px; font-size: 14px; }

.notif-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 90;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.notif-modal-overlay.open { display: flex; }
.notif-modal {
    background: var(--white);
    border-radius: var(--radius);
    padding: 22px;
    max-width: 340px;
    width: 100%;
}
.notif-modal p { font-size: 15px; line-height: 1.6; margin: 0 0 18px; }
.notif-modal button {
    width: 100%;
    background: var(--green);
    color: var(--white);
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
}

/* ---------- Home page ---------- */
.page-content { padding: 16px; }

.banner-slider {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 14px;
    background: var(--green-light);
}
.banner-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.banner-track::-webkit-scrollbar { display: none; }
.banner-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: block;
}
.banner-slide img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}
.banner-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}
.banner-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    transition: width .2s, background .2s;
}
.banner-dot.active {
    background: var(--white);
    width: 16px;
    border-radius: 4px;
}

.promo-banner {
    background: var(--green);
    color: var(--white);
    border-radius: var(--radius);
    padding: 18px 18px;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 600;
    margin-bottom: 14px;
}

.mytickets-banner {
    background: var(--white);
    border: 1.5px solid var(--green);
    color: var(--green-dark);
    border-radius: var(--radius);
    padding: 16px 18px;
    font-weight: 700;
    font-size: 15px;
    margin-top: 16px;
    margin-bottom: 24px;
    display: block;
    text-align: center;
}

.package-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px 18px;
    box-shadow: var(--shadow);
}
.package-card .pkg-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 2px;
}
.package-card .pkg-sub {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 18px;
}
.qty-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}
.qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: var(--green);
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
}
.qty-value {
    font-size: 18px;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}
.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-top: 1px dashed var(--border);
    margin-bottom: 16px;
    font-weight: 700;
    font-size: 15px;
}
.total-row .amount { color: var(--green-dark); font-size: 17px; }

/* ---------- Bottom navigation ---------- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--white);
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 50;
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
}
.bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    padding: 4px 0;
}
.bottom-nav a i { font-size: 20px; }
.bottom-nav a.active { color: var(--green); }

/* ---------- My tickets page ---------- */
.page-header-bar {
    background: var(--green);
    color: var(--white);
    padding: 18px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 18px;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 40;
}
.page-header-bar a { color: var(--white); font-size: 20px; }

.ticket-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
}
.ticket-card {
    background: var(--white);
    border-radius: 10px;
    padding: 14px;
    box-shadow: var(--shadow);
}
.ticket-card .t-serial {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.ticket-card .t-serial-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 10px;
    word-break: break-all;
}
.ticket-card hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 8px 0;
}
.ticket-card .t-label { font-size: 11px; color: var(--text-muted); }
.ticket-card .t-value { font-size: 13px; font-weight: 600; margin-bottom: 8px; word-break: break-word; }

.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}
.empty-state i { font-size: 42px; margin-bottom: 14px; display: block; }

/* ---------- Profile page ---------- */
.profile-header {
    background: var(--white);
    color: var(--text-dark);
    padding: 22px 16px 24px;
    text-align: center;
    position: relative;
}
.profile-header .ph-title { font-size: 18px; font-weight: 700; }
.profile-avatar-wrap {
    margin-top: 22px;
    text-align: center;
}
.profile-avatar {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: var(--white);
    border: 4px solid var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: var(--shadow);
    font-size: 40px;
    color: #b9c1c9;
    overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { text-align: center; font-size: 19px; font-weight: 800; margin-top: 10px; }
.profile-meta { text-align: center; color: var(--text-muted); font-size: 13.5px; margin-top: 2px; }

.profile-section-title {
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    margin: 22px 0 12px;
}
.profile-info-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 4px 18px;
    margin: 0 16px;
}
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14.5px;
}
.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--text-muted); }
.info-row .value { font-weight: 600; text-align: right; }
.info-row input {
    border: none;
    text-align: right;
    font-weight: 600;
    font-size: 14.5px;
    outline: none;
    width: 60%;
    color: var(--text-dark);
}

.profile-action-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 18px;
    margin: 16px 16px 0;
    font-weight: 700;
    font-size: 15px;
    color: var(--text-dark);
}

/* ---------- Payment page ---------- */
.payment-method-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.payment-method {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    cursor: pointer;
}
.payment-method.selected { border-color: var(--green); background: var(--green-light); }
.payment-method img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; }
.payment-method .pm-name { font-weight: 700; font-size: 15px; }
.payment-method input[type=radio] { margin-left: auto; width: 20px; height: 20px; accent-color: var(--green); }

.pay-instructions {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 18px;
}
.pay-instructions b { color: var(--green-dark); }
.pay-number {
    font-size: 20px;
    font-weight: 800;
    color: var(--green-dark);
    letter-spacing: 1px;
    margin: 4px 0;
}

.order-summary {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 18px;
    margin-bottom: 18px;
}
.order-summary .row { display: flex; justify-content: space-between; font-size: 14.5px; padding: 6px 0; }
.order-summary .row.total { border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 12px; font-weight: 800; font-size: 16px; color: var(--green-dark); }

.container-narrow { padding: 16px; }

@media (min-width: 481px) {
    body { background: #dfe3e0; }
}