/* eWallet - Easypaisa Inspired Green UI */
:root {
    --green: #1AAB3A;
    --green-dark: #148A2E;
    --green-light: #E8F8EC;
    --green-mid: #23C549;
    --white: #ffffff;
    --bg: #F4F6F8;
    --text: #1A1A2E;
    --text-muted: #7A8596;
    --border: #E2E8F0;
    --red: #E53E3E;
    --yellow: #F6AD55;
    --shadow: 0 4px 20px rgba(26,171,58,0.12);
    --radius: 14px;
    --radius-sm: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 15px;
}

a { text-decoration: none; color: var(--green); }
a:hover { color: var(--green-dark); }

/* ===== SPLASH / AUTH PAGES ===== */
.auth-wrapper {
    min-height: 100vh;
    background: var(--green);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-logo {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.auth-logo .logo-icon {
    width: 80px; height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; margin: 0 auto 14px;
}

.auth-logo h1 { font-size: 32px; font-weight: 700; letter-spacing: 1px; }
.auth-logo p { font-size: 14px; opacity: 0.85; margin-top: 4px; }

.auth-card {
    background: white;
    border-radius: var(--radius);
    padding: 32px 28px;
    width: 100%; max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.auth-card h2 {
    color: var(--green);
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 24px;
}

/* ===== FORM ELEMENTS ===== */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrap .icon {
    position: absolute; left: 14px;
    color: var(--text-muted); font-size: 16px;
    pointer-events: none;
}

.input-wrap input,
.input-wrap select {
    width: 100%;
    padding: 13px 14px 13px 44px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    background: #fafafa;
}

.input-wrap input:focus,
.input-wrap select:focus {
    border-color: var(--green);
    background: white;
}

.input-wrap .toggle-pass {
    position: absolute; right: 14px;
    cursor: pointer; color: var(--text-muted);
    background: none; border: none; font-size: 16px;
    padding: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    background: #fafafa;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--green);
    background: white;
}

.form-group textarea { resize: vertical; min-height: 80px; }

.forgot-link {
    text-align: right;
    margin-top: -8px;
    margin-bottom: 14px;
}

.forgot-link a { font-size: 13px; color: var(--text-muted); }

/* ===== BUTTONS ===== */
.btn {
    display: block; width: 100%;
    padding: 14px 20px;
    border: none; border-radius: var(--radius-sm);
    font-size: 15px; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
    text-align: center;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--green);
    color: white;
}
.btn-primary:hover { background: var(--green-dark); color: white; }

.btn-outline {
    background: transparent;
    border: 2px solid var(--green);
    color: var(--green);
}
.btn-outline:hover { background: var(--green); color: white; }

.btn-danger {
    background: var(--red);
    color: white;
}
.btn-danger:hover { background: #c53030; }

.btn-sm {
    display: inline-block; width: auto;
    padding: 7px 14px; font-size: 13px;
}

.btn-icon {
    display: flex; align-items: center;
    justify-content: center; gap: 8px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

/* ===== ALERTS ===== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}

.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.alert-info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ===== MAIN APP LAYOUT ===== */
.app-wrapper {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    padding-bottom: 80px;
}

/* Top Header */
.app-header {
    background: var(--green);
    padding: 18px 20px 60px;
    position: relative;
}

.app-header .header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.app-header .greeting h3 {
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.app-header .greeting p {
    color: rgba(255,255,255,0.75);
    font-size: 13px;
}

.header-actions { display: flex; gap: 10px; }

.notif-btn {
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.2);
    border: none; border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: white;
    position: relative;
}

.notif-badge {
    position: absolute; top: -2px; right: -2px;
    background: var(--red); color: white;
    font-size: 10px; width: 16px; height: 16px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

/* Balance Card */
.balance-card {
    margin: 0 16px;
    background: linear-gradient(135deg, #1AAB3A, #16903A);
    border-radius: var(--radius);
    padding: 22px 22px 18px;
    color: white;
    position: relative;
    z-index: 2;
    margin-top: -45px;
    box-shadow: 0 8px 30px rgba(26,171,58,0.35);
}

.balance-card .balance-label {
    font-size: 13px;
    opacity: 0.85;
    margin-bottom: 6px;
}

.balance-card .balance-amount {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.balance-card .wallet-icon {
    position: absolute;
    right: 20px; top: 50%;
    transform: translateY(-50%);
    font-size: 42px;
    opacity: 0.3;
}

.balance-card .balance-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 12px;
    opacity: 0.8;
}

/* ===== QUICK ACTIONS ===== */
.section { padding: 16px; }
.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    padding: 8px 4px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.action-item:hover { background: white; }

.action-icon {
    width: 54px; height: 54px;
    background: var(--green-light);
    border-radius: 14px;
    display: flex; align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--green);
    transition: background 0.2s;
}

.action-item:hover .action-icon { background: var(--green); color: white; }

.action-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    line-height: 1.3;
}

/* ===== PROMO BANNER ===== */
.promo-banner {
    margin: 0 16px 4px;
    background: linear-gradient(135deg, #2d7d46, #1AAB3A);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.promo-banner h4 { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.promo-banner p { font-size: 12px; opacity: 0.85; }
.promo-icon { font-size: 38px; }

/* ===== TRANSACTION LIST ===== */
.txn-list { list-style: none; }

.txn-item {
    background: white;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.txn-icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.txn-icon.send { background: #ffe4e4; color: var(--red); }
.txn-icon.receive { background: var(--green-light); color: var(--green); }
.txn-icon.deposit { background: #e8f4ff; color: #3182ce; }
.txn-icon.withdraw { background: #fff4e0; color: #d97706; }

.txn-info { flex: 1; }
.txn-info .txn-title { font-size: 14px; font-weight: 600; color: var(--text); }
.txn-info .txn-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.txn-amount { text-align: right; }
.txn-amount .amount { font-size: 15px; font-weight: 700; }
.txn-amount .amount.positive { color: var(--green); }
.txn-amount .amount.negative { color: var(--red); }
.txn-amount .txn-date { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 100%; max-width: 480px;
    background: white;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 12px;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.07);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: color 0.2s;
}

.nav-item .nav-icon { font-size: 20px; }
.nav-item.active { color: var(--green); }
.nav-item.active .nav-icon-wrap {
    background: var(--green);
    color: white;
    border-radius: 50%;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    margin-bottom: 2px;
    margin-top: -16px;
    box-shadow: 0 4px 12px rgba(26,171,58,0.35);
}

/* ===== PAGE HEADER ===== */
.page-header {
    background: var(--green);
    padding: 50px 20px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: white;
}

.back-btn {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; text-decoration: none;
    font-size: 18px; flex-shrink: 0;
}

.page-header h2 { font-size: 20px; font-weight: 700; }

/* ===== CARDS ===== */
.card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* ===== PAYMENT OPTIONS ===== */
.payment-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.payment-option.selected,
.payment-option:hover {
    border-color: var(--green);
    background: var(--green-light);
}

.payment-option input[type="radio"] { display: none; }

.pm-logo {
    width: 40px; height: 40px;
    border-radius: 8px;
    display: flex; align-items: center;
    justify-content: center;
    font-size: 14px; font-weight: 700;
    flex-shrink: 0;
}

.pm-logo.easypaisa { background: var(--green); color: white; }
.pm-logo.jazzcash  { background: #c00; color: white; }
.pm-logo.bank      { background: #1a365d; color: white; }

.pm-info .pm-name { font-size: 14px; font-weight: 600; }
.pm-info .pm-desc { font-size: 12px; color: var(--text-muted); }

.pm-check {
    margin-left: auto;
    color: var(--green);
    font-size: 18px; font-weight: 700;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    background: white;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 16px;
    border: 1.5px solid var(--border);
}

.tab-btn {
    flex: 1;
    padding: 12px 10px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--green);
    color: white;
}

/* ===== BADGES / STATUS ===== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background: var(--green-light); color: var(--green); }
.badge-pending { background: #fff3cd; color: #856404; }
.badge-danger  { background: #f8d7da; color: var(--red); }

/* ===== PROFILE ===== */
.profile-header {
    background: var(--green);
    padding: 40px 20px 30px;
    text-align: center;
    color: white;
}

.profile-avatar {
    width: 80px; height: 80px;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    display: flex; align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 12px;
    border: 3px solid rgba(255,255,255,0.5);
}

.profile-header h3 { font-size: 20px; font-weight: 700; }
.profile-header p  { font-size: 13px; opacity: 0.8; margin-top: 2px; }

.menu-list { list-style: none; }

.menu-item a,
.menu-item button {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    text-decoration: none;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    width: 100%;
    background: white;
    border: none;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
    text-align: left;
}

.menu-item a:hover,
.menu-item button:hover { background: var(--green-light); color: var(--green); }

.menu-item .menu-icon {
    width: 38px; height: 38px;
    background: var(--green-light);
    border-radius: 10px;
    display: flex; align-items: center;
    justify-content: center;
    font-size: 18px; color: var(--green);
    flex-shrink: 0;
}

.menu-item .menu-arrow { margin-left: auto; color: var(--text-muted); }

/* ===== ADMIN PANEL ===== */
.admin-wrapper { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.admin-header {
    background: var(--green);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    box-shadow: var(--shadow);
}

.admin-header .brand { font-size: 20px; font-weight: 700; }
.admin-header nav { display: flex; gap: 6px; }

.admin-nav-link {
    color: rgba(255,255,255,0.8);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.admin-nav-link:hover,
.admin-nav-link.active { background: rgba(255,255,255,0.2); color: white; }

.admin-main { padding: 24px 0; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 4px solid var(--green);
}

.stat-card.red   { border-left-color: var(--red); }
.stat-card.blue  { border-left-color: #3182ce; }
.stat-card.yellow{ border-left-color: #d97706; }

.stat-card .stat-label { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.stat-card .stat-value { font-size: 26px; font-weight: 700; color: var(--text); }

.admin-table-wrap {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.admin-table-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-table-header h3 { font-size: 16px; font-weight: 700; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table th {
    background: #f7fafc;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

table tr:last-child td { border-bottom: none; }
table tr:hover td { background: #f9fafb; }

.admin-form-wrap {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

/* ===== SUMMARY ROW ===== */
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.summary-row:last-child { border-bottom: none; font-weight: 700; }
.summary-row .label { color: var(--text-muted); }

/* ===== SPINNER ===== */
.spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ===== CONFIRM MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal-box {
    background: white;
    border-radius: var(--radius);
    padding: 28px 24px;
    max-width: 320px; width: 90%;
    text-align: center;
}

.modal-box h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.modal-box p  { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }

.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { padding: 12px; }

/* ===== UTILITY ===== */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); font-size: 13px; }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }
.mb-0        { margin-bottom: 0; }
.mb-8        { margin-bottom: 8px; }
.mb-16       { margin-bottom: 16px; }
.mt-16       { margin-top: 16px; }
.divider     { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

.page-content { padding: 20px 16px; }

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
    .app-wrapper, .bottom-nav { max-width: 480px; }

    .admin-header { padding: 16px 40px; }
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 600px) {
    .admin-nav-link span { display: none; }
    table { font-size: 12px; }
    table th, table td { padding: 10px 10px; }
}
