/* ============================================
   inLiker Wallet – Dark Low‑Contrast Theme
   v2.5 – Animations, fixes, total users
   ============================================ */

.inliker-admin-wallet {
    max-width: 100%;
    width: 100%;
    margin: 30px auto;
    padding: 15px;
    background: #1a1a1a;
    border-radius: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #b0b0b0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    box-sizing: border-box;
}

/* Search section */
.inliker-search-section {
    position: relative;
    margin-bottom: 15px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

#inliker-admin-search {
    flex: 1;
    padding: 12px 14px;
    background: #242424;
    border: 1px solid #333;
    border-radius: 8px;
    color: #ddd;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

#inliker-admin-search:focus {
    border-color: #e94560;
    box-shadow: 0 0 6px rgba(233, 69, 96, 0.3);
}

/* Total users badge inside search bar */
.total-users-badge {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #1976d2;
    color: #fff;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    z-index: 2;
}

/* Loading / empty states */
.inliker-loading {
    text-align: center;
    padding: 20px;
    color: #888;
    font-style: italic;
}

/* Results container */
#inliker-admin-search-results {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    margin-top: 8px;
    max-height: 70vh;
    overflow-y: auto;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- USER LIST ITEM ---- */
.inliker-search-item {
    display: flex;
    align-items: center;
    padding: 10px 10px;
    border-bottom: 1px solid #2a2a2a;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    margin-bottom: 5px;               /* spacing between tiles */
    background: #1a1a1a;
    border-radius: 6px;
    border: 1px solid #333;
}

.inliker-search-item:last-of-type {
    border-bottom: 1px solid #333;
}

.inliker-search-item:hover {
    background: #2a2a2a;
    transform: scale(1.01);
}

/* Avatar – round */
.inliker-item-avatar {
    flex: 0 0 38px;
    margin-right: 10px;
}

.inliker-item-avatar img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #444;
}

/* Content area */
.inliker-item-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* Line 1: Name + (ID: #...) + role tag */
.inliker-item-line1 {
    font-weight: 700;
    font-size: 14px;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.inliker-item-line1 .user-id-role {
    font-weight: 400;
    font-size: 12px;
    color: #aaa;
    margin-left: 5px;
}

.role-tag {
    background: #333;
    color: #ccc;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 5px;
    display: inline-block;
    vertical-align: middle;
}

/* Line 2: Email – same size as name */
.inliker-item-line2 {
    font-size: 14px;
    color: #bbb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 1px;
}

/* Line 3: Phone + (Country) – phone same size, country small */
.inliker-item-line3 {
    font-size: 14px;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.country-bracket {
    font-size: 12px;
    color: #999;
}

/* Balance – fixed width to prevent shrinking */
.inliker-item-balance {
    flex: 0 0 70px;
    font-size: 14px;
    font-weight: 700;
    color: #4caf50;
    margin-left: 10px;
    white-space: nowrap;
    text-align: right;
    align-self: center;
}

/* ---- EDIT CARD ---- */
.inliker-edit-container {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.inliker-edit-card-header {
    text-align: right;
    margin-bottom: 5px;
}

.inliker-close-edit {
    background: none;
    border: none;
    color: #aaa;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
    transition: color 0.2s;
}
.inliker-close-edit:hover {
    color: #fff;
}

.inliker-user-card-large {
    display: flex;
    align-items: flex-start;
    background: #242424;
    border: 2px solid #4caf50;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.inliker-user-avatar-large {
    flex: 0 0 64px;
    margin-right: 16px;
}
.inliker-user-avatar-large img {
    width: 64px;
    height: 64px;
    border-radius: 50%;             /* round */
    border: 2px solid #4caf50;
}

.inliker-user-details-large {
    flex: 1;
}

.inliker-large-line1 {
    font-size: 18px;
    font-weight: 700;
    color: #e0e0e0;
    margin-bottom: 2px;
}
.inliker-large-line1 #inliker-user-id-format {
    font-weight: 400;
    font-size: 14px;
    color: #aaa;
    margin-left: 8px;
}

/* Role on separate line */
.inliker-large-role {
    margin-bottom: 6px;
}
.role-tag-large {
    background: #333;
    color: #ccc;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 13px;
    display: inline-block;
}

.inliker-large-line2 {
    font-size: 15px;
    color: #bbb;
    margin-bottom: 4px;
}

.inliker-large-line3 {
    font-size: 15px;
    color: #aaa;
}
.inliker-large-line3 .country-bracket {
    font-size: 13px;
    color: #999;
}

/* Balance panel */
.inliker-balance-panel {
    background: #1f1f1f;
    border-radius: 8px;
    padding: 18px;
    text-align: center;
    margin-bottom: 16px;
}
.inliker-balance-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #777;
}
.inliker-balance-amount {
    font-size: 32px;
    font-weight: 700;
    color: #4caf50;
    text-shadow: 0 0 8px rgba(76,175,80,0.2);
    margin-top: 4px;
}

/* Adjustment form */
.inliker-adjust-form .inliker-form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
}
.inliker-adjust-form input[type="number"] {
    flex: 2;
    padding: 12px;
    background: #242424;
    border: 1px solid #333;
    border-radius: 6px;
    color: #ddd;
    font-size: 15px;
    box-sizing: border-box;
}

.inliker-operation-buttons {
    display: flex;
    gap: 8px;
    flex: 1;
}
.inliker-op-btn {
    flex: 1;
    padding: 10px 8px;
    background: #242424;
    border: 1px solid #333;
    border-radius: 6px;
    color: #bbb;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.inliker-op-btn.active {
    background: #4caf50;
    border-color: #4caf50;
    color: #fff;
}
.inliker-op-btn.debit-btn.active {
    background: #d32f2f;
    border-color: #d32f2f;
}
.inliker-op-btn:not(.active):hover {
    background: #2a2a2a;
}

/* Update Balance button – blue */
.inliker-btn {
    width: 100%;
    padding: 13px;
    background: #1976d2;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}
.inliker-btn:hover {
    background: #42a5f5;
    box-shadow: 0 0 12px rgba(25,118,210,0.5);
}

#inliker-admin-message {
    margin-top: 10px;
    font-size: 14px;
    text-align: center;
}
#inliker-admin-message.success { color: #4caf50; }
#inliker-admin-message.error { color: #ff5252; }

.inliker-admin-denied {
    text-align: center;
    color: #ff5252;
    padding: 40px;
}

/* Frontend balance – plain text */
.inliker-user-balance {
    font-weight: normal;
    color: inherit;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .inliker-admin-wallet {
        margin: 10px auto;
        padding: 10px;
    }
    .inliker-search-item {
        padding: 8px 8px;
        margin-bottom: 4px;
    }
    .inliker-item-avatar {
        flex: 0 0 32px;
        margin-right: 6px;
    }
    .inliker-item-avatar img {
        width: 32px;
        height: 32px;
    }
    .inliker-item-line1 {
        font-size: 13px;
    }
    .inliker-item-line2,
    .inliker-item-line3 {
        font-size: 13px;
    }
    .inliker-item-balance {
        flex: 0 0 60px;
        font-size: 13px;
    }
}