/* ============================================================
   WALLET PLATFORM — Design System
   Mobile-first, premium, blue accent (#3977af)
   Compatible con DropGift dark-theme admin
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ============================================================
   BASE
   ============================================================ */
.wallet-body {
    margin: 0;
    padding: 0;
    background: #f4f6f9;
    font-family: 'Poppins', sans-serif;
    color: #333;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   AUTH PAGE
   ============================================================ */
.wallet-auth-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f4f6f9 0%, #e8ecf1 100%);
}

.wallet-auth-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 24px;
    width: 100%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

.wallet-auth-logo {
    margin-bottom: 25px;
}

.wallet-auth-logo img {
    display: inline-block;
}

.wallet-auth-subtitle {
    font-size: 0.85rem;
    color: #888;
    margin-top: 5px;
}

.wallet-auth-links {
    margin-top: 20px;
    font-size: 0.85rem;
    color: #888;
}

.wallet-auth-links a {
    color: #3977af;
    text-decoration: none;
}

.wallet-auth-links strong {
    font-weight: 600;
}

/* ============================================================
   FORMS (shared)
   ============================================================ */
.wallet-form-group {
    margin-bottom: 15px;
    text-align: left;
}

.wallet-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.wallet-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e8ecf1;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    background: #fff;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    outline: none;
}

.wallet-input:focus {
    border-color: #3977af;
    box-shadow: 0 0 0 3px rgba(57, 119, 175, 0.12);
}

.wallet-input::placeholder {
    color: #aaa;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.wallet-btn-primary {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #3977af 0%, #2d6091 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(57, 119, 175, 0.3);
}

.wallet-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(57, 119, 175, 0.4);
}

.wallet-btn-primary:active {
    transform: translateY(0);
}

.wallet-btn-del {
    background: #fee2e2;
    color: #b91c1c;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: background 0.2s;
}

.wallet-btn-del:hover {
    background: #fecaca;
}

/* ============================================================
   ALERTS
   ============================================================ */
.wallet-alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wallet-alert-success {
    background: #dcfce7;
    color: #15803d;
}

.wallet-alert-error {
    background: #fee2e2;
    color: #b91c1c;
}

.wallet-alert .material-icons-round {
    font-size: 1.2rem;
}

/* ============================================================
   CLIENT DASHBOARD
   ============================================================ */
.wallet-client-wrap {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 40px;
    background: #f4f6f9;
}

