* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Tabs */
.tabs {
    display: flex;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: white;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background-color: #f8f9fa;
}

.tab-button.active {
    background-color: #667eea;
    color: white;
    border-bottom-color: #5a67d8;
}

/* Tab Content */
.tab-content {
    display: none;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tab-content.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.section-header h2 {
    color: #2d3748;
    font-size: 1.5rem;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover {
    background-color: #5a67d8;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background-color: #cbd5e0;
}

.btn-success {
    background-color: #48bb78;
    color: white;
}

.btn-success:hover {
    background-color: #38a169;
}

.btn-warning {
    background-color: #ed8936;
    color: white;
}

.btn-warning:hover {
    background-color: #dd6b20;
}

.btn-danger {
    background-color: #f56565;
    color: white;
}

.btn-danger:hover {
    background-color: #e53e3e;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Search Box */
.search-box {
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th,
td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background-color: #f7fafc;
    font-weight: 600;
    color: #2d3748;
    position: sticky;
    top: 0;
}

tr:hover {
    background-color: #f7fafc;
}

.loading {
    text-align: center;
    color: #718096;
    font-style: italic;
}

/* Status badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-completed {
    background-color: #c6f6d5;
    color: #22543d;
}

.status-pending {
    background-color: #fef5e7;
    color: #744210;
}

.status-failed {
    background-color: #fed7d7;
    color: #742a2a;
}

.status-available {
    background-color: #c6f6d5;
    color: #22543d;
}

.status-unavailable {
    background-color: #fed7d7;
    color: #742a2a;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 2.5rem;
    margin-right: 15px;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
}

.stat-info p {
    color: #718096;
    font-size: 0.9rem;
}

/* Chart Container */
.chart-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chart-placeholder {
    height: 200px;
    background: #f7fafc;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    font-size: 1.1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2d3748;
}

.close {
    color: #718096;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #2d3748;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 140px);
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
    background: white;
}

/* Form Groups */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2d3748;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-overlay.show {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    .tabs {
        flex-direction: column;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 2% auto;
        max-height: 95vh;
    }

    .modal-body {
        max-height: calc(95vh - 140px);
    }

    table {
        font-size: 0.9rem;
    }

    th,
    td {
        padding: 8px 12px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-success {
    color: #48bb78;
}

.text-warning {
    color: #ed8936;
}

.text-danger {
    color: #f56565;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

/* Pricing Management Styles */
.pricing-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
}

.pricing-filters select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    min-width: 150px;
    font-size: 0.9rem;
}

.pricing-filters select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.bulk-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: auto;
}

.bulk-actions input {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    width: 120px;
    font-size: 0.9rem;
}

.bulk-actions input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Form styling for price modals */
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.3s ease;
}

.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[readonly] {
    background-color: #f7fafc;
    color: #718096;
    cursor: not-allowed;
}

/* Table improvements for pricing */
.table-container table th:nth-child(4),
.table-container table th:nth-child(5),
.table-container table th:nth-child(6),
.table-container table th:nth-child(7) {
    text-align: right;
}

.table-container table td:nth-child(4),
.table-container table td:nth-child(5),
.table-container table td:nth-child(6),
.table-container table td:nth-child(7) {
    text-align: right;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.table-container table td:nth-child(6),
.table-container table th:nth-child(6) {
    text-align: right;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.table-container table td:last-child {
    text-align: center;
}

/* Profit highlighting */
.profit-positive {
    color: #22543d;
    font-weight: 600;
}

.profit-negative {
    color: #742a2a;
    font-weight: 600;
}

/* Service type badges */
.service-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.service-data {
    background-color: #bee3f8;
    color: #2a4365;
}

.service-airtime {
    background-color: #c6f6d5;
    color: #22543d;
}

.service-cable {
    background-color: #fed7e2;
    color: #702459;
}

.service-betting {
    background-color: #fef5e7;
    color: #744210;
}

.service-electricity {
    background-color: #e9d8fd;
    color: #44337a;
}

.service-education {
    background-color: #fed7d7;
    color: #742a2a;
}

/* Responsive improvements for pricing */
@media (max-width: 768px) {
    .pricing-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .bulk-actions {
        margin-left: 0;
        margin-top: 10px;
        justify-content: stretch;
    }

    .bulk-actions input {
        flex: 1;
    }

    .header-actions {
        flex-direction: column;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    /* Hide less important columns on mobile */
    .table-container table th:nth-child(6),
    .table-container table td:nth-child(6),
    .table-container table th:nth-child(7),
    .table-container table td:nth-child(7) {
        display: none;
    }
}

@media (max-width: 480px) {

    .table-container table th:nth-child(3),
    .table-container table td:nth-child(3),
    .table-container table th:nth-child(7),
    .table-container table td:nth-child(7),
    .table-container table th:nth-child(8),
    .table-container table td:nth-child(8) {
        display: none;
    }

    .btn-sm {
        padding: 4px 6px;
        font-size: 0.7rem;
    }
}

/* User Details Modal Styles */
.large-modal {
    max-width: 800px;
}

.user-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.detail-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.detail-section h4 {
    margin-bottom: 15px;
    color: #2d3748;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.detail-row label {
    font-weight: 600;
    color: #4a5568;
    flex: 0 0 120px;
}

.detail-row span {
    color: #2d3748;
    text-align: right;
    flex: 1;
    word-break: break-word;
}

/* Responsive for user details modal */
@media (max-width: 768px) {
    .large-modal {
        max-width: 95%;
    }

    .user-details-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .detail-row label {
        flex: none;
        font-size: 0.9rem;
    }

    .detail-row span {
        text-align: left;
        font-size: 0.9rem;
    }
}