/* Admin Portal Styles */

/* Login Page */
.admin-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #512BD4 0%, #7B52E8 50%, #9B6EF8 100%);
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}

.login-header .logo i {
    font-size: 2.5rem;
    color: #512BD4;
}

.login-header .logo h1 {
    font-size: 2.5rem;
    color: #512BD4;
    margin: 0;
}

.login-header .subtitle {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

/* Login Tabs */
.login-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: #f0f0f0;
    border-radius: 12px;
    padding: 0.25rem;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.95rem;
}

.tab-btn:hover {
    color: #512BD4;
}

.tab-btn.active {
    background: #512BD4;
    color: white;
    box-shadow: 0 4px 12px rgba(81, 43, 212, 0.3);
}

/* Login Forms */
.login-form {
    display: none;
}

.login-form.active {
    display: block;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group label i {
    color: #512BD4;
    width: 16px;
}

.form-group input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #512BD4;
    box-shadow: 0 0 0 4px rgba(81, 43, 212, 0.1);
}

.form-group input::placeholder {
    color: #aaa;
}

.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    min-height: 1.2rem;
}

.login-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #512BD4 0%, #7B52E8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(81, 43, 212, 0.4);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.login-footer a {
    color: #512BD4;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.login-footer a:hover {
    color: #7B52E8;
}

/* Dashboard Page */
.dashboard-page {
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
}

