@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: normal;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: bold;
}

body {
    /* اضافه کردن فونت وزیر به بادی */
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
:root {
    /* Brand Colors */
    --primary: #40b195;      /* Teal / Green (Main Brand Color) */
    --accent: #f15a25;       /* Orange (Action Color) */
    --dark-text: #2d3436;
    --light-text: #ffffff;
    
    /* UI Variables */
    --bg-body: #f0f2f5;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --card-shadow: 0 15px 35px rgba(64, 177, 149, 0.15); /* Shadow colored with primary */
    --border-radius: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; -webkit-tap-highlight-color: transparent; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--dark-text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    direction: rtl;
    padding: 15px;
}

.container {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Glass Card */
.card {
    background: var(--glass-bg);
    border-radius: var(--border-radius);
    padding: 30px 25px;
    box-shadow: var(--card-shadow);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

/* Typography & Brand */
.brand-logo { width: 70px; height: auto; margin-bottom: 10px; }
h2 { color: var(--primary); font-size: 1.3rem; font-weight: 800; margin-bottom: 5px; }
p.subtitle { color: #888; font-size: 0.85rem; margin-bottom: 25px; }

/* Inputs */
.input-group { position: relative; margin-bottom: 15px; }
input {
    width: 100%; padding: 16px; 
    border: 2px solid #e1e1e1; background: #f9f9f9; 
    border-radius: 15px; font-size: 1.1rem; text-align: center; 
    transition: 0.3s; color: var(--dark-text); font-weight: bold;
}
input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(64, 177, 149, 0.1);
}

/* Buttons */
.btn {
    width: 100%; padding: 16px; border: none; 
    border-radius: 15px; font-size: 1rem; font-weight: 700; 
    cursor: pointer; transition: 0.2s; display: flex; 
    justify-content: center; align-items: center; gap: 8px;
}
.btn-primary {
    background: var(--primary); color: white;
    box-shadow: 0 8px 20px rgba(64, 177, 149, 0.3);
}
.btn-accent {
    background: var(--accent); color: white;
    box-shadow: 0 8px 20px rgba(241, 90, 37, 0.3);
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.7; cursor: not-allowed; }

/* Wallet Card (Specific Design) */
.wallet-card {
    background: linear-gradient(135deg, var(--primary), #2d856f);
    padding: 25px; border-radius: var(--border-radius);
    color: white; text-align: right; position: relative;
    box-shadow: 0 15px 30px rgba(64, 177, 149, 0.4);
}
.wallet-card::after {
    content: ''; position: absolute; top: -30px; left: -30px;
    width: 120px; height: 120px; background: rgba(255,255,255,0.1);
    border-radius: 50%;
}
.wallet-label { font-size: 0.8rem; opacity: 0.9; font-weight: 300; }
.wallet-amount { font-size: 2rem; font-weight: 800; margin: 10px 0; letter-spacing: 1px; }
.currency-badge { 
    background: rgba(255,255,255,0.2); padding: 4px 10px; 
    border-radius: 8px; font-size: 0.75rem; vertical-align: middle; 
}

/* Admin Tabs */
.tabs { display: flex; background: #fff; padding: 5px; border-radius: 15px; margin-bottom: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.tab-btn { flex: 1; padding: 12px; border: none; background: transparent; border-radius: 12px; font-weight: 600; color: #888; cursor: pointer; transition: 0.3s; }
.tab-btn.active { background: var(--primary); color: white; shadow: 0 4px 10px rgba(64,177,149,0.3); }

/* QR Scanner Area */
#reader { width: 100%; border-radius: 15px; overflow: hidden; margin-bottom: 15px; background: #000; }
.scan-status { margin-top: 15px; padding: 15px; border-radius: 12px; font-size: 0.9rem; font-weight: bold; display: none; }
.status-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.status-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* User List Table */
.user-list { width: 100%; border-collapse: collapse; margin-top: 10px; }
.user-list td { padding: 12px 5px; border-bottom: 1px solid #eee; font-size: 0.9rem; }
.user-list tr:last-child td { border-bottom: none; }
.amount-positive { color: var(--primary); font-weight: bold; direction: ltr; }

/* Spinner */
.loader { border: 3px solid rgba(255,255,255,0.3); border-top: 3px solid #fff; border-radius: 50%; width: 20px; height: 20px; animation: spin 1s linear infinite; display: none; margin: 0 auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Mobile Fixes */
@media (max-width: 480px) {
    body { padding: 0; background: #fff; align-items: flex-start; }
    .container { max-width: 100%; min-height: 100vh; padding: 20px; justify-content: flex-start; }
    .card { box-shadow: none; border: none; padding: 10px 0; }
}