.progress {
    position: relative;
}

.progress span {
    position: absolute;
    display: block;
    width: 100%;
    color: #fff;
    text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;
}

.number_btn {
    border-radius: 10px;
}

.pending_animation {
    background-color: orange;
    transition: background-color 1s;
}

tr {
    transition: background-color 1s;
}

.pending_animation_clear {
    background-color: white;
}

/* Notification Bell Styles */
.badge-counter {
    position: absolute;
    transform: scale(0.9);
    transform-origin: top right;
    right: 0;
    top: -2px;
}

.dropdown-list {
    min-width: 20rem;
    max-width: 350px;
    position: absolute;
    z-index: 1050;
}

.dropdown-list .dropdown-header {
    background-color: #4e73df;
    border: 1px solid #4e73df;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    color: #fff;
}

.dropdown-list .dropdown-item {
    white-space: normal;
    padding: 0.75rem 1.25rem;
    border-left: 1px solid #e3e6f0;
    border-right: 1px solid #e3e6f0;
    border-bottom: 1px solid #e3e6f0;
}

.dropdown-list .dropdown-item:hover {
    background-color: #f8f9fc;
}

/* Notification scrollable content */
#notificationsList {
    max-height: 400px !important;
    overflow-y: auto !important;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}

/* Custom scrollbar for notifications */
#notificationsList::-webkit-scrollbar {
    width: 6px;
}

#notificationsList::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#notificationsList::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

#notificationsList::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Ensure dropdown doesn't get cut off */
.navbar .dropdown-menu {
    position: absolute !important;
    max-height: 500px;
    overflow: visible;
    z-index: 1050;
}

.navbar .dropdown-menu.dropdown-menu-right {
    right: 150px;
    left: auto;
}

/* Fix dropdown positioning */
.navbar .nav-item.dropdown {
    position: static;
}

.navbar .nav-item.dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 150;
    margin-top: 0;
}

.notification-item.unread {
    background-color: #f8f9fc !important;
    border-left: 3px solid #4e73df;
}

.icon-circle {
    height: 2.5rem;
    width: 2.5rem;
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-circle.bg-primary {
    background-color: #4e73df;
}

.notification-item .small {
    font-size: 0.8rem;
}

/* Notification Bell Animation */
@keyframes bellShake {
    0% { transform: rotate(0); }
    15% { transform: rotate(5deg); }
    30% { transform: rotate(-5deg); }
    45% { transform: rotate(4deg); }
    60% { transform: rotate(-4deg); }
    75% { transform: rotate(2deg); }
    85% { transform: rotate(-2deg); }
    92% { transform: rotate(1deg); }
    100% { transform: rotate(0); }
}

.nav-link:hover .fa-bell {
    animation: bellShake 0.5s ease-in-out;
}

/* Unread notification indicator */
.bg-unread {
    background-color: #e3f2fd !important;
}

.text-unread {
    font-weight: 600 !important;
    color: #1976d2 !important;
}

/* Simplified Notification Layout */
.notification-wrapper {
    position: relative;
    border-bottom: 1px solid #e3e6f0;
}

.notification-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.notification-item:hover {
    background-color: #f8f9fc;
}

.notification-content {
    flex-grow: 1;
}

.notification-message {
    font-size: 0.9rem;
    color: #5a5c69;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.notification-message[title] {
    position: relative;
}

.notification-message[title]:after {
    content: "📄";
    font-size: 0.7rem;
    opacity: 0.6;
    margin-left: 5px;
}

/* Modal styling for notification details */
.notification-full-text {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.notification-time {
    font-size: 0.75rem;
    color: #858796;
}

.delete-btn {
    background: #dc3545;
    border: none;
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background: #c82333;
    transform: scale(1.1);
    color: white;
}

.delete-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.5);
}

/* Animation for notification removal */
.notification-wrapper.deleting {
    animation: slideOutRight 0.4s ease forwards;
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Fixed Layout Styles */
body {
    overflow: hidden;
    height: 100vh;
}

#wrapper {
    height: 100vh;
    overflow: hidden;
}

/* Prevent horizontal scroll globally */
* {
    box-sizing: border-box;
}

body, html {
    overflow-x: hidden;
}

