/* Admin Panel Styles */
.admin-panel {
    background: var(--bg-panel);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 30px;
    width: 100%;
    max-width: 1400px;
    box-shadow: 0 0 40px rgba(255, 0, 128, 0.3);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.admin-header h1 {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-header h1 .admin-title-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

body.light-theme .admin-header h1 .admin-title-icon {
    color: var(--primary-color);
}

.admin-header h1 .admin-title-icon svg {
    width: 100%;
    height: 100%;
}

.btn-logout {
    padding: 10px 20px;
    background: var(--error-color);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: #cc3333;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.4);
}

.admin-section {
    margin-bottom: 30px;
}

.admin-section h2 {
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.keys-count {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: normal;
    text-transform: none;
    letter-spacing: normal;
}

.keys-count span {
    color: var(--primary-color);
    font-weight: bold;
}

/* Search Box Styles */
.search-box {
    margin-bottom: 20px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
}

.search-icon {
    position: absolute;
    left: 15px;
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
}

.search-icon svg {
    width: 100%;
    height: 100%;
}

.search-input-wrapper input[type="text"] {
    width: 100%;
    padding: 12px 50px 12px 45px;
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s;
}

.search-input-wrapper input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(255, 0, 128, 0.3);
}

.search-input-wrapper input[type="text"]::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.clear-search-btn {
    position: absolute;
    right: 10px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
    color: var(--text-secondary);
    padding: 0;
}

.clear-search-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.clear-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-icon svg {
    width: 100%;
    height: 100%;
}

.search-results-info {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    padding-left: 5px;
}

.search-results-info span {
    color: var(--primary-color);
    font-weight: bold;
}

.no-results-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 16px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    margin-top: 20px;
}

.no-results-message p {
    margin: 0;
}

.create-key-form .input-group {
    display: flex;
    gap: 10px;
}

.create-key-form input {
    flex: 1;
}

.create-key-form .btn-primary {
    width: auto;
    padding: 12px 25px;
}

/* WhatsApp Form Styles */
.whatsapp-form {
    margin-top: 15px;
}

.whatsapp-form .input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.whatsapp-form input[type="url"] {
    flex: 1;
    padding: 12px 15px;
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s;
}

.whatsapp-form input[type="url"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(255, 0, 128, 0.3);
}

.whatsapp-form .btn-primary {
    width: auto;
    padding: 12px 25px;
}

.form-help {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 8px;
    margin-bottom: 0;
    font-style: italic;
}

.whatsapp-preview {
    margin-top: 15px;
    padding: 15px;
    background: rgba(37, 211, 102, 0.1);
    border: 2px solid rgba(37, 211, 102, 0.3);
    border-radius: 8px;
}

.whatsapp-link-preview {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #25d366;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    padding: 8px 15px;
    border-radius: 6px;
    background: rgba(37, 211, 102, 0.1);
}

.whatsapp-link-preview:hover {
    background: rgba(37, 211, 102, 0.2);
    color: #20ba5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.whatsapp-link-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #25d366;
}

.whatsapp-link-icon svg {
    width: 100%;
    height: 100%;
}

.whatsapp-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #25d366;
    vertical-align: middle;
    margin-right: 8px;
}

.whatsapp-icon svg {
    width: 100%;
    height: 100%;
}

.admin-section h2 .whatsapp-icon {
    margin-right: 0;
}

.keys-table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.keys-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-dark);
}

.keys-table thead {
    background: rgba(255, 0, 128, 0.1);
}

.keys-table th {
    padding: 12px;
    text-align: left;
    color: var(--primary-color);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-color);
}

.keys-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
}

.keys-table tbody tr:hover {
    background: var(--bg-hover);
}

