:root {
    --bg: #f0fdf4;
    --surface: #ffffff;
    --surface-alt: #f0fdf4;
    --accent: #10b981;
    --accent-soft: #34d399;
    --accent-strong: #ec4899;
    --text: #065f46;
    --muted: #059669;
    --danger: #ec4899;
    --warning: #f59e0b;
    --pink-light: #fdf2f8;
    --pink-accent: #ec4899;
    --green-light: #dcfce7;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #f0fdf4 0%, #dbeafe 100%);
    min-height: 100vh;
    color: var(--text);
}

button, input, select, textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
    gap: 1rem;
}

.app-shell.no-sidebar {
    grid-template-columns: 1fr;
}

.sidebar {
    background: var(--surface);
    padding: 28px 20px;
    border-right: 2px solid #10b981;
    box-shadow: 0 24px 80px rgba(16, 185, 129, 0.05);
}

.menu-toggle {
    display: none;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 1001;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.sidebar.open {
    transform: translateX(0);
}


.brand {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
    color: var(--accent);
}

.sidebar nav {
    display: grid;
    gap: 10px;
}

.nav-item {
    display: block;
    padding: 13px 16px;
    border-radius: 14px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-item:hover, .nav-item.active {
    color: var(--accent);
    background: rgba(16, 185, 129, 0.10);
    border-color: rgba(16, 185, 129, 0.18);
}


main {
    display: flex;
    flex-direction: column;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    background: var(--surface);
    border-bottom: 2px solid #10b981;
    box-shadow: 0 18px 40px rgba(16, 185, 129, 0.06);
}


.logo {
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text);
}

.top-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.wallet {
    color: var(--text);
    font-weight: 600;
}

.content {
    padding: 28px;
    min-height: calc(100vh - 80px);
    background: transparent;
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    padding: 20px;
}

.login-card {
    width: min(100%, 420px);
    background: var(--surface);
    color: var(--text);
    border-radius: 28px;
    box-shadow: 0 35px 90px rgba(16, 185, 129, 0.12);
    padding: 36px 32px;
    border: 1px solid #d1fae5;
}


.login-card__header {
    text-align: center;
    margin-bottom: 30px;
}

.login-badge {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent);
    font-size: 0.85rem;
    margin-bottom: 14px;
}


.login-card h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--text);
}

.login-card__header p {
    color: var(--muted);
    line-height: 1.75;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 0.95rem;
}

.login-form input {
    border: 1px solid rgba(0,0,0,0.1);
    background: #ffffff;
    color: var(--text);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
    margin-bottom: 18px;
}

.login-form input::placeholder {
    color: rgba(0,0,0,0.5);
}

.login-form .button {
    width: 100%;
    padding: 14px 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-soft));
    color: #ffffff;
    border: none;
}

.login-form .button:hover {
    opacity: 0.94;
}

.login-card__footer {
    margin-top: 20px;
    text-align: center;
}

.login-card__footer p {
    margin: 0;
    color: var(--muted);
}

.link-button {
    border: none;
    background: transparent;
    color: var(--accent);
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.link-button:hover {
    text-decoration: underline;
}

.card {
    background: var(--surface);
    border: 1px solid #d1fae5;
    border-radius: 22px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 24px 50px rgba(16, 185, 129, 0.06);
}

.recharge-card {
    max-width: 560px;
    margin: 0 auto;
    padding: 24px;
    border-radius: 34px;
    border: 1px solid #d1fae5;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(16, 185, 129, 0.08);
}


.recharge-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.recharge-modal-header h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #1f1f45;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e9e7ef;
    background: #ffffff;
    color: #42425a;
    font-size: 1.05rem;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.recharge-card-inner {
    display: grid;
    gap: 24px;
}

.recharge-panel {
    padding: 24px;
    border-radius: 30px;
    border: 1px solid #f3d2df;
    background: #fdf2f8;
}


.recharge-panel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.panel-label {
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #9ca3af;
    font-size: 0.78rem;
}

.amount-chip {
    padding: 10px 14px;
    border-radius: 999px;
    background: #dcfce7;
    color: #059669;
    font-weight: 700;
    font-size: 0.95rem;
}

.amount-input {
    width: 100%;
    max-width: 180px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 2px solid #10b981;
    background: #d1fae5;
    color: #059669;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
}

.amount-input::placeholder {
    color: #6ee7b7;
}

.amount-input:focus {
    outline: none;
    border-color: #10b981;
    background: #ecfdf5;
}


.send-money-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 18px;
    border: 1px dashed #f3d2df;
}

.send-label {
    color: #6b7280;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    margin-bottom: 10px;
}

.send-number-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.send-number {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #18181b;
}

.icon-copy {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    border: 1px solid #d1fae5;
    background: #ecfdf5;
    color: #10b981;
    cursor: pointer;
    font-size: 1.1rem;
}


.payment-hints {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    color: #4b5563;
    font-size: 0.95rem;
}

.payment-hints span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.recharge-form {
    display: grid;
    gap: 16px;
}

.recharge-form label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #4b5563;
    text-transform: uppercase;
}

