/* Custom CSS for MikroTik Web Manager */

/* Glass morphism effects */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.glass-nav {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.glass-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.glass-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Stats cards - more compact */
.stats-card {
    padding: 16px;
    min-height: 80px;
    display: flex;
    align-items: center;
}

/* Navigation */
.nav-btn.active {
    background: rgba(255, 255, 255, 0.2);
}

/* Form inputs */
.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Select dropdown styling for better readability */
select.form-input {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    background-image: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239CA3AF' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

select.form-input:focus {
    background: rgba(255, 255, 255, 0.15) !important;
}

/* Option styling - this works in most browsers */
select.form-input option {
    background: #1e293b !important;
    color: white !important;
    padding: 8px 12px;
    border: none;
    font-size: 14px;
}

select.form-input option:hover,
select.form-input option:focus {
    background: #3b82f6 !important;
    color: white !important;
}

select.form-input option:checked {
    background: #3b82f6 !important;
    color: white !important;
    font-weight: 600;
}

select.form-input option[selected] {
    background: #3b82f6 !important;
    color: white !important;
}

/* Alternative styling for browsers that don't support option styling */
select.form-input optgroup {
    background: #1e293b;
    color: white;
    font-weight: 600;
    font-style: normal;
}

/* Firefox specific fixes */
@-moz-document url-prefix() {
    select.form-input {
        background: rgba(255, 255, 255, 0.1);
        color: white;
    }
    
    select.form-input option {
        background: #1e293b;
        color: white;
    }
}

/* Webkit specific improvements */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    select.form-input {
        background: rgba(255, 255, 255, 0.1);
        color: white;
    }
}

/* Additional styling for better cross-browser compatibility */
select.form-input::-webkit-scrollbar {
    width: 8px;
}

select.form-input::-webkit-scrollbar-track {
    background: #1e293b;
}

select.form-input::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 4px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Action buttons layout */
.action-buttons {
    display: flex;
    gap: 12px;
}

/* Desktop: Horizontal layout for action buttons (≥1024px) */
@media (min-width: 1024px) {
    .action-buttons {
        flex-direction: row;
        align-items: center;
    }
}

/* Mobile: Stack action buttons vertically (<1024px) */
@media (max-width: 1023px) {
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .action-buttons .glass-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* Client List Styles */
/* Desktop table layout (≥1024px) */
@media (min-width: 1024px) {
    .client-list-container {
        display: block;
    }
    
    .client-table-header {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr 80px;
        gap: 16px;
        padding: 12px 16px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        margin-bottom: 8px;
        font-weight: 600;
        font-size: 14px;
        color: rgba(255, 255, 255, 0.8);
    }
    
    .pon-group {
        margin-bottom: 16px;
    }
    
    .pon-header {
        display: flex;
        align-items: center;
        padding: 12px 16px;
        background: rgba(59, 130, 246, 0.2);
        border: 1px solid rgba(59, 130, 246, 0.3);
        border-radius: 8px;
        margin-bottom: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .pon-header:hover {
        background: rgba(59, 130, 246, 0.3);
    }
    
    .client-table-row {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr 80px;
        gap: 16px;
        padding: 12px 16px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        margin-bottom: 4px;
        align-items: center;
        transition: all 0.3s ease;
    }
    
    .client-table-row:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .client-mobile-card {
        display: none;
    }
}

/* Mobile card layout (<1024px) */
@media (max-width: 1023px) {
    .client-table-header {
        display: none;
    }
    
    .client-table-row {
        display: none;
    }
    
    .pon-group {
        margin-bottom: 16px;
    }
    
    .pon-header {
        display: flex;
        align-items: center;
        padding: 12px 16px;
        background: rgba(59, 130, 246, 0.2);
        border: 1px solid rgba(59, 130, 246, 0.3);
        border-radius: 8px;
        margin-bottom: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .client-mobile-card {
        display: block;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 8px;
        transition: all 0.3s ease;
    }
    
    .client-mobile-card:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .client-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 12px;
    }
    
    .client-card-title {
        font-weight: 600;
        font-size: 16px;
        color: white;
    }
    
    .client-card-details {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        font-size: 14px;
        color: rgba(255, 255, 255, 0.8);
    }
    
    .client-detail-item {
        display: flex;
        flex-direction: column;
    }
    
    .client-detail-label {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.6);
        margin-bottom: 2px;
    }
}

/* Secrets List Styles */
.secret-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.secret-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.secret-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.secret-name {
    font-weight: 600;
    font-size: 16px;
    color: white;
}

.secret-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.secret-detail-item {
    display: flex;
    flex-direction: column;
}

.secret-detail-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2px;
}

/* Button styles for client actions */
.client-action-btn {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.client-action-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    color: white;
}

/* PON group toggle indicators */
.pon-toggle-icon {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.pon-group.collapsed .pon-toggle-icon {
    transform: rotate(-90deg);
}

/* Hidden state for PON groups */
.pon-clients.hidden {
    display: none;
}

/* Tab content */
.tab-content.hidden {
    display: none;
}

/* Remove bouncing animations */
* {
    animation: none !important;
    -webkit-animation: none !important;
}

/* Improved text visibility */
.payment-status {
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
    color: white !important;
}

.payment-status.paid {
    background: rgba(34, 197, 94, 0.3);
    border: 1px solid rgba(34, 197, 94, 0.5);
}

.payment-status.unpaid {
    background: rgba(239, 68, 68, 0.3);
    border: 1px solid rgba(239, 68, 68, 0.5);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Status Filter Tabs */
.status-filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.status-tab {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.status-tab:hover {
    background: rgba(255, 255, 255, 0.2);
}

.status-tab.active {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
}

/* Clients Search and Management Styles */
.clients-search-container {
    margin-bottom: 20px;
}

.clients-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.clients-per-page-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.clients-per-page-buttons {
    display: flex;
    gap: 4px;
}

.clients-per-page-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
}

.clients-per-page-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.clients-per-page-btn.active {
    background: rgba(59, 130, 246, 0.5);
    border-color: rgba(59, 130, 246, 0.7);
}

.clients-results-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* Clients Table Styles */
.clients-table-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.clients-table {
    width: 100%;
}

.clients-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 120px;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
    color: white;
    font-size: 14px;
}

.sortable-header {
    cursor: pointer;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sortable-header:hover {
    color: rgba(59, 130, 246, 0.8);
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.pagination-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    gap: 10px;
}

.pagination-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-btn:hover:not(.disabled) {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
}

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

/* Client Action Buttons */
.client-action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 4px;
    font-size: 12px;
}

.client-action-btn:last-child {
    margin-right: 0;
}

.client-action-btn.disconnect:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
}

.client-action-btn.disable:hover {
    background: rgba(255, 107, 107, 0.3);
    border-color: rgba(255, 107, 107, 0.5);
}

.client-action-btn.enable:hover {
    background: rgba(34, 197, 94, 0.3);
    border-color: rgba(34, 197, 94, 0.5);
}

/* Notification Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Mobile Responsive Styles for Client Management */
@media (max-width: 768px) {
    .clients-search-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .clients-per-page-container {
        justify-content: center;
    }
    
    .clients-header {
        display: none; /* Hide table headers on mobile */
    }
    
    .pagination-container {
        flex-direction: column;
        text-align: center;
    }
    
    .pagination-controls {
        justify-content: center;
    }
}

/* Client Status Indicators */
.client-status {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.status-active {
    border-left: 3px solid #22c55e;
}

.status-disconnected {
    border-left: 3px solid #eab308;
}

.status-disabled {
    border-left: 3px solid #ef4444;
}

/* Updated client action buttons */
.client-action-btn.disconnect {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.client-action-btn.disconnect:hover {
    background: rgba(239, 68, 68, 0.3);
    color: white;
}

.client-action-btn.disable {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.4);
    color: #fca5a5;
}

.client-action-btn.disable:hover {
    background: rgba(255, 107, 107, 0.3);
    color: white;
}

.client-action-btn.enable {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #86efac;
}

.client-action-btn.enable:hover {
    background: rgba(34, 197, 94, 0.3);
    color: white;
}

/* Updated table header for new columns */
@media (min-width: 1024px) {
    .client-table-header {
        grid-template-columns: 1fr 100px 1fr 1fr 80px;
    }
    
    .client-table-row {
        grid-template-columns: 1fr 100px 1fr 1fr 80px;
    }
}

/* Secrets Management Styles */
.secrets-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.search-container {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
}

.per-page-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.per-page-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.per-page-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.per-page-btn.active {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
}

.results-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.secrets-table {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

.secrets-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 120px;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.sort-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.3s ease;
}

.sort-btn:hover {
    color: white;
}

.sort-btn.sort-asc .fa-sort:before {
    content: '\f0de'; /* fa-sort-up */
}

.sort-btn.sort-desc .fa-sort:before {
    content: '\f0dd'; /* fa-sort-down */
}

.secrets-body {
    max-height: 600px;
    overflow-y: auto;
}

.secret-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 120px;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    align-items: center;
    transition: background 0.3s ease;
}

.secret-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.secret-row.disabled {
    opacity: 0.6;
    background: rgba(239, 68, 68, 0.1);
}

.secret-username {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.disabled-badge {
    background: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.secret-actions {
    display: flex;
    gap: 8px;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding: 0 16px;
}

.pagination-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

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

.pagination-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* Mobile responsive status tabs */
@media (max-width: 768px) {
    .status-filter-tabs {
        flex-direction: column;
    }
    
    .status-tab {
        width: 100%;
        justify-content: center;
    }
    
    .secrets-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .secrets-header, .secret-row {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: center;
    }
    
    .secrets-header {
        display: none;
    }
    
    .secret-row {
        display: block;
        padding: 16px;
        border-radius: 8px;
        margin-bottom: 8px;
        background: rgba(255, 255, 255, 0.05);
    }
}

/* User Menu Dropdown - Fix z-index issue */
#user-menu {
    z-index: 99999 !important;
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    margin-top: 8px !important;
}

/* Make sure the parent container allows proper positioning */
.user-menu-container {
    position: relative !important;
    z-index: 50000 !important;
}

/* Ensure all dropdown menus appear above everything */
.dropdown-menu, 
.user-dropdown, 
#user-menu,
[id$="-menu"],
[class*="dropdown"] {
    z-index: 99999 !important;
    position: absolute !important;
}

/* Navigation container z-index fix */
nav.glass-nav {
    position: relative;
    z-index: 40000 !important;
}

/* Override any conflicting z-index values */
.nav-btn, 
.glass-btn,
.glass-card,
.modal-overlay {
    z-index: auto !important;
}

/* Ensure the navigation bar itself has proper layering */
.glass-nav .flex {
    position: relative;
    z-index: 40001 !important;
}

/* Specific user dropdown menu styling with maximum z-index */
.user-dropdown-menu {
    z-index: 999999 !important;
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    transform: translateZ(0) !important;
    will-change: transform !important;
}

/* Force user menu container to create a new stacking context */
.user-menu-container {
    transform: translateZ(0) !important;
    isolation: isolate !important;
}

/* Override any potential conflicting styles */
* {
    z-index: auto;
}

/* High priority selectors for user menu */
#user-menu,
.user-dropdown-menu {
    z-index: 999999 !important;
    position: absolute !important;
    isolation: isolate !important;
}

/* Ensure nothing interferes with the dropdown */
body > *:not(nav) {
    z-index: 1 !important;
}

/* Mobile Navigation Styles */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

#mobile-menu.hidden {
    animation: slideUp 0.3s ease-in;
}

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

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

/* Mobile Navigation Button Styles */
.nav-btn-mobile {
    transition: all 0.3s ease;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
}

.nav-btn-mobile:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

.nav-btn-mobile.active {
    background: rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    font-weight: 600;
}

/* Mobile Header Improvements */
@media (max-width: 1023px) {
    /* Hide desktop connection status text on smaller screens */
    #connection-status span {
        display: none;
    }
    
    /* Ensure mobile menu has proper spacing */
    #mobile-menu {
        margin-top: 0;
    }
    
    /* Adjust navigation button spacing for mobile */
    .nav-btn-mobile {
        margin-bottom: 4px;
    }
    
    /* Make sure user menu works on mobile */
    .user-menu-container {
        z-index: 10000;
    }
}

