/* Frontend Styles */
.natijalive-tickets-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tickets-header h1 {
    margin: 0;
    font-size: 28px;
    color: #333;
}

.balance-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.balance-label {
    font-weight: 500;
    color: #666;
}

.balance-amount {
    font-size: 24px;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 6px;
}

.balance-amount.positive {
    background: #e8f5e9;
    color: #2e7d32;
}

.balance-amount.zero {
    background: #ffebee;
    color: #c62828;
}

.tickets-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
}

.tickets-sidebar {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: fit-content;
}

.create-ticket-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 25px;
    font-size: 16px;
    font-weight: 600;
}

.tickets-filter {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.tickets-filter h3 {
    margin: 0 0 15px 0;
    font-size: 14px;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 0.5px;
}

.filter-link {
    display: block;
    padding: 10px 15px;
    margin-bottom: 5px;
    text-decoration: none;
    color: #666;
    border-radius: 6px;
    transition: all 0.2s;
}

.filter-link:hover,
.filter-link.active {
    background: #f0f7ff;
    color: #1976d2;
    font-weight: 500;
}

.tickets-list h3 {
    margin: 0 0 15px 0;
    font-size: 14px;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 0.5px;
}

.ticket-item {
    padding: 15px;
    margin-bottom: 10px;
    border: 2px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.ticket-item:hover {
    border-color: #1976d2;
    background: #f0f7ff;
}

.ticket-item.active {
    border-color: #1976d2;
    background: #e3f2fd;
}

.ticket-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ticket-number {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.ticket-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.ticket-status.status-open {
    background: #fff3cd;
    color: #856404;
}

.ticket-status.status-resolved {
    background: #d1ecf1;
    color: #0c5460;
}

.ticket-status.status-closed {
    background: #d4edda;
    color: #155724;
}

.ticket-subject {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
    font-weight: 500;
}

.ticket-date {
    font-size: 12px;
    color: #999;
}

.no-tickets {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.tickets-main {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 500px;
}

.ticket-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.ticket-detail-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #333;
}

.ticket-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.ticket-meta span {
    font-size: 14px;
    color: #666;
}

.ticket-messages {
    margin-bottom: 30px;
}

.ticket-message {
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-left: 4px solid #1976d2;
}

.ticket-message.original {
    background: #f5f5f5;
    border-left-color: #1976d2;
}

.ticket-message.admin {
    background: #e3f2fd;
    border-left-color: #2196f3;
}

.ticket-message.client {
    background: #f1f8e9;
    border-left-color: #8bc34a;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.message-header strong {
    color: #333;
}

.message-header span {
    color: #999;
    font-size: 12px;
}

.message-content {
    color: #555;
    line-height: 1.6;
    white-space: pre-wrap;
}

.ticket-reply-form {
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.ticket-reply-form h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
}

.ticket-reply-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 15px;
}

.ticket-reply-form textarea:focus {
    outline: none;
    border-color: #1976d2;
}

.ticket-empty {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.ticket-empty h2 {
    color: #333;
    margin-bottom: 10px;
}

.ticket-empty p {
    color: #999;
}

/* Modal Styles */
.natijalive-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.natijalive-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.natijalive-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.natijalive-modal-close:hover {
    color: #333;
}

.natijalive-modal-content h2 {
    margin: 0 0 20px 0;
    color: #333;
}

.natijalive-modal-content label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.natijalive-modal-content input[type="text"],
.natijalive-modal-content input[type="number"],
.natijalive-modal-content textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 15px;
}

.natijalive-modal-content input:focus,
.natijalive-modal-content textarea:focus {
    outline: none;
    border-color: #1976d2;
}

.natijalive-modal-content textarea {
    resize: vertical;
    min-height: 120px;
}

.balance-warning {
    padding: 12px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    margin-bottom: 15px;
}

.description {
    font-size: 13px;
    color: #666;
    margin-top: -10px;
    margin-bottom: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tickets-layout {
        grid-template-columns: 1fr;
    }
    
    .tickets-sidebar {
        order: 2;
    }
    
    .tickets-main {
        order: 1;
    }
    
    .tickets-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .balance-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .ticket-detail-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .ticket-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .natijalive-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .natijalive-tickets-container {
        padding: 10px;
    }
    
    .tickets-header h1 {
        font-size: 22px;
    }
    
    .balance-amount {
        font-size: 20px;
        padding: 6px 12px;
    }
}

