/* Users Info Table Styles */
.data-table {
    width: 100vw;
    max-width: 100vw;
    margin: 2rem 0 2rem -50vw;
    left: 50%;
    position: relative;
    right: 0;
    border-collapse: collapse;
    background: var(--card-background);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    font-size: 1.1rem;
    overflow-x: auto;
}

.data-table th, .data-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    color: var(--text-primary);
}

.data-table th {
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-top: 1px solid #e5e7eb;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: #f1f5f9;
}

#users-basic-info {
    width: 100vw;
    max-width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
    background: var(--background-color);
    padding: 2rem 0;
}

@media (max-width: 900px) {
    .data-table, #users-basic-info {
        width: 100vw;
        max-width: 100vw;
        font-size: 0.95rem;
        padding: 0.5rem 0;
    }
    .data-table th, .data-table td {
        padding: 0.5rem 0.7rem;
    }
}
:root {
            --primary-color: #2563eb;
            --secondary-color: #1d4ed8;
            --success-color: #059669;
            --danger-color: #dc2626;
            --background-color: #f3f4f6;
            --card-background: #ffffff;
            --text-primary: #1f2937;
            --text-secondary: #6b7280;
        }

        body {
            background-color: var(--background-color);
            font-family: 'Inter', sans-serif;
            margin: 0;
            padding: 0;
        }

        .admin-container {
            max-width: 1200px;
            margin: 2rem auto;
            padding: 0 1.5rem;
        }

        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
            flex-wrap: wrap;
            gap: 1rem;
        }

        h1 {
            color: var(--text-primary);
            font-size: 1.875rem;
            font-weight: 700;
            margin: 0;
        }

        .stats {
            display: flex;
            gap: 1rem;
            width: 300px;
            margin-top: 1.5rem;
            flex-direction: row;
        }

        .stat-box {
            background: var(--card-background);
            padding: 1.5rem;
            border-radius: 0.75rem;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .stat-box span:first-child {
            color: var(--text-secondary);
            font-size: 0.875rem;
            margin-bottom: 0.5rem;
        }

        .stat-box span:last-child {
            color: var(--text-primary);
            font-size: 1.5rem;
            font-weight: 600;
        }

        .filters {
            display: flex;
            gap: 0.75rem;
            margin-bottom: 2rem;
            flex-wrap: wrap;
        }

        .filter-btn {
            padding: 0.75rem 1.5rem;
            border: none;
            border-radius: 0.5rem;
            background-color: var(--card-background);
            color: var(--text-secondary);
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        }

        .filter-btn.active {
            background-color: var(--primary-color);
            color: white;
        }

        .trades-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 1.5rem;
        }

        .trade-card {
            background: var(--card-background);
            border-radius: 0.75rem;
            padding: 1.5rem;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        .trade-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }

        .pair {
            font-weight: 600;
            color: var(--text-primary);
        }

        .status {
            padding: 0.25rem 0.75rem;
            border-radius: 9999px;
            font-size: 0.75rem;
            font-weight: 500;
        }

        .status.pending {
            background-color: #fef3c7;
            color: #92400e;
        }

        .status.completed {
            background-color: #d1fae5;
            color: #065f46;
        }

        .status.rejected {
            background-color: #fee2e2;
            color: #991b1b;
        }

        .info-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.5rem;
            font-size: 0.875rem;
        }

        .label {
            color: var(--text-secondary);
        }

        .value {
            color: var(--text-primary);
            font-weight: 500;
        }

        .trade-actions {
            margin-top: 1.5rem;
            display: flex;
            gap: 0.75rem;
        }

        .approve-btn, .reject-btn {
            width: 100%;
            padding: 0.75rem;
            border: none;
            border-radius: 0.5rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }

        .approve-btn {
            background-color: var(--success-color);
            color: white;
        }

        .reject-btn {
            background-color: var(--danger-color);
            color: white;
        }

        .auto-approve-timer {
            text-align: center;
            color: var(--text-secondary);
            font-size: 0.875rem;
            margin-bottom: 0.75rem;
        }

        @media (max-width: 768px) {
            .admin-container {
                margin: 1rem;
                padding: 0 1rem;
            }

            .trades-container {
                grid-template-columns: 1fr;
            }

            .filters {
                justify-content: center;
            }
        }



        /* Admin Panel Container */

/* Headings */
.admin-container h1,
.admin-container h2 {
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: #1f1f1f;
}

/* Form Styling */
.notification-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* Input Group */
.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: #444;
}

.input-group input,
.input-group textarea,
.recipient-group select {
    padding: 0.7rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group textarea:focus,
.recipient-group select:focus {
    outline: none;
    border-color: #007bff;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 500;
}

/* Select Box */
.recipient-group {
    display: flex;
    flex-direction: column;
}

.recipient-group label {
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: #444;
}

.recipient-group select {
    width: 100%;
}

/* Hidden class (for specific user field toggle) */
.hidden {
    display: none;
}

/* Button */
.btn {
    padding: 0.75rem;
    background-color: #007bff;
    border: none;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0056b3;
}

/* Notification History */
.notification-history {
    margin-top: 2rem;
}

.notification-history h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

#notificationHistory {
    background-color: #f9f9f9;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    padding: 1rem;
    min-height: 80px;
}