.dashboard-header {
    background: linear-gradient(135deg, #512BD4 0%, #6B3FD4 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 12px rgba(81, 43, 212, 0.2);
}

.dashboard-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-left .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-left .logo i {
    font-size: 1.5rem;
}

.header-left .logo h1 {
    font-size: 1.5rem;
    margin: 0;
}

.header-divider {
    width: 2px;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
}

.header-title {
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.super-header {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
}

/* Dashboard Main */
.dashboard-main {
    flex: 1;
    padding: 2rem 0;
}

.loading-spinner {
    text-align: center;
    padding: 4rem;
    color: #666;
}

.loading-spinner i {
    font-size: 3rem;
    color: #512BD4;
    margin-bottom: 1rem;
}

.loading-spinner p {
    font-size: 1.1rem;
}

.error-banner {
    background: #fce4e4;
    color: #c0392b;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid #f5c6cb;
}

/* Referral Card */
.referral-card {
    background: linear-gradient(135deg, #512BD4 0%, #7B52E8 100%);
    color: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    box-shadow: 0 10px 30px rgba(81, 43, 212, 0.3);
}

.referral-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 0.9;
}

.code-display {
    margin-bottom: 0.75rem;
}

.code-display code {
    font-size: 2rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    letter-spacing: 2px;
}

.referral-info p {
    margin: 0;
    opacity: 0.85;
    font-size: 0.95rem;
}

.copy-btn {
    background: white;
    color: #512BD4;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 1rem;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.copy-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.copy-buttons .copy-btn {
    font-size: 0.9rem;
    padding: 0.75rem 1.25rem;
}

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

.stats-grid.two-columns {
    grid-template-columns: repeat(2, 1fr);
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card.primary .stat-icon {
    background: linear-gradient(135deg, #512BD4, #7B52E8);
    color: white;
}

.stat-card.secondary .stat-icon {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
}

.stat-card.success .stat-icon {
    background: linear-gradient(135deg, #28a745, #34ce57);
    color: white;
}

.stat-card.info .stat-icon {
    background: linear-gradient(135deg, #17a2b8, #20c9e0);
    color: white;
}

.stat-card.warning .stat-icon {
    background: linear-gradient(135deg, #ffc107, #ffda44);
    color: #333;
}

/* Rate Info Card */
.rate-info-card {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #2e7d32;
    font-size: 0.95rem;
}

.rate-info-card i {
    font-size: 1.2rem;
}

.rate-info-card strong {
    color: #1b5e20;
}

.stat-info h4 {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
}

.stat-value {
    margin: 0.25rem 0 0 0;
    font-size: 2rem;
    font-weight: 800;
    color: #333;
}

/* Chart Section */
.chart-section {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.3rem;
}

.date-range-select {
    padding: 0.6rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
    background: white;
    transition: all 0.3s ease;
}

.date-range-select:focus {
    outline: none;
    border-color: #512BD4;
}

.chart-container {
    height: 300px;
    position: relative;
}

.horizontal-chart {
    height: 400px;
}

.no-data {
    color: #999;
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

/* Table Section */
.table-section {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.table-header h3,
.table-section h3 {
    margin: 0;
    color: #333;
    font-size: 1.3rem;
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.data-table code {
    background: #f0f0f0;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    color: #512BD4;
}

.signups-count {
    font-weight: 700;
    color: #512BD4;
    font-size: 1.1rem;
}

.status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

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

/* Action Buttons */
.action-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.95rem;
}

.action-btn.primary {
    background: linear-gradient(135deg, #512BD4 0%, #7B52E8 100%);
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(81, 43, 212, 0.4);
}

.action-btn.secondary {
    background: #e0e0e0;
    color: #333;
}

.action-btn.secondary:hover {
    background: #d0d0d0;
}

.action-btn.danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.action-btn.danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
}

.action-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Icon Buttons */
.icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: #f0f0f0;
    color: #666;
}

.icon-btn:hover {
    transform: translateY(-2px);
}

.icon-btn.edit-btn:hover {
    background: #512BD4;
    color: white;
}

.icon-btn.delete-btn:hover {
    background: #e74c3c;
    color: white;
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.modal-content.modal-small {
    max-width: 400px;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.4rem;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #666;
}

.modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-body p {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.warning-text {
    color: #e74c3c !important;
    font-size: 0.9rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Form Hints */
.hint {
    font-weight: 400;
    font-size: 0.85rem;
    color: #999;
}

/* Toggle Switch */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle input:checked + .toggle-slider {
    background: linear-gradient(135deg, #512BD4 0%, #7B52E8 100%);
}

.toggle input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* Dashboard Footer */
.dashboard-footer {
    background: #2c2c2c;
    color: white;
    padding: 1.5rem 0;
    text-align: center;
}

.dashboard-footer p {
    margin: 0;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .login-card {
        padding: 2rem;
    }

    .dashboard-header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .header-left {
        flex-wrap: wrap;
        justify-content: center;
    }

    .header-right {
        width: 100%;
        justify-content: center;
    }

    .referral-card {
        flex-direction: column;
        text-align: center;
    }

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

    .chart-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .date-range-select {
        width: 100%;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }

    .login-header .logo h1 {
        font-size: 2rem;
    }

    .code-display code {
        font-size: 1.5rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }
}

/* ============ User Management Styles ============ */

/* Navigation Link */
.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

/* 4-column stats grid */
.stats-grid.stats-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
    .stats-grid.stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .stats-grid.stats-grid-4 {
        grid-template-columns: 1fr;
    }
}

.stat-card .stat-icon {
    background: linear-gradient(135deg, #512BD4, #7B52E8);
    color: white;
}

/* Filters Section */
.filters-section {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.search-box input:focus {
    outline: none;
    border-color: #512BD4;
    box-shadow: 0 0 0 3px rgba(81, 43, 212, 0.1);
}

.filter-group select {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    background: white;
    transition: all 0.3s ease;
    min-width: 120px;
}

.filter-group select:focus {
    outline: none;
    border-color: #512BD4;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.btn-primary {
    background: linear-gradient(135deg, #512BD4 0%, #7B52E8 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(81, 43, 212, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
}

.btn-icon {
    width: 38px;
    height: 38px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #666;
}

.btn-icon:hover {
    border-color: #512BD4;
    color: #512BD4;
}

/* Results Info */
.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

#results-count {
    font-weight: 600;
    color: #666;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sort-controls label {
    color: #666;
    font-size: 0.9rem;
}

.sort-controls select {
    padding: 0.5rem 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    background: white;
}

/* Users Table */
.users-table {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #512BD4, #7B52E8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.user-info .user-name {
    font-weight: 600;
    color: #333;
}

.user-info .user-email {
    font-size: 0.85rem;
    color: #999;
}

.location-text,
.date-text {
    font-size: 0.9rem;
    color: #666;
}

.text-muted {
    color: #bbb !important;
}

.ratings-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #f0f0f0;
    padding: 0.35rem 0.65rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
}

.ratings-badge i {
    color: #f1c40f;
}

.status-badges {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 0.25rem;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-purple {
    background: #e8defc;
    color: #512BD4;
}

.badge-debug {
    background: #ffeaa7;
    color: #6c5ce7;
}

.icon-btn.view-btn:hover {
    background: #00b894;
    color: white;
}

.icon-btn.logs-btn:hover {
    background: #0984e3;
    color: white;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

#page-info,
#logs-page-info {
    font-weight: 600;
    color: #666;
}

/* Modal Large */
.modal-content.modal-lg {
    max-width: 800px;
}

.modal-content.modal-sm {
    max-width: 400px;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: #333;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    margin-top: 1rem;
}

/* User Detail Modal */
.user-detail-loading {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.user-detail-loading i {
    font-size: 2rem;
    color: #512BD4;
    margin-bottom: 1rem;
}

.user-detail-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.user-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #512BD4, #7B52E8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-header-info h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.5rem;
    color: #333;
}

.user-header-info .user-email {
    color: #666;
    margin-bottom: 0.5rem;
}

.user-header-info .user-meta {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.user-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.user-detail-section {
    margin-bottom: 1.5rem;
}

.user-detail-section h4 {
    color: #333;
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #512BD4;
    display: inline-block;
}

.user-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 600px) {
    .user-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-mini {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 10px;
    text-align: center;
}

.stat-mini .stat-label {
    display: block;
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 0.25rem;
}

.stat-mini .stat-val {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
}

.user-photos {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.photo-thumb {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-thumb.primary {
    border: 3px solid #512BD4;
}

.photo-thumb .primary-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #512BD4;
    color: white;
    font-size: 0.6rem;
    text-align: center;
    padding: 0.15rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #e8defc;
    color: #512BD4;
}

.social-link i {
    color: #512BD4;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

@media (max-width: 500px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.info-grid strong {
    color: #666;
}

.user-detail-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Edit Modal */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: #512BD4;
    box-shadow: 0 0 0 3px rgba(81, 43, 212, 0.1);
}

.section-title {
    color: #333;
    margin: 1.5rem 0 1rem 0;
    font-size: 0.95rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #512BD4;
}

.error-text {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

/* Logs Modal */
.logs-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.logs-container {
    max-height: 500px;
    overflow-y: auto;
}

.logs-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.log-entry {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    border-left: 4px solid #ccc;
}

.log-entry.log-information {
    border-left-color: #00b894;
}

.log-entry.log-warning {
    border-left-color: #f39c12;
}

.log-entry.log-error {
    border-left-color: #e74c3c;
}

.log-entry.log-debug {
    border-left-color: #9b59b6;
}

.log-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.log-level {
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.log-information .log-level {
    background: #d4edda;
    color: #155724;
}

.log-warning .log-level {
    background: #fff3cd;
    color: #856404;
}

.log-error .log-level {
    background: #f8d7da;
    color: #721c24;
}

.log-debug .log-level {
    background: #e8defc;
    color: #512BD4;
}

.log-time {
    font-size: 0.8rem;
    color: #999;
}

.log-platform {
    font-size: 0.75rem;
    background: #e0e0e0;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    color: #666;
}

.log-message {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.5;
}

.log-category,
.log-path {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.35rem;
}

.log-exception,
.log-data {
    margin-top: 0.5rem;
}

.log-exception pre,
.log-data pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 200px;
}

/* ============ Influencer URL Display ============ */

.url-cell {
    min-width: 200px;
    max-width: 280px;
}

.url-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.url-text {
    font-size: 0.85rem;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

.copy-url-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #666;
    flex-shrink: 0;
}

.copy-url-btn:hover {
    background: #512BD4;
    color: white;
}

/* Success Modal */
.success-header {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
    margin: -2rem -2rem 1.5rem -2rem;
    padding: 1.5rem 2rem;
    border-radius: 20px 20px 0 0;
}

.success-header h3 {
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.success-header h3 i {
    font-size: 1.3rem;
}

.success-header .modal-close {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.success-header .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.success-message {
    font-size: 1rem;
    margin-bottom: 1.25rem;
    color: #333;
}

.url-display-group {
    margin-bottom: 1rem;
}

.url-display-group label {
    display: block;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.url-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.url-input {
    flex: 1;
    padding: 0.85rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: monospace;
    background: #f8f9fa;
    color: #333;
}

.url-input:focus {
    outline: none;
    border-color: #512BD4;
}

.url-input-wrapper .copy-btn {
    width: 48px;
    padding: 0;
    border-radius: 10px;
    flex-shrink: 0;
}

.copy-feedback {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #999;
    min-height: 1.2rem;
}

.copy-feedback.success {
    color: #00b894;
    font-weight: 600;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: white;
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