/* Fixed Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1038;
    width: 224px;
    overflow-y: auto;
    overflow-x: hidden;
    background: linear-gradient(180deg, #2d74da 10%, #1f5582 100%);
}

.sidebar.toggled {
    width: 6.5rem;
}

.sidebar.toggled .sidebar-brand-text {
    display: none;
}

.sidebar.toggled .nav-item .nav-link span {
    display: none;
}

/* Sidebar content fixes */
.sidebar .nav-item .nav-link {
    display: flex;
    align-items: center;
    padding: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar .nav-item .nav-link i {
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.sidebar .sidebar-brand {
    height: 4.375rem;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 800;
    padding: 1.5rem 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    z-index: 1;
    overflow: hidden;
}

.sidebar .sidebar-brand .sidebar-brand-text {
    display: block;
}

/* Fixed Navbar */
.topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 224px;
    height: 60px;
    z-index: 1037;
    background-color: #fff !important;
    border-bottom: 1px solid #e3e6f0;
    overflow: visible !important;
}

.sidebar.toggled ~ #content-wrapper .topbar {
    left: 6.5rem;
}

/* Content Wrapper */
#content-wrapper {
    margin-left: 224px;
    margin-top: 60px;
    height: calc(100vh - 60px);
    overflow: hidden;
    width: calc(100vw - 224px);
}

.sidebar.toggled ~ #content-wrapper {
    margin-left: 6.5rem;
    width: calc(100vw - 6.5rem);
}

/* Scrollable Content Area */
#content {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    background-color: #f8f9fc;
}

/* Card Size Fixes */
.card {
    border: 0;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15) !important;
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
}

/* Fixed card grid layout */
.row > .col-lg-11,
.row > .col-lg-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

/* Table container */
.card-body {
    padding: 1.25rem;
    overflow-x: auto;
}

.table-responsive {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    overflow-x: auto;
    position: relative;
}

/* Sticky table header */
.table-responsive .table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f8f9fc;
    border-bottom: 2px solid #e3e6f0;
}

/* Ensure sticky header works properly */
.table thead th {
    border-top: none;
    font-weight: 600;
    color: #5a5c69;
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
}

/* Bootstrap table improvements */
.table {
    margin-bottom: 0;
    table-layout: auto;
    width: 100%;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: middle;
}

/* Even row backgrounds for all tables */
.table tbody tr:nth-child(even) {
    background-color: #f8f9fc;
}

.table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.table tbody tr:hover {
    background-color: #eaecf4 !important;
}

/* Search container styling */
#searchContainer,
#historySearchContainer {
    display: flex;
    align-items: center;
}

.input-group-sm .form-control {
    font-size: 0.875rem;
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem 0 0 0.35rem;
}

.input-group-sm .input-group-text {
    font-size: 0.875rem;
    background-color: #f8f9fc;
    border: 1px solid #d1d3e2;
    border-left: none;
    color: #5a5c69;
}

/* Allow wrapping for SMS content column */
#requests_history th:nth-child(5),
#requests_history td:nth-child(5) {
    white-space: normal;
    word-wrap: break-word;
    max-width: 200px;
    overflow: visible;
}

/* History table sticky header enhancement */
#requests_history thead th {
    position: sticky;
    top: 0;
    z-index: 15;
    background-color: #f8f9fc !important;
    border-bottom: 2px solid #e3e6f0 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Keep other columns compact */
#requests_history th:not(:nth-child(5)),
#requests_history td:not(:nth-child(5)) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Specific sizing for non-content columns */
#requests_history th:nth-child(1),
#requests_history td:nth-child(1) { min-width: 60px; }  /* ID */
#requests_history th:nth-child(2),
#requests_history td:nth-child(2) { min-width: 80px; }  /* Status */
#requests_history th:nth-child(3),
#requests_history td:nth-child(3) { min-width: 120px; } /* Phone */
#requests_history th:nth-child(4),
#requests_history td:nth-child(4) { min-width: 100px; } /* SMS Code */
#requests_history th:nth-child(6),
#requests_history td:nth-child(6) { min-width: 120px; } /* Time */
#requests_history th:nth-child(7),
#requests_history td:nth-child(7) { min-width: 80px; }  /* App */

/* App list table styling */
#applist th:nth-child(1),
#applist td:nth-child(1) { display: none; } /* Hidden ID */

#applist th,
#applist td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.75rem;
}