/* Responsive Design */
@media screen and (max-width: 600px) {
    .admin-container {
        padding: 1rem;
        margin: 1rem;
    }

    .btn {
        font-size: 0.95rem;
    }
}



.admin-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
}

.code-generator {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.user-select {
    width: 100%;
    min-height: 120px;
    margin-bottom: 1rem;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.delete-btn {
    background-color: #dc2626;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.delete-btn:hover {
    background-color: #b91c1c;
}

.delete-btn:disabled {
    background-color: #f87171;
    cursor: not-allowed;
}

.generate-btn {
    background: #00c087;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.generate-btn:hover {
    background: #00a070;
}

.generated-code {
    margin-top: 2rem;
    text-align: center;
}

.code-display {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin: 1rem 0;
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 4px;
}

.expiry-note {
    color: #666;
    font-size: 0.9rem;
}

.active-codes {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.codes-list {
    margin-top: 1rem;
}

/* Add these styles to your existing CSS */
.generator-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.or-divider {
    text-align: center;
    font-weight: bold;
    color: #666;
    margin: 1rem 0;
}

.codes-log {
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 4px;
}

.code-entry {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: white;
    margin-bottom: 0.5rem;
    border-radius: 4px;
}

.refresh-container {
    text-align: right;
    margin-bottom: 1rem;
}

.refresh-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.refresh-btn:hover {
    background: #45a049;
}

.active-code {
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.code-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.loading {
    text-align: center;
    color: #666;
}

.no-codes {
    text-align: center;
    color: #666;
    padding: 2rem;
    background: #f5f5f5;
    border-radius: 4px;
}



/* Add these styles to your existing CSS */
.current-code {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    margin-bottom: 2rem;
}

.code-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 4px;
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 6px;
}

.code-details {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.code-details p {
    margin: 0.25rem 0;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 2rem;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
    z-index: 1000;
}

.notification.success {
    background-color: var(--success-color);
}

.notification.error {
    background-color: var(--danger-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}


/* General Layout */
.scheduling-section {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Schedule Elements */
.schedule-time {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.schedule-time input[type="time"] {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.schedule-btn {
    background: #2563eb;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.schedule-btn:hover {
    background: #1d4ed8;
}

.schedule-status {
    margin-top: 1rem;
}

.schedule-info {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Schedule Times List */
.schedule-times {
    margin-top: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}

.schedule-times li {
    color: #2563eb;
    font-weight: 500;
    margin: 0.25rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.schedule-times li:before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: #2563eb;
}

/* User Input Section */
.user-input-section {
    margin: 1rem 0;
    padding: 1rem;
    width: 250px;
    background: #f8fafc;
    border-radius: 4px;
}

.input-container {
    position: relative;
    margin-bottom: 1rem;
}

.user-id-input {
    width: 90%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    -webkit-text-security: disc; /* Hide actual input on iOS */
}

/* Suggestions List */
.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.suggestion-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.suggestion-item:hover {
    background: #f0f9ff;
}

/* Users List Section */
.users-list-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #eee;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

/* User Cards */
.user-card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.user-id {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.code-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
}

.code {
    font-family: monospace;
    font-size: 1.1rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: #f7fafc;
}

/* Status Styles */
.status {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status.active {
    background-color: #def7ec;
    color: #05ad0a;
}

.status.expired {
    background-color: #fde8e8;
    color: #9b1c1c;
}

.status.used {
    background-color: #e1effe;
    color: #1e429f;
}

.status.no-code {
    background-color: #f3f4f6;
    color: #6b7280;
}

/* Utility Classes */
.expiry-time {
    font-size: 0.875rem;
    color: #718096;
    margin-top: 0.5rem;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #718096;
}

.error-message {
    color: #dc2626;
    font-weight: 500;
}

.next-generation {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    color: #374151;
    font-weight: 500;
}

/* Buttons */
.refresh-btn {
    background: #3f83f8;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s;
}

.refresh-btn:hover {
    background: #1c64f2;
}

.trade-section {
    margin-top: 2rem;
    background: #c4c4c4;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(210, 9, 9, 0.985);
    margin-bottom: 2rem;
}


.code-generator {
    margin-top: 2rem;
    padding: 1rem;
    background: #d3d3d3;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.code-generator h2 {
    color: #333;
    margin-bottom: 1rem;
}


/* Container for the entire code status */
.code-status-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: #1f1f2e;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    color: #ffffff;
    max-width: 100%;
    text-align: center;
}

/* Styling for the trading code */
.active-code {
    font-size: 2rem;
    font-weight: bold;
    color: #4caf50; /* Green for active */
    letter-spacing: 1px;
}

/* Expiry box for countdown label and timer */
.expires-box {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* Label */
.expires-label {
    color: #ffb74d; /* Orange */
    font-weight: 500;
}

/* Countdown Timer */
#codeCountdown,
.countdown {
    font-weight: bold;
    color: #f44336; /* Red for urgency */
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .active-code {
        font-size: 1.6rem;
    }

    .expires-box {
        flex-direction: column;
        font-size: 0.95rem;
    }
}