.keys-table code {
    background: rgba(255, 0, 128, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

.fingerprint-code {
    background: rgba(255, 0, 128, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    font-size: 11px;
    cursor: help;
    display: inline-block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.no-fingerprint {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 12px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.status-badge.active {
    background: rgba(68, 255, 68, 0.2);
    color: var(--success-color);
}

.status-badge.inactive {
    background: rgba(255, 68, 68, 0.2);
    color: var(--error-color);
}

.actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    padding: 6px 12px;
    background: var(--bg-hover);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-action .action-icon {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cccccc;
}

body.light-theme .btn-action .action-icon {
    color: #333333;
}

body.light-theme .btn-action:hover .action-icon {
    color: #1a1a1a;
}

.btn-action .action-icon svg {
    width: 100%;
    height: 100%;
}

.btn-action:hover .action-icon {
    color: var(--text-primary);
}

.btn-action:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-action.delete:hover {
    background: var(--error-color);
    border-color: var(--error-color);
}

.text-center {
    text-align: center;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    backdrop-filter: blur(10px);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-error {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.95) 0%, rgba(220, 53, 53, 0.95) 100%);
    border: 2px solid var(--error-color);
    box-shadow: 0 4px 20px rgba(255, 68, 68, 0.4), 0 0 30px rgba(255, 68, 68, 0.2);
}

.toast-success {
    background: linear-gradient(135deg, rgba(68, 255, 68, 0.95) 0%, rgba(53, 220, 53, 0.95) 100%);
    border: 2px solid var(--success-color);
    box-shadow: 0 4px 20px rgba(68, 255, 68, 0.4), 0 0 30px rgba(68, 255, 68, 0.2);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-message {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    flex: 1;
}

body.light-theme .toast-error {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.98) 0%, rgba(220, 53, 53, 0.98) 100%);
    color: #ffffff;
}

body.light-theme .toast-success {
    background: linear-gradient(135deg, rgba(68, 255, 68, 0.98) 0%, rgba(53, 220, 53, 0.98) 100%);
    color: #ffffff;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-panel {
        padding: 20px;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .admin-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .search-input-wrapper {
        max-width: 100%;
    }
    
    .keys-table {
        font-size: 12px;
    }
    
    .keys-table th,
    .keys-table td {
        padding: 8px;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .toast {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .toast.show {
        transform: translateY(0);
    }
}

/* ===== Sistema de Suporte (Admin) ===== */
.support-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    margin-left: 8px;
    border-radius: 999px;
    background: var(--primary-color);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    vertical-align: middle;
}

#support-panel-root {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

.support-admin-layout {
    display: grid;
    grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
    gap: 16px;
    min-height: 520px;
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
}

.support-sidebar {
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    max-width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

.support-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
}

.support-filter-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 6px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.support-filter-btn.active,
.support-filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(255, 0, 128, 0.1);
}

.support-ticket-list {
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: scroll;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 440px;
    max-height: 440px;
    min-height: 0;
    min-width: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #ff0080 #1a1a1a;
}

.support-ticket-list::-webkit-scrollbar,
.support-messages::-webkit-scrollbar {
    width: 8px;
}

.support-ticket-list::-webkit-scrollbar-track,
.support-messages::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 8px;
}

.support-ticket-list::-webkit-scrollbar-thumb,
.support-messages::-webkit-scrollbar-thumb {
    background: #ff0080;
    border-radius: 8px;
}

.support-ticket-item {
    text-align: left;
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-panel);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    box-sizing: border-box;
    overflow: hidden;
    flex-shrink: 0;
}

.support-ticket-item:hover,
.support-ticket-item.active {
    border-color: var(--primary-color);
    background: rgba(255, 0, 128, 0.08);
}

.support-ticket-item.unread {
    box-shadow: inset 3px 0 0 var(--primary-color);
}

.support-ticket-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    margin-bottom: 4px;
    min-width: 0;
}