.recharge-form input {
    width: 100%;
    border-radius: 22px;
    border: 1px solid #d1fae5;
    background: #ecfdf5;
    padding: 16px 18px;
    font-size: 1rem;
    color: #059669;
}

.recharge-submit {
    width: 100%;
    padding: 16px 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    font-weight: 700;
}


.recharge-note {
    margin: 0;
    color: #6b7280;
    font-size: 0.95rem;
    display: none;
}

@media (max-width: 640px) {
    .recharge-card {
        padding: 18px;
    }
    .recharge-modal-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .recharge-panel-top,
    .send-number-wrapper,
    .payment-hints {
        flex-direction: column;
        align-items: flex-start;
    }
    .recharge-form input {
        padding: 14px 16px;
    }
}

@media (max-width: 840px) {
    .recharge-header,
    .payment-summary,
    .recharge-form .form-row {
        grid-template-columns: 1fr;
    }

    .payment-summary {
        text-align: left;
    }
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

h1, h2, h3 {
    margin: 0 0 12px;
}

p {
    margin: 0 0 12px;
    color: var(--muted);
}

.button {
    border: none;
    border-radius: 999px;
    padding: 12px 20px;
    color: #ffffff;
    background: linear-gradient(135deg, #10b981, #34d399);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-outline {
    background: transparent;
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--accent);
}


.button-light {
    background: rgba(15, 23, 42, 0.05);
    color: var(--text);
}

input, select, textarea {
    width: 100%;
    border: 1px solid #d1fae5;
    background: #f0fdf4;
    color: var(--text);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 14px;
}


textarea {
    min-height: 120px;
    resize: vertical;
}

.hidden {
    display: none !important;
}

.auth-panel {
    max-width: 720px;
    margin: 40px auto;
    background: var(--surface);
    border-radius: 24px;
    padding: 28px;
    border: 1px solid #d1fae5;
}


.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    background: #f8fafc;
    color: var(--muted);
    border: none;
    padding: 14px 0;
    border-radius: 14px;
}

.tab.active {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent);
}


.auth-form {
    max-width: 480px;
}

.welcome-card {
    max-width: 720px;
    margin: 40px auto;
    text-align: center;
}

.auth-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.table th {
    color: var(--muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    background: rgba(16, 185, 129, 0.15);
}

.badge.success { background: rgba(16, 185, 129, 0.18); color: #065f46; }
.badge.pending { background: rgba(236, 72, 153, 0.18); color: #be185d; }
.badge.cancel { background: rgba(239, 68, 68, 0.18); color: #991b1b; }

.small-card {
    background: #f0fdf4;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid #d1fae5;
}

.small-card.clickable-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.small-card.clickable-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.12);
    background: #dcfce7;
}


.loader {
    max-width: 820px;
    margin: 40px auto;
    padding: 40px;
    text-align: center;
    border: 1px solid #d1fae5;
    border-radius: 24px;
    background: var(--surface);
}

.order-card {
    border: 1px solid #d1fae5;
    border-radius: 20px;
    background: #f0fdf4;
    padding: 20px;
    margin-bottom: 18px;
}


.order-card h3 {
    margin-bottom: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 980px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(280px, 85%);
        max-width: 280px;
        transform: translateX(-110%);
        transition: transform 0.25s ease;
        z-index: 1002;
        height: 100vh;
        overflow-y: auto;
        border-right: none;
        box-shadow: 24px 0 80px rgba(16, 185, 129, 0.15);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .content { padding: 18px; }
    .grid-3, .grid-2, .form-row { grid-template-columns: 1fr; }
    .topbar {
        padding: 16px 18px;
        gap: 12px;
    }
    .topbar .logo {
        flex: 1;
    }
    .topbar .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 14px;
        font-size: 1.2rem;
    }
    .sidebar-overlay {
        display: block;
    }
    .sidebar-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }
    .top-actions {
        gap: 10px;
        flex-wrap: wrap;
    }
}

@media (max-width: 680px) {
    body { padding: 0; }
    .topbar {
        flex-direction: column;
        align-items: stretch;
    }
    .top-actions {
        justify-content: stretch;
    }
}

/* Modal Dialog Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-dialog {
    background: var(--surface);
    border-radius: 24px;
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease;
    border: 1px solid #d1fae5;
}

.modal-dialog.close-animation {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #d1fae5;
}

.modal-header h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.5rem;
}

.modal-close-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.modal-close-btn:hover {
    background: #f0fdf4;
    color: var(--text);
}

.modal-body {
    margin-bottom: 16px;
}

.modal-body strong {
    display: block;
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 16px;
}

#orderForm {
    display: grid;
    gap: 14px;
}

@media (max-width: 640px) {
    .modal-dialog {
        padding: 24px 20px;
        border-radius: 20px;
        max-width: 95%;
    }
    
    .modal-header {
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-close-btn {
        width: 36px;
        height: 36px;
        font-size: 1.3rem;
    }
}
    align-items: center;
}

.login-card {
    width: min(420px, 100%);
    padding: 32px;
    border-radius: 24px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
}

.admin-auth input {
    margin-bottom: 18px;
}

main {
    position: relative;
}

.welcome-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    max-width: 400px;
    width: 100%;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Toast Notifications */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

#toastContainer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