/* App list specific minimum widths */
#applist th:nth-child(2),
#applist td:nth-child(2) { min-width: 120px; } /* App */
#applist th:nth-child(3),
#applist td:nth-child(3) { min-width: 100px; } /* App Code */
#applist th:nth-child(4),
#applist td:nth-child(4) { min-width: 100px; } /* Country Code */
#applist th:nth-child(5),
#applist td:nth-child(5) { min-width: 80px; }  /* Price */
#applist th:nth-child(6),
#applist td:nth-child(6) { min-width: 80px; }  /* Count */
#applist th:nth-child(7),
#applist td:nth-child(7) { min-width: 80px; }  /* Buy */

/* DataTable specific styling for available.php */
#dataTable2 {
    table-layout: auto;
    width: 100% !important;
}

#dataTable2 th,
#dataTable2 td {
    padding: 0.75rem;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* DataTable header sticky positioning */
#dataTable2 thead th {
    position: sticky;
    top: 0;
    z-index: 15;
    background-color: #f8f9fc !important;
    border-bottom: 2px solid #e3e6f0 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-weight: 600;
    color: #5a5c69;
}

/* DataTable responsive wrapper */
.dataTables_wrapper {
    width: 100%;
    overflow: hidden;
}

.dataTables_wrapper .table-responsive {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    overflow-x: auto;
}

/* DataTable controls styling */
.dataTables_length,
.dataTables_filter,
.dataTables_info,
.dataTables_paginate {
    margin: 0.5rem 0;
}

.dataTables_filter input {
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem;
    padding: 0.375rem 0.75rem;
}

/* DataTable row styling */
#dataTable2 tbody tr:nth-child(even) {
    background-color: #f8f9fc !important;
}

#dataTable2 tbody tr:nth-child(odd) {
    background-color: #ffffff !important;
}

#dataTable2 tbody tr:hover {
    background-color: #eaecf4 !important;
}

/* Bootstrap table row styling */
.table-striped tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.table-striped tbody tr:nth-child(even) {
    background-color: #f8f9fc;
}

/* Hide default bootstrap table search */
.bootstrap-table .fixed-table-toolbar .search {
    display: none !important;
}

/* Bootstrap table toolbar adjustments */
.bootstrap-table .fixed-table-toolbar {
    padding: 0.75rem 0;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    display: none; /* Hidden by default */
}

.bootstrap-table .fixed-table-toolbar.show {
    display: block;
}

.bootstrap-table .fixed-table-toolbar .columns,
.bootstrap-table .fixed-table-toolbar .export {
    margin-right: 0.5rem;
}

/* Ensure toolbar buttons are properly styled */
.bootstrap-table .fixed-table-toolbar .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

/* Make sure the original search is completely hidden */
.bootstrap-table .fixed-table-toolbar .search {
    display: none !important;
}

/* Custom toggle switch styling */
.custom-control-label::before {
    background-color: #d1d3e2;
    border: 1px solid #d1d3e2;
}

.custom-control-input:checked ~ .custom-control-label::before {
    background-color: #4e73df;
    border-color: #4e73df;
}

.custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.custom-control-label {
    font-size: 0.875rem;
    color: #5a5c69;
    cursor: pointer;
}

/* Header controls container */
#historySearchContainer .d-flex {
    gap: 1rem;
}

/* Card header search styling */
.card-header .input-group {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header .input-group .form-control:focus {
    border-color: #4e73df;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* Custom DataTable controls below table */
.dataTables_length_bottom {
    font-size: 0.875rem;
    color: #5a5c69;
}

.dataTables_length_bottom select {
    margin: 0 5px !important;
    width: auto !important;
    display: inline-block !important;
}

.dataTables_length_bottom label {
    margin: 0;
    font-weight: normal;
    display: flex;
    align-items: center;
}

.dataTables_info_bottom {
    font-size: 0.875rem;
    color: #858796;
}

/* Hide default DataTable controls */
#dataTable2_wrapper .dataTables_length {
    display: none !important;
}

#dataTable2_wrapper .dataTables_info {
    display: none !important;
}

/* User Report DataTable styling */
#dataTable_wrapper .dataTables_length {
    display: none !important;
}

#dataTable_wrapper .dataTables_info {
    display: none !important;
}

