/* API Management Page Specific Styles */

/* Page Header */
.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 16px;
    color: #888;
}

/* API List Section */
.api-list-section {
    margin-bottom: 40px;
}

.api-list-card {
    padding: 0;
    overflow: hidden;
}

.api-list-card .card-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0;
}

.card-title-section {
    flex: 1;
}

.api-list-card .card-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.api-list-card .card-subtitle {
    font-size: 14px;
    color: #888;
    margin-bottom: 0;
}

/* Create Key Button */
.create-key-btn {
    background: #ff8c42;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.create-key-btn:hover {
    background: #e67e22;
    transform: translateY(-1px);
}

.btn-icon {
    font-size: 16px;
    font-weight: bold;
}

/* Table Container */
.table-container {
    overflow-x: auto;
}

.api-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.api-table th {
    background: #f8f8f8;
    color: #333;
    font-weight: 600;
    padding: 16px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    white-space: nowrap;
}

.api-table th:first-child {
    padding-left: 40px !important;
    text-align: left;
}

.api-table td {
    padding: 16px 12px;
    border-bottom: none;
    vertical-align: middle;
}

.api-table tbody tr:hover {
    background: #f8f8f8;
}

/* API Name */
.api-table td.api-name {
    font-weight: 500;
    color: #333;
    padding-left: 40px !important;
    text-align: left;
}

/* API Preview */
.api-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: none;
}

.key-text {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    color: #666;
}


/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    min-width: 50px;
}

.status-badge.active {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.status-badge.inactive {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* API Date */
.api-date {
    color: #666;
    font-size: 13px;
}

/* API Actions */
.api-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    border-bottom: none;
}

.action-icon-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.action-icon-btn:hover {
    background: #f8f8f8;
    border-color: #ff8c42;
}

.action-icon {
    font-size: 14px;
    color: #666;
}

.action-icon-btn:hover .action-icon {
    color: #ff8c42;
}

/* Footer */
.footer {
    background: #f8f8f8;
    border-top: 1px solid #e0e0e0;
    margin-top: 60px;
    padding: 40px 0 20px 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-column:first-child {
    max-width: 300px;
}

.footer-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.footer-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
}

.footer-copyright {
    font-size: 12px;
    color: #888;
}

.footer-heading {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ff8c42;
}

.footer-bottom {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
    justify-content: flex-end;
}

.footer-bottom-links a {
    color: #888;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
    color: #ff8c42;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-title {
        font-size: 24px;
    }

    .api-list-card .card-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .create-key-btn {
        align-self: flex-start;
    }

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

    .api-table {
        min-width: 600px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-bottom-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {

    .api-table th,
    .api-table td {
        padding: 12px 8px;
    }

    .api-actions {
        gap: 4px;
    }

    .action-icon-btn {
        width: 28px;
        height: 28px;
        padding: 4px;
    }
}

/* Create API Key Modal Specific Styles */
#createApiKeyModal .modal-content {
    max-width: 480px;
}

#createApiKeyModal .form-hint {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    line-height: 1.4;
}

#createApiKeyModal .btn-create {
    background: #ff8c42;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

#createApiKeyModal .btn-create:hover {
    background: #e67e22;
}

#createApiKeyModal .btn-create:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Number input styling */
#createApiKeyModal input[type="number"] {
    -moz-appearance: textfield;
}

#createApiKeyModal input[type="number"]::-webkit-outer-spin-button,
#createApiKeyModal input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Focus states for form inputs */
#createApiKeyModal .form-input:focus {
    border-color: #ff8c42;
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.1);
}

/* Modal responsive adjustments */
@media (max-width: 768px) {
    #createApiKeyModal .modal-content {
        margin: 10% auto;
        width: 95%;
        max-width: none;
    }
}