/* Tablet and small desktop adjustments */
@media (max-width: 768px) {
    /* Reduce padding on very small screens */
    .nav-btn-mobile {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    /* Adjust mobile menu padding */
    #mobile-menu .px-4 {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Bandwidth monitoring styles */
.bandwidth-client-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 16px;
}

.bandwidth-client-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.bandwidth-client-item.active {
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.1);
}

.bandwidth-client-item.inactive {
    opacity: 0.6;
}

.client-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.client-name {
    color: white;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-address {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin-top: 2px;
}

.client-speeds {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.download-speed,
.upload-speed {
    display: flex;
    align-items: center;
    gap: 4px;
    color: white;
    font-size: 12px;
    font-weight: 500;
}

.client-usage-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 80px;
}

.usage-bar-container {
    width: 60px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.usage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #3b82f6);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.usage-text {
    color: white;
    font-size: 11px;
    font-weight: 500;
    min-width: 50px;
    text-align: right;
}

/* Modal styles for client history */
#client-history-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

#client-history-modal .modal-content {
    position: relative;
    margin: auto;
    margin-top: 5vh;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    max-width: 900px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

#client-history-chart {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
}

/* Enhanced client details modal styles */
#client-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
}

#client-details-modal .modal-content {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

#client-details-modal .glass-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#client-details-modal .glass-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

#client-details-chart {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

/* Status indicators in client details */
.client-status-connected {
    color: #10b981;
}

.client-status-disconnected {
    color: #f59e0b;
}

.client-status-disabled {
    color: #ef4444;
}

/* Enhanced scrollbar for modal content */
#client-details-modal .modal-content::-webkit-scrollbar {
    width: 8px;
}

#client-details-modal .modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

#client-details-modal .modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

#client-details-modal .modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .glass-card {
        padding: 16px;
    }
    
    .modal-content {
        padding: 24px;
        margin: 10px;
    }
    
    .stats-card {
        padding: 12px;
    }

    /* Bandwidth monitoring mobile responsiveness */
    .bandwidth-client-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .client-speeds {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .client-usage-bar {
        justify-content: center;
    }
    
    #client-history-modal .modal-content {
        margin-top: 2vh;
        padding: 20px;
        max-height: 95vh;
    }
}