#dataTable_wrapper .dataTables_filter {
    display: none !important;
}

/* DataTable buttons styling for user report */
.dataTables_buttons_bottom {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.dataTables_buttons_bottom .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.35rem;
}

.dataTables_buttons_bottom .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

.dataTables_buttons_bottom .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* Ensure buttons container doesn't have default styling */
.dt-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Report page specific table styling */
#dataTable tbody tr:nth-child(even) {
    background-color: #f8f9fc !important;
}

#dataTable tbody tr:nth-child(odd) {
    background-color: #ffffff !important;
}

#dataTable tbody tr:hover {
    background-color: #eaecf4 !important;
}

#dataTable thead th {
    position: sticky;
    top: 0;
    z-index: 15;
    background-color: #f8f9fc !important;
    border-bottom: 2px solid #e3e6f0 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-weight: 600;
    color: #5a5c69;
}

/* SMS content column wrapping for user report */
#dataTable {
    table-layout: auto !important;
    width: 100% !important;
}

/* Default column styling - fit content */
#dataTable th,
#dataTable td {
    white-space: nowrap;
    padding: 0.75rem;
    vertical-align: top;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* SMS content specific styling - allow wrapping */
#dataTable td.sms-content,
#dataTable th.sms-content {
    white-space: normal !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    max-width: 300px !important;
    min-width: 200px !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.4;
}

/* Other columns - fit content */
#dataTable td:not(.sms-content),
#dataTable th:not(.sms-content) {
    width: 1%;
    white-space: nowrap !important;
    max-width: none !important;
}

/* Better cell padding for wrapped content */
#dataTable td.sms-content {
    padding: 0.75rem 0.5rem;
}

/* Ensure proper row height for wrapped content */
#dataTable tbody tr {
    vertical-align: top;
}

/* Recharge table specific styling */
#dataTable2 {
    table-layout: auto !important;
    width: 100% !important;
}

/* Default column styling for recharge table - fit content */
#dataTable2 th,
#dataTable2 td {
    white-space: nowrap;
    padding: 0.75rem;
    vertical-align: top;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Content wrap columns (gateway, descriptions, etc.) */
#dataTable2 td.content-wrap,
#dataTable2 th.content-wrap {
    white-space: normal !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    max-width: 200px !important;
    min-width: 150px !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.4;
}

/* Other columns in recharge table - fit content */
#dataTable2 td:not(.content-wrap),
#dataTable2 th:not(.content-wrap) {
    width: 1%;
    white-space: nowrap !important;
    max-width: none !important;
}

/* Recharge table row styling */
#dataTable2 tbody tr:nth-child(even) {
    background-color: #f8f9fc !important;
}

#dataTable2 tbody tr:nth-child(odd) {
    background-color: #ffffff !important;
}

#dataTable2 tbody tr:hover {
    background-color: #eaecf4 !important;
}

/* Recharge table sticky header */
#dataTable2 thead th {
    position: sticky;
    top: 0;
    z-index: 15;
    background-color: #f8f9fc !important;
    border-bottom: 2px solid #e3e6f0 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-weight: 600;
    color: #5a5c69;
}

/* Hide default controls for recharge table */
#dataTable2_wrapper .dataTables_length {
    display: none !important;
}

#dataTable2_wrapper .dataTables_info {
    display: none !important;
}

#dataTable2_wrapper .dataTables_filter {
    display: none !important;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #5a5c69;
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.05);
}

.table td {
    border-top: 1px solid #e3e6f0;
    color: #5a5c69;
}

/* Select picker improvements */
.bootstrap-select {
    width: 100% !important;
    max-width: 100% !important;
}

.bootstrap-select .dropdown-toggle {
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem;
    color: #6e707e;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bootstrap-select .dropdown-menu {
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem;
    max-width: 100%;
}

