/* Agent Authentication Styles */

.jst-agent-login,
.jst-agent-registration {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.jst-agent-login h2,
.jst-agent-registration h2 {
    text-align: center;
    color: #14a34b;
    margin-bottom: 20px;
}

.jst-form-row {
    margin-bottom: 20px;
}

.jst-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.jst-form-row input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.jst-form-row input:focus {
    border-color: #14a34b;
    outline: none;
    box-shadow: 0 0 0 2px rgba(20, 163, 75, 0.2);
}

.jst-button {
    display: inline-block;
    padding: 12px 24px;
    background: #14a34b;
    color: white !important;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.jst-button:hover {
    background: #16a34a;
    color: white !important;
}

.jst-button-primary {
    width: 100%;
}

.jst-message {
    padding: 12px;
    border-radius: 4px;
    margin: 10px 0;
}

.jst-message.success {
    background: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
}

.jst-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Agent Dashboard Styles */

.jst-agent-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.jst-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.jst-dashboard-header h2 {
    margin: 0;
    color: #14a34b;
}

.jst-agent-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: bold;
}

.jst-logout-link {
    color: #d63384;
    text-decoration: none;
    font-size: 14px;
    font-weight: normal;
}

.jst-logout-link:hover {
    color: #b02a5b;
    text-decoration: underline;
}

.jst-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.jst-stat-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.jst-stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #333;
    line-height: 1;
    margin-bottom: 8px;
}

.jst-stat-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jst-stat-open .jst-stat-number { color: #d63384; }
.jst-stat-progress .jst-stat-number { color: #fd7e14; }
.jst-stat-closed .jst-stat-number { color: #20c997; }

.jst-dashboard-filters {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.jst-filter-group {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.jst-filter-group input,
.jst-filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.jst-filter-group input {
    flex: 1;
    min-width: 200px;
}

.jst-filter-group select {
    min-width: 150px;
}

.jst-tickets-list {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.jst-ticket-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s ease;
}

.jst-ticket-item:hover {
    background: #f8f9fa;
}

.jst-ticket-item:last-child {
    border-bottom: none;
}

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

.jst-ticket-number {
    font-weight: bold;
    color: #14a34b;
    font-size: 16px;
}

.jst-ticket-date {
    color: #666;
    font-size: 14px;
}

.jst-ticket-subject {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.jst-ticket-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.jst-ticket-status,
.jst-ticket-priority {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jst-ticket-status.open {
    background: #fee2e2;
    color: #991b1b;
}

.jst-ticket-status.in_progress {
    background: #fed7aa;
    color: #9a3412;
}

.jst-ticket-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.jst-ticket-status.closed {
    background: #d1fae5;
    color: #065f46;
}

.jst-ticket-priority.low {
    background: #e0e7ff;
    color: #3730a3;
}

.jst-ticket-priority.normal {
    background: #f3f4f6;
    color: #374151;
}

.jst-ticket-priority.high {
    background: #fed7aa;
    color: #9a3412;
}

.jst-ticket-priority.urgent {
    background: #fee2e2;
    color: #991b1b;
}

.jst-ticket-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.jst-ticket-actions .jst-button {
    padding: 6px 12px;
    font-size: 14px;
}

.jst-view-ticket {
    background: #6366f1;
}

.jst-view-ticket:hover {
    background: #4f46e5;
}

/* Loading and Empty States */

.jst-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.jst-no-tickets {
    text-align: center;
    padding: 40px;
    color: #666;
}

.jst-no-tickets h3 {
    margin-bottom: 10px;
    color: #333;
}

/* Modal Styles for Agent Dashboard */

.jst-agent-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.jst-agent-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.jst-agent-modal-header {
    background: #14a34b;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.jst-agent-modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.jst-agent-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.jst-agent-modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.jst-agent-modal-body {
    padding: 20px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

/* Responsive Design */

@media (max-width: 768px) {
    .jst-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .jst-dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .jst-filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .jst-filter-group input,
    .jst-filter-group select {
        width: 100%;
    }
    
    .jst-ticket-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .jst-ticket-meta {
        flex-wrap: wrap;
    }
    
    .jst-ticket-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .jst-agent-dashboard {
        padding: 10px;
    }
    
    .jst-dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .jst-agent-modal-content {
        width: 95%;
        margin: 2% auto;
    }
    
    .jst-agent-login,
    .jst-agent-registration {
        margin: 10px;
        padding: 15px;
    }
}