/* Companies Modal */
.companies-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: var(--z-index-max);
    backdrop-filter: blur(6px);
    will-change: backdrop-filter;
    padding: 20px;
}

.companies-modal:not(.hidden) {
    display: flex;
}

.companies-modal-content {
    width: min(600px, 100%);
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(0, 255, 136, 0.4);
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    padding: 16px;
}

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

.companies-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #00ff88;
}

.companies-count {
    margin: 4px 0 0 0;
    color: rgba(244, 255, 249, 0.7);
    font-size: 0.9rem;
}

.companies-modal-close {
    background: none;
    border: none;
    color: #00ff88;
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease;
}

.companies-modal-close:hover {
    color: #ff5f5f;
}

.companies-modal-body {
    max-height: 60vh;
    overflow: hidden;
    user-select: none;
}

.companies-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(244, 255, 249, 0.8);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.loading-spinner.small {
    width: 28px;
    height: 28px;
    border-width: 2px;
}

.companies-list {
    max-height: 50vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 6px;
}

.companies-list::-webkit-scrollbar {
    width: 6px;
}

.companies-list::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.3);
    border-radius: 10px;
}

.company-pill {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 136, 0.3);
    background: rgba(0, 255, 136, 0.05);
    color: rgba(244, 255, 249, 0.85);
    font-size: 0.78rem;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    flex: 0 0 auto;
    text-align: left;
    user-select: none;
    pointer-events: none;
}

.companies-empty {
    color: rgba(244, 255, 249, 0.8);
    text-align: center;
    width: 100%;
    margin: 20px 0;
    font-size: 0.95rem;
}

/* Contact Modal */
.contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: var(--z-index-max);
    backdrop-filter: blur(5px);
    will-change: backdrop-filter;
}

.contact-modal:not(.hidden) {
    display: flex;
}

.contact-modal-content {
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid #00ff88;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    backdrop-filter: blur(15px);
    will-change: backdrop-filter;
    box-shadow: 0 20px 40px rgba(0, 255, 136, 0.2);
}

/* Modal scrollları */
.contact-modal-content::-webkit-scrollbar,
.blacklist-modal-content::-webkit-scrollbar,
.tickets-modal-content::-webkit-scrollbar,
.user-panel-modal-content::-webkit-scrollbar,
.add-company-modal .modal-content::-webkit-scrollbar,
.premium-info-modal-content::-webkit-scrollbar {
    width: 8px;
}
.contact-modal-content::-webkit-scrollbar-thumb,
.blacklist-modal-content::-webkit-scrollbar-thumb,
.tickets-modal-content::-webkit-scrollbar-thumb,
.user-panel-modal-content::-webkit-scrollbar-thumb,
.add-company-modal .modal-content::-webkit-scrollbar-thumb,
.premium-info-modal-content::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.45);
    border-radius: 6px;
}

.contact-modal-header {
    background: rgba(0, 255, 136, 0.05);
    border-bottom: 1px solid rgba(0, 255, 136, 0.3);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-modal-header h3 {
    color: #00ff88;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.contact-modal-close {
    background: none;
    border: none;
    color: #00ff88;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-modal-close:hover {
    color: #ff4444;
}

.contact-form {
    padding: 14px;
}

.contact-form .form-group {
    margin-bottom: 10px;
}

.contact-form .form-group:last-child {
    margin-bottom: 0;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: #00ff88;
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, color 0.3s ease, border 0.3s ease, opacity 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
    background: rgba(0, 0, 0, 0.8);
}

.contact-form textarea {
    resize: vertical;
    min-height: 80px;
}

.contact-form .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.cancel-btn {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid #ff4444;
    color: #ff4444;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, color 0.3s ease, border 0.3s ease, opacity 0.3s ease;
}

.cancel-btn:hover {
    background: rgba(255, 68, 68, 0.2);
}

/* Tickets Modal */
.tickets-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: var(--z-index-max);
    backdrop-filter: blur(5px);
    will-change: backdrop-filter;
}

.tickets-modal:not(.hidden) {
    display: flex;
}

.tickets-modal-content {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00ff88;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    will-change: backdrop-filter;
}

.tickets-modal-header {
    background: rgba(0, 255, 136, 0.1);
    border-bottom: 1px solid #00ff88;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tickets-modal-header h3 {
    color: #00ff88;
    margin: 0;
    font-size: 1.3rem;
}

.tickets-modal-close {
    background: none;
    border: none;
    color: #00ff88;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tickets-modal-close:hover {
    color: #ff4444;
}

.tickets-content {
    padding: 20px;
}

.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ticket-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #00ff88;
    border-radius: 8px;
    padding: 15px;
    backdrop-filter: blur(5px);
    will-change: backdrop-filter;
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ticket-subject {
    color: #00ff88;
    font-weight: 600;
    font-size: 1.1rem;
}

.ticket-status {
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 500;
}

.ticket-status.open {
    background: #00ff88;
    color: #000;
}

.ticket-status.closed {
    background: #ff4444;
    color: #fff;
}

.ticket-message {
    color: #00cc66;
    margin-bottom: 10px;
    line-height: 1.4;
}

.ticket-replies {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 255, 136, 0.2);
}

.reply-item {
    background: rgba(0, 255, 136, 0.1);
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 8px;
}

.reply-message {
    color: #00ff88;
    margin-bottom: 5px;
}

.reply-meta {
    color: #00cc66;
    font-size: 0.8rem;
}

.ticket-reply-form {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 255, 136, 0.2);
}

.ticket-reply-form textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00ff88;
    color: #00ff88;
    padding: 10px;
    border-radius: 5px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 10px;
}

.ticket-reply-form button {
    background: linear-gradient(45deg, #00ff88, #00cc66);
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    transition: all 0.3s ease;
}

.ticket-reply-form button:hover {
    background: linear-gradient(45deg, #00cc66, #00ff88);
}

/* Utility Classes */
.hidden {
    display: none;
}

body.modal-open {
    overflow: hidden;
}