/* Content area improvements */
.container-fluid {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Card improvements */
.card {
    width: 100%;
    overflow: hidden;
}

/* Footer */
footer {
    background-color: #fff;
    border-top: 1px solid #e3e6f0;
    padding: 1rem 0;
    margin-top: auto;
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    display: none;
    width: 2.75rem;
    height: 2.75rem;
    text-align: center;
    color: #fff;
    background: rgba(90, 92, 105, 0.5);
    line-height: 45px;
    z-index: 1000;
}

.scroll-to-top:focus,
.scroll-to-top:hover {
    color: white;
}

.scroll-to-top:hover {
    background: #5a5c69;
}

.scroll-to-top i {
    font-weight: 800;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -224px;
    }
    
    .sidebar.toggled {
        margin-left: 0;
        width: 224px;
    }
    
    .topbar {
        left: 0;
    }
    
    #content-wrapper {
        margin-left: 0;
    }
    
    .sidebar.toggled ~ #content-wrapper {
        margin-left: 0;
    }
    
    .container-fluid {
        padding-right: 1rem;
        padding-left: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* API Documentation Standalone Layout */
.api-documentation-page {
    overflow: hidden;
    height: 100vh;
}

.documentation-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #f8f9fa;
    overflow: hidden;
}

.documentation-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.documentation-back-btn {
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.documentation-back-btn:hover {
    background-color: #4e73df;
    border-color: #4e73df;
    color: #fff;
    transform: translateX(-2px);
}

.documentation-user-info {
    font-size: 14px;
}

.api-docs-container-standalone {
    display: flex;
    flex: 1;
    margin-top: 70px;
    height: calc(100vh - 110px);
    overflow: hidden;
}

.api-docs-sidebar-standalone {
    width: 300px;
    background: #fff;
    border-right: 1px solid #e9ecef;
    position: relative;
    overflow-y: auto;
    z-index: 1020;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.api-docs-content-standalone {
    flex: 1;
    padding: 30px;
    background: #f8f9fa;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
}

.documentation-footer {
    background: #fff;
    border-top: 1px solid #e9ecef;
    padding: 10px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1010;
    flex-shrink: 0;
}

/* API Documentation Styling */
.api-docs-container {
    display: flex;
    min-height: 100vh;
    background: #f8f9fa;
}

.api-docs-sidebar {
    width: 280px;
    background: #fff;
    border-right: 1px solid #e9ecef;
    position: fixed;
    top: 60px;
    left: 224px;
    bottom: 0;
    overflow-y: auto;
    z-index: 1020;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar.toggled ~ #content-wrapper .api-docs-sidebar {
    left: 6.5rem;
}

.api-docs-content {
    flex: 1;
    margin-left: 280px;
    padding: 20px;
    background: #f8f9fa;
    min-height: 100vh;
}

.api-docs-search {
    padding: 0 20px 20px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.api-docs-search .form-control {
    border: 1px solid #d1ecf1;
    border-radius: 6px;
    background: #f8f9fa;
}

.api-docs-search .form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.api-docs-nav {
    padding: 0 20px;
}

.api-docs-nav .nav-link {
    color: #6c757d;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.api-docs-nav .nav-link i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.api-docs-nav .nav-link:hover {
    background: #e9ecef;
    color: #495057;
    text-decoration: none;
}

.api-docs-nav .nav-link.active {
    background: #3498db;
    color: #fff;
}

.api-docs-nav .section-header {
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 8px;
}

.api-docs-nav .ml-3 .nav-link {
    font-size: 13px;
    padding: 6px 12px;
}

.api-section {
    margin-bottom: 60px;
    scroll-margin-top: 100px;
}

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

.api-header h1 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 20px;
}

.api-header .lead {
    font-size: 1.25rem;
    opacity: 0.9;
}

.api-overview {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.api-endpoint-base {
    position: relative;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px 50px 15px 15px;
    font-family: 'Monaco', 'Menlo', monospace;
    margin: 15px 0;
}

.base-url {
    color: #2c3e50;
    font-weight: 500;
}

.copy-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.copy-btn:hover {
    background: #2980b9;
    transform: translateY(-50%) scale(1.05);
}

.copy-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.endpoint-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-left: 4px solid #3498db;
}

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

.endpoint-header h3 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
}

.http-method {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.http-method.get {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.http-method.post {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.code-examples {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.code-example-tabs .nav-tabs {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 12px 12px 0 0;
    margin: 0;
}

.code-example-tabs .nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
}

.code-example-tabs .nav-tabs .nav-link.active {
    background: #fff;
    color: #3498db;
    border-bottom: 2px solid #3498db;
}

.code-example {
    position: relative;
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 0;
    margin: 0;
}

.code-example pre {
    background: transparent;
    border: none;
    margin: 0;
    padding: 20px 50px 20px 20px;
    border-radius: 0;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-all;
}

.code-example code {
    color: inherit;
    background: transparent;
    font-size: inherit;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-all;
}

.tab-content {
    border-radius: 0 0 12px 12px;
}

.reference-section .card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.reference-section .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    border: none;
    padding: 20px;
}

.reference-section .card-header h3 {
    margin: 0;
    font-weight: 500;
}

.reference-section .card-header i {
    margin-right: 10px;
}

.alert {
    border-radius: 8px;
    border: none;
    padding: 16px 20px;
    margin: 20px 0;
}

.alert i {
    margin-right: 10px;
}

.alert-info {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
}

.alert-success {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
    color: white;
}

.alert-warning {
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
    color: white;
}

/* Syntax Highlighting Enhancements */
.language-json .token.property {
    color: #79b8ff;
}

.language-json .token.string {
    color: #85e89d;
}

.language-json .token.number {
    color: #f97583;
}

.language-http .token.url {
    color: #85e89d;
}

.language-http .token.param {
    color: #f97583;
}

/* Alternative color schemes for different code types */
.code-example.http-request {
    background: #0f172a;
    color: #cbd5e1;
}

.code-example.json-response {
    background: #1e293b;
    color: #e2e8f0;
}

.code-example.light-theme {
    background: #f8fafc;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.code-example.light-theme code {
    color: #334155;
}

.code-example.ocean-theme {
    background: #0f3460;
    color: #e0f2fe;
}

.code-example.forest-theme {
    background: #1a2e1a;
    color: #c8e6c9;
}

/* Improved URL wrapping for HTTP requests */
.language-http code {
    white-space: pre-wrap !important;
    word-break: break-all !important;
    overflow-wrap: break-word !important;
}

/* Better readability for long URLs */
.api-endpoint-base code,
.code-example pre code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.5;
}

/* Copy success animation */
.copy-btn.success {
    background: #28a745;
}

.copy-btn.success::after {
    content: "Copied!";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    animation: copyFade 2s ease-in-out;
}

@keyframes copyFade {
    0% { opacity: 0; transform: translateX(-50%) translateY(5px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-5px); }
}

/* Search highlighting */
.search-highlight {
    background: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
}

/* API Documentation Responsive Design */
@media (max-width: 1200px) {
    .api-docs-sidebar {
        left: 0;
        width: 250px;
    }
    
    .api-docs-content {
        margin-left: 250px;
    }
    
    .api-docs-sidebar-standalone {
        width: 280px;
    }
}

@media (max-width: 991px) {
    .api-docs-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        left: 0;
        width: 280px;
    }
    
    .api-docs-sidebar.show {
        transform: translateX(0);
    }
    
    .api-docs-content {
        margin-left: 0;
    }
    
    .api-docs-container-standalone {
        flex-direction: column;
        height: calc(100vh - 110px);
    }
    
    .api-docs-sidebar-standalone {
        position: fixed;
        top: 70px;
        left: 0;
        bottom: 40px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 280px;
        z-index: 1030;
    }
    
    .api-docs-sidebar-standalone.show {
        transform: translateX(0);
    }
    
    .api-docs-content-standalone {
        flex: 1;
        padding: 20px;
        overflow-y: auto;
        height: 100%;
    }
    
    .endpoint-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .endpoint-header h3 {
        margin-bottom: 10px;
    }
    
    .documentation-header .d-flex {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .documentation-header .ml-3 {
        margin-left: 0 !important;
        margin-top: 10px;
    }
    
    .documentation-user-info {
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    .api-header h1 {
        font-size: 2rem;
    }
    
    .api-header .lead {
        font-size: 1.1rem;
    }
    
    .endpoint-card, .code-examples {
        margin-bottom: 20px;
    }
    
    .code-example pre {
        font-size: 12px;
        padding: 15px 40px 15px 15px;
    }
    
    .api-docs-content {
        padding: 15px;
    }
    
    .api-docs-content-standalone {
        padding: 15px;
    }
    
    .documentation-header {
        padding: 10px 0;
    }
    
    .documentation-header h4 {
        font-size: 1.1rem;
    }
    
    .documentation-back-btn {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .api-docs-container-standalone {
        margin-top: 65px;
        height: calc(100vh - 105px);
    }
}