.support-ticket-top strong {
    color: var(--primary-color);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.support-ticket-top span {
    color: var(--text-secondary);
    white-space: nowrap;
    font-size: 11px;
    flex-shrink: 0;
}

.support-ticket-preview {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.support-ticket-meta {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.support-tag {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #ccc;
}

.support-tag.new {
    background: rgba(255, 0, 128, 0.2);
    color: #ff8fc8;
}

.support-tag.blocked {
    background: rgba(255, 68, 68, 0.2);
    color: #ff8888;
}

.support-tag.closed {
    background: rgba(136, 136, 136, 0.25);
    color: #bbb;
}

.support-empty {
    color: var(--text-secondary);
    font-size: 13px;
    padding: 24px 12px;
    text-align: center;
}

.support-chat-panel {
    display: flex;
    flex-direction: column;
    min-height: 480px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.support-chat-empty {
    margin: auto;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 24px;
    text-align: center;
}

.support-chat-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 480px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.support-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.support-chat-header > div:first-child {
    min-width: 0;
    flex: 1 1 160px;
    max-width: 100%;
}

.support-chat-header h3 {
    margin: 0 0 4px;
    color: var(--primary-color);
    font-size: 15px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.support-chat-status {
    font-size: 12px;
    color: var(--text-secondary);
}

.support-chat-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    max-width: 100%;
}

.support-action-btn {
    padding: 8px 12px !important;
    font-size: 12px !important;
    width: auto !important;
    max-width: 100%;
}

.support-block-dropdown {
    position: relative;
}

.support-block-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 160px;
    max-width: calc(100vw - 48px);
    background: #1a1a1a;
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    overflow: hidden;
    z-index: 20;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.support-block-menu.open {
    display: block;
}

.support-block-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
}

.support-block-menu button:hover {
    background: rgba(255, 0, 128, 0.2);
}

.support-block-info {
    margin: 10px 16px 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 68, 68, 0.12);
    border: 1px solid rgba(255, 68, 68, 0.35);
    color: #ffaaaa;
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 32px);
    box-sizing: border-box;
    overflow-wrap: anywhere;
}

.support-block-info .btn-action {
    flex-shrink: 0;
}

.support-messages {
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: scroll;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 360px;
    max-height: 360px;
    min-height: 0;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #ff0080 #1a1a1a;
}

.support-msg {
    max-width: min(80%, 100%);
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-sizing: border-box;
}

.support-msg.user {
    align-self: flex-start;
    background: #222;
    border: 1px solid #333;
}

.support-msg.admin {
    align-self: flex-end;
    background: linear-gradient(135deg, #ff0080, #cc0066);
    color: #fff;
}

.support-msg-meta {
    display: block;
    margin-top: 6px;
    font-size: 10px;
    opacity: 0.75;
}

.support-reply-box {
    display: flex;
    gap: 10px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border-color);
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.support-reply-box textarea {
    flex: 1;
    min-width: 0;
    min-height: 48px;
    max-height: 120px;
    resize: vertical;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: #1a1a1a;
    color: #fff;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 16px; /* evita zoom iOS */
    box-sizing: border-box;
}

.support-reply-box .btn-primary {
    width: auto;
    align-self: flex-end;
    padding: 12px 18px;
    flex-shrink: 0;
}

.support-blocks-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.support-blocks-section h3 {
    color: var(--primary-color);
    font-size: 15px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 900px) {
    .admin-panel {
        padding: 12px !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .support-admin-layout {
        grid-template-columns: minmax(0, 1fr);
        min-height: auto;
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }

    .support-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        max-width: 100%;
        max-height: none;
    }

    .support-ticket-list {
        height: 200px !important;
        min-height: 200px !important;
        max-height: 200px !important;
        overflow-y: scroll !important;
        -webkit-overflow-scrolling: touch;
    }

    .support-chat-wrap,
    .support-chat-panel {
        min-height: 0;
        height: auto;
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }

    .support-chat-wrap {
        display: flex;
        flex-direction: column;
    }

    .support-chat-header {
        padding: 12px;
        flex-direction: column;
        align-items: stretch;
        flex-shrink: 0;
    }

    .support-chat-actions {
        width: 100%;
    }

    .support-chat-actions .support-action-btn,
    .support-chat-actions .support-block-dropdown {
        flex: 1 1 auto;
    }

    .support-chat-actions .support-action-btn,
    .support-chat-actions #support-block-btn {
        width: 100% !important;
        box-sizing: border-box;
    }

    .support-block-dropdown {
        flex: 1 1 auto;
        width: 100%;
    }

    .support-block-info {
        margin: 10px 12px 0;
        max-width: calc(100% - 24px);
        flex-shrink: 0;
    }

    .support-messages {
        height: 280px !important;
        min-height: 280px !important;
        max-height: 280px !important;
        padding: 12px;
        width: 100%;
        overflow-y: scroll !important;
        -webkit-overflow-scrolling: touch;
        flex: none !important;
    }

    .support-msg {
        max-width: 92%;
        flex-shrink: 0;
    }

    .support-reply-box {
        padding: 10px 12px 12px;
        flex-wrap: wrap;
        flex-shrink: 0;
    }

    .support-reply-box .btn-primary {
        width: 100%;
    }

    .support-filters {
        gap: 4px;
        flex-shrink: 0;
    }

    .support-filter-btn {
        font-size: 11px;
        padding: 8px 4px;
    }

    .support-sidebar .search-box {
        flex-shrink: 0;
    }
}

/* Keys pagination */
.keys-search-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.keys-per-page-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
}

.keys-per-page-label select {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
}

.keys-search-btn {
    width: auto !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
}

.keys-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.keys-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    transition: border-color 0.15s, background 0.15s;
}

a.keys-page-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(255, 0, 128, 0.1);
}

.keys-page-btn.active {
    border-color: var(--primary-color);
    background: rgba(255, 0, 128, 0.2);
    color: var(--primary-color);
    font-weight: 700;
}

.keys-page-btn.disabled {
    opacity: 0.4;
    cursor: default;
}

.keys-page-info {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0 6px;
}

