/* ManageAPI Standalone Styles */

/* Stats Card Styles */
.stats-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    border: 1px solid rgba(222, 226, 230, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(10px);
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 1;
    transition: all 0.3s ease;
    z-index: -1;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.stats-card.total-tasks::before {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.stats-card.completed-tasks::before {
    background: linear-gradient(135deg, #06b6d4 0%, #10b981 100%);
}

.stats-card.pending-tasks::before {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stats-card.total-users::before {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
}

.stats-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: -2;
    pointer-events: none;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.stats-card.total-tasks::after {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.6) 0%, transparent 70%);
}

.stats-card.completed-tasks::after {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.6) 0%, transparent 70%);
}

.stats-card.pending-tasks::after {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.6) 0%, transparent 70%);
}

.stats-card.total-users::after {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.6) 0%, transparent 70%);
}

.stats-card:hover::after {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.1);
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.metric-icon i {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.95);
}

.stats-card:hover .metric-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.metric-content {
    flex: 1;
}

.metric-value {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.metric-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Custom styling for Manage APIs page */
.manage-apis-page .summary-card {
    border: 2px solid #e9ecef;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.manage-apis-page .summary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

.manage-apis-page .card {
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    background: #ffffff;
}

.manage-apis-page .card-header {
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #dee2e6;
}

.manage-apis-page .table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none;
    border: 1px solid #dee2e6;
}

.manage-apis-page .table tbody tr:hover {
    background-color: rgba(74, 144, 226, 0.05);
    transform: none;
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-development {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-planned {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Enhanced Table Styling */
.table-responsive {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    background: #ffffff;
}

.table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 3px solid #007bff;
    font-weight: 700;
    color: #495057;
    padding: 1.25rem 1rem;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    position: relative;
    white-space: nowrap;
}

.table thead th:first-child {
    border-top-left-radius: 12px;
}

.table thead th:last-child {
    border-top-right-radius: 12px;
}

.table tbody td {
    padding: 1.25rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s ease;
}

.table tbody tr {
    transition: all 0.3s ease;
    position: relative;
}

.table tbody tr:hover {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.08) 0%, rgba(0, 123, 255, 0.05) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.table tbody tr:hover td {
    border-color: rgba(0, 123, 255, 0.2);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

/* Enhanced row styling */
.table tbody tr:nth-child(even) {
    background-color: rgba(248, 249, 250, 0.5);
}

.table tbody tr:nth-child(even):hover {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.08) 0%, rgba(0, 123, 255, 0.05) 100%);
}

/* Button group styling */
.btn-group .btn {
    border-radius: 0;
    margin-right: 2px;
}

.btn-group .btn:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.btn-group .btn:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    margin-right: 0;
}

.btn-group .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Status badge improvements */
.status-badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.status-active {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.status-development {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #212529;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.status-planned {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}

.status-inactive {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* Endpoint Details Section */
#endpointDetailsSection {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.endpoint-details .table th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-top: none;
}

.endpoint-details .table td {
    border-top: 1px solid #dee2e6;
    vertical-align: middle;
}

.endpoint-details code {
    background-color: #f8f9fa;
    color: #e83e8c;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.endpoint-details .bg-light {
    background-color: #f8f9fa !important;
    border: 1px solid #e9ecef;
}

/* Enhanced table styling */
.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.08);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

/* Enhanced content styling */
.table .fw-bold {
    font-size: 1rem;
    font-weight: 700;
    color: #2c3e50;
}

.table .text-primary {
    color: #007bff !important;
}

.table .text-muted {
    color: #6c757d !important;
    font-size: 0.85rem;
}

.table .small {
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Method badge styling */
.badge {
    font-size: 0.7rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

.badge.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white;
}

.badge.bg-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: white;
}

/* Code styling in table */
.table code {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #e83e8c;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid #dee2e6;
    font-family: 'Courier New', monospace;
}

/* Action buttons container */
.btn-group {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e9ecef;
}

/* Enhanced button styling */
.btn-group .btn {
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-group .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-group .btn:hover::before {
    left: 100%;
}

.btn-group .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Status indicators */
.table .status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.table .usage-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.table .usage-stats .small {
    font-weight: 600;
}

.table .usage-stats .text-muted {
    font-size: 0.75rem;
}

/* Table loading animation */
.table tbody tr {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced table header */
.table thead th::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    transition: width 0.3s ease;
}

.table thead th:hover::after {
    width: 100%;
}

/* Table empty state */
.table-empty {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.table-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Enhanced scrollbar for table */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #0056b3, #004085);
}

/* Responsive table improvements */
@media (max-width: 768px) {
    .stats-card {
        padding: 1rem;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
    
    .metric-icon {
        width: 50px;
        height: 50px;
    }
    
    .metric-icon i {
        font-size: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
        border-radius: 8px;
    }
    
    .table thead th {
        padding: 1rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .table tbody td {
        padding: 1rem 0.75rem;
    }
    
    .btn-group .btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    .table .fw-bold {
        font-size: 0.9rem;
    }

    .table .small {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .table thead th {
        padding: 0.75rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .table tbody td {
        padding: 0.75rem 0.5rem;
    }

    .btn-group {
        flex-direction: column;
        gap: 0.25rem;
    }

    .btn-group .btn {
        border-radius: 4px !important;
        margin-right: 0 !important;
    }
}

/* Body and general styles */
body {
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #212529;
}

.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
}