.wallet-header-clean {
    padding: 35px 25px 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.wallet-digital-card {
    background: linear-gradient(135deg, #3977af 0%, #205081 100%);
    color: white;
    border-radius: 20px;
    padding: 28px 25px;
    margin: 10px 25px 30px 25px;
    box-shadow: 0 12px 30px rgba(57, 119, 175, 0.35);
    position: relative;
    overflow: hidden;
}

.wallet-digital-card::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
}

.wallet-card-points {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.wallet-card-pts {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.8;
}

/* Grid Menu */
.wallet-grid-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 0 25px;
}

.wallet-menu-item {
    background: #fff;
    color: #333;
    padding: 22px 15px;
    border-radius: 18px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.wallet-menu-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.wallet-icon-box {
    width: 48px;
    height: 48px;
    background: #edf2f7;
    color: #3977af;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px auto;
    font-size: 24px;
}

.wallet-logout-link {
    color: #e74c3c;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}

/* ============================================================
   VIEWS (premios, historial, perfil, cartera)
   ============================================================ */
.wallet-view-wrap {
    padding: 30px 25px;
}

.wallet-view-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.wallet-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #3977af;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* Premios / Rewards */
.wallet-reward-card {
    background: #fff;
    padding: 18px;
    border-radius: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.wallet-reward-icon {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    background: #edf2f7;
    color: #3977af;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wallet-reward-info {
    flex: 1;
    min-width: 0;
}

.wallet-reward-btn {
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    flex-shrink: 0;
    font-family: 'Poppins', sans-serif;
    background: #3977af;
    color: #fff;
    transition: transform 0.15s;
}

.wallet-reward-btn:hover:not(.disabled) {
    transform: scale(1.05);
}

.wallet-reward-btn.disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

/* Historial */
.wallet-history-list {
    background: #fff;
    border-radius: 16px;
    padding: 5px 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.wallet-history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}

.wallet-history-item:last-child {
    border-bottom: none;
}

.wallet-history-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wallet-history-icon.positive {
    background: #dcfce7;
    color: #15803d;
}

.wallet-history-icon.negative {
    background: #fee2e2;
    color: #b91c1c;
}

.wallet-history-info {
    flex: 1;
    min-width: 0;
}

.wallet-history-pts {
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.wallet-history-pts.positive {
    color: #15803d;
}

.wallet-history-pts.negative {
    color: #b91c1c;
}

/* Cartera */
.wallet-total-box {
    background: #fff;
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.wallet-cartera-item {
    background: #fff;
    padding: 16px 18px;
    border-radius: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.wallet-cartera-icon {
    width: 40px;
    height: 40px;
    background: #edf2f7;
    color: #3977af;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wallet-cartera-pts {
    font-weight: 700;
    color: #3977af;
    flex-shrink: 0;
}

/* Perfil */
.wallet-profile-card {
    background: #fff;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* ============================================================
   SUCCESS MODAL
   ============================================================ */
.wallet-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.wallet-modal {
    background: #fff;
    width: 85%;
    max-width: 320px;
    border-radius: 25px;
    padding: 35px 25px;
    text-align: center;
    color: #333;
    animation: walletPopUp 0.3s ease-out;
}

@keyframes walletPopUp {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.wallet-modal-icon {
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.wallet-modal-icon .material-icons-round {
    color: #2ecc71;
    font-size: inherit;
}

.wallet-modal h2 {
    margin: 0 0 10px 0;
    font-size: 1.4rem;
}

.wallet-code-box {
    background: #edf2f7;
    border: 2px dashed #3977af;
    color: #3977af;
    font-size: 1.5rem;
    font-weight: 800;
    padding: 15px;
    margin: 20px 0;
    border-radius: 12px;
    letter-spacing: 3px;
}

.wallet-btn-modal {
    display: inline-block;
    background: linear-gradient(135deg, #3977af 0%, #2d6091 100%);
    color: #fff;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 20px;
    font-weight: 600;
    margin-top: 10px;
    transition: transform 0.15s;
}

.wallet-btn-modal:hover {
    transform: scale(1.05);
}

/* ============================================================
   BUSINESS PANEL
   ============================================================ */
.wallet-biz-wrap {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.wallet-biz-card {
    background: #fff;
    border-radius: 24px;
    padding: 30px 25px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.06);
}

.wallet-biz-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

/* Biz Stats Row */
.wallet-biz-stats {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.wallet-biz-stat {
    flex: 1;
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
}

.wallet-biz-stat-num {
    font-size: 1.3rem;
    font-weight: 700;
    color: #3977af;
}

.wallet-biz-stat-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tabs */
.wallet-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    background: #f0f4f8;
    padding: 5px;
    border-radius: 14px;
}

.wallet-tab {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    border-radius: 10px;
    text-decoration: none;
    color: #666;
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s;
}

.wallet-tab .material-icons-round {
    font-size: 18px;
}

.wallet-tab.active {
    background: #3977af;
    color: #fff;
    box-shadow: 0 2px 8px rgba(57, 119, 175, 0.3);
}

/* Item list (rewards in biz panel) */
.wallet-item-list {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wallet-item-list:last-child {
    border-bottom: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
    .wallet-auth-card {
        padding: 30px 20px;
    }
    
    .wallet-card-points {
        font-size: 2.8rem;
    }
    
    .wallet-grid-menu {
        padding: 0 15px;
        gap: 10px;
    }
    
    .wallet-view-wrap {
        padding: 25px 15px;
    }
    
    .wallet-biz-card {
        padding: 25px 18px;
    }
    
    .wallet-digital-card {
        margin: 10px 15px 25px 15px;
    }
    
    .wallet-header-clean {
        padding: 30px 15px 10px 15px;
    }
}

/* LANDING PAGE */
.wallet-landing-feature {
    flex: 1;
    background: #f8fafc;
    border-radius: 14px;
    padding: 18px 10px;
    text-align: center;
}
.wallet-btn-secondary {
    width: 100%;
    padding: 14px 20px;
    background: #fff;
    color: #3977af;
    border: 2px solid #3977af;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s;
    box-sizing: border-box;
}
.wallet-btn-secondary:hover {
    background: #3977af;
    color: #fff;
}

/* ============================================================
   ICON SELECTOR
   ============================================================ */
.wallet-icon-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
}
.wallet-icon-option {
    cursor: pointer;
}
.wallet-icon-option input[type="radio"] {
    display: none;
}
.wallet-icon-option .material-icons-round {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f0f2f5;
    color: #888;
    font-size: 22px;
    transition: all 0.15s;
    border: 2px solid transparent;
}
.wallet-icon-option input[type="radio"]:checked + .material-icons-round {
    background: rgba(57, 119, 175, 0.12);
    color: #3977af;
    border-color: #3977af;
}
.wallet-icon-option:hover .material-icons-round {
    background: #e8edf2;
    color: #555;
}

/* ============================================================
   ITEM LIST (rewards list)
   ============================================================ */
.wallet-item-list {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 10px;
}
.wallet-btn-del {
    background: #FEE2E2;
    color: #DC2626;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
}
.wallet-btn-del:hover {
    background: #FECACA;
}

/* QR Buttons */
.wallet-btn-qr {
    background: #EFF6FF;
    color: #3977af;
    border: 1px solid #3977af;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.wallet-btn-qr:hover { background: #DBEAFE; }

.wallet-btn-qr-gen {
    background: #f0f2f5;
    color: #555;
    border: 1px dashed #ccc;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.wallet-btn-qr-gen:hover { background: #e8edf2; border-color: #3977af; color: #3977af; }
