.kaveh-ticket-dashboard {
    width: 100%;
    margin: 20px auto;
    padding: 20px;
    border-radius: 8px;
}

.kaveh-ticket-dashboard h3 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

/* Dashboard Statistics Styles */
.ticket-dashboard-stats {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #007bff;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.stat-card.total-tickets {
    border-left-color: #007bff;
}

.stat-card.open-tickets {
    border-left-color: #28a745;
}

.stat-card.replied-tickets {
    border-left-color: #ffc107;
}

.stat-card.closed-tickets {
    border-left-color: #6c757d;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

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

.priority-breakdown {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.priority-breakdown h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1em;
}

.priority-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.priority-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-radius: 5px;
    background-color: #f8f9fa;
    border-left: 3px solid #ddd;
}

.priority-item.urgent {
    border-left-color: #dc3545;
    background-color: #f8d7da;
}

.priority-item.high {
    border-left-color: #fd7e14;
    background-color: #ffeaa7;
}

.priority-item.medium {
    border-left-color: #007bff;
    background-color: #d1ecf1;
}

.priority-item.low {
    border-left-color: #17a2b8;
    background-color: #d4edda;
}

.priority-label {
    font-weight: 500;
    color: #333;
}

.priority-count {
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
}

/* Filter Styles */
.ticket-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.filter-group label {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.ticket-filter {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #fff;
    font-size: 0.9em;
    transition: border-color 0.2s ease;
}

.ticket-filter:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

#clear-filters {
    padding: 8px 16px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
}

#clear-filters:hover {
    background-color: #5a6268;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .priority-stats {
        grid-template-columns: 1fr;
    }
    
    .ticket-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .stats-overview {
        grid-template-columns: 1fr;
    }
}

/* No filtered tickets message */
.no-filtered-tickets {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
    margin: 10px 0;
}

/* Ticket list improvements */
.ticket-list {
    margin-top: 20px;
}

.ticket-item {
    border: 1px solid #eee;
    margin-bottom: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.ticket-header {
    background-color: #f9f9f9;
    padding: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.ticket-header:hover {
    background-color: #f0f0f0;
}

.ticket-title {
    font-weight: bold;
    flex-grow: 1;
    color: #0073aa;
}

.ticket-status,
.ticket-priority,
.ticket-department,
.ticket-date {
    font-size: 0.9em;
    padding: 3px 8px;
    border-radius: 3px;
    margin-left: 10px;
    color: #fff;
}
.ticket-department,
.ticket-date{
    color: #000;

}

.status-open {
    background-color: #28a745; /* Green */
}

.status-replied {
    background-color: #ffc107; /* Yellow/Orange */
    color: #333;
}

.status-closed {
    background-color: #6c757d; /* Gray */
}

.priority-low {
    background-color: #17a2b8; /* Info Blue */
}

.priority-normal {
    background-color: #007bff; /* Primary Blue */
}

.priority-high {
    background-color: #fd7e14; /* Orange */
}

.priority-urgent {
    background-color: #dc3545; /* Red */
}

.ticket-content {
    padding: 15px;
    background-color: #fff;
    border-top: 1px solid #eee;
}

.ticket-messages {
    border: 1px solid #ddd;
    padding: 10px;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
    background-color: #fdfdfd;
}

.ticket-message {
    background-color: #e9ecef;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.ticket-message.original-ticket {
    background-color: #d1ecf1; /* Light blue for original ticket */
    border-left: 5px solid #007bff;
}

.ticket-message .message-author {
    font-weight: bold;
    color: #0056b3;
}

.ticket-message .message-date {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 5px;
}

.ticket-reply-form {
    display: flex;
    flex-direction: column;
}

.ticket-reply-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding in width */
}

.ticket-reply-form button {
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 5px;
}

.ticket-reply-form button:hover {
    background-color: #0056b3;
}

.ticket-reply-form .kaveh-close-ticket {
    background-color: #dc3545;
    margin-left: 10px;
}

.ticket-reply-form .kaveh-close-ticket:hover {
    background-color: #c82333;
}

/* Ticket Submission Form Styles */
.kaveh-ticket-submission-form {
    width: 100%;
    margin: 20px auto;
    padding: 20px;
    border-radius: 8px;
}

.kaveh-ticket-submission-form h3 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.kaveh-ticket-submission-form form p {
    margin-bottom: 15px;
}

.kaveh-ticket-submission-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.kaveh-ticket-submission-form input[type="text"],
.kaveh-ticket-submission-form select,
.kaveh-ticket-submission-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.kaveh-ticket-submission-form textarea {
    resize: vertical;
}

.kaveh-ticket-submission-form input[type="submit"] {
    background-color: #28a745;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    width: auto;
    display: block;
    margin: 0 auto;
}

.kaveh-ticket-submission-form input[type="submit"]:hover {
    background-color: #218838;
}

#kaveh-ticket-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

#kaveh-ticket-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

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

/* Heading */
.kaveh-ticket-dashboard h3{
	font-weight:700;
}

/* Ticket dashboard stats */
.kaveh-ticket-dashboard .ticket-dashboard-stats{
	background-color:rgba(248,249,250,0);
	border-style:none;
	padding-left:0px;
	padding-right:0px;
	padding-top:0px;
	padding-bottom:0px;
	margin-bottom:35px;
}

/* Priority breakdown */
.kaveh-ticket-dashboard .ticket-dashboard-stats .priority-breakdown{
	background-color:#f6f7f9;
	box-shadow:0px 2px 4px 0px rgba(0,0,0,0);
	border-radius: 20px;
	transform:translatex(0px) translatey(0px);
}

/* Ticket filters */
.kaveh-ticket-dashboard .ticket-filters{
	background-color:#f6f7f9;
	box-shadow:0px 2px 4px 0px rgba(0,0,0,0);
	border-radius: 20px;
	transform:translatex(0px) translatey(0px);
	border-width:0px;
}

/* Ticket header */
.ticket-list .ticket-item .ticket-header{
	background-color:#f6f7f9;
	box-shadow:0px 2px 4px 0px rgba(0,0,0,0);
	border-radius: 20px;
	transform:translatex(0px) translatey(0px);
	border-width:0px;
}

/* Ticket item */
.kaveh-ticket-dashboard .ticket-list .ticket-item{
	border-style:solid;
	border-width:0px;
}

/* Priority item */
.priority-breakdown .priority-stats .priority-item{
	border-top-left-radius:50px;
	border-top-right-radius:50px;
	border-bottom-left-radius:50px;
	border-bottom-right-radius:50px;
	border-style:none;
}

/* Heading */
.ticket-dashboard-stats .priority-breakdown h4{
	font-weight:700;
}

/* Button */
#clear-filters{
	border-top-left-radius:50px;
	border-top-right-radius:50px;
	border-bottom-left-radius:50px;
	border-bottom-right-radius:50px;
}

/* Priority filter */
#priority-filter{
	border-style:none;
	border-top-left-radius:50px;
	border-top-right-radius:50px;
	border-bottom-left-radius:50px;
	border-bottom-right-radius:50px;
	padding-left:20px;
	padding-right:20px;
	padding-top:12px;
	padding-bottom:12px;
}

/* Status filter */
#status-filter{
	border-style:none;
	border-top-left-radius:50px;
	border-top-right-radius:50px;
	border-bottom-left-radius:50px;
	border-bottom-right-radius:50px;
	padding-left:20px;
	padding-right:20px;
	padding-top:12px;
	padding-bottom:12px;
}

/* Closed tickets */
.ticket-dashboard-stats .stats-overview .closed-tickets{
	border-top-left-radius:20px;
	border-top-right-radius:20px;
	border-bottom-left-radius:20px;
	border-bottom-right-radius:20px;
	box-shadow:-50px 0px 50px 0px rgba(0,0,0,0.06);
}

/* Replied tickets */
.ticket-dashboard-stats .stats-overview .replied-tickets{
	border-top-left-radius:20px;
	border-top-right-radius:20px;
	border-bottom-left-radius:20px;
	border-bottom-right-radius:20px;
	box-shadow:-50px 0px 50px 0px rgba(0,0,0,0.06);
}

/* Open tickets */
.ticket-dashboard-stats .stats-overview .open-tickets{
	border-top-left-radius:20px;
	border-top-right-radius:20px;
	border-bottom-left-radius:20px;
	border-bottom-right-radius:20px;
	box-shadow:-50px 0px 50px 0px rgba(0,0,0,0.06);
}

/* Total tickets */
.ticket-dashboard-stats .stats-overview .total-tickets{
	border-top-left-radius:20px;
	border-top-right-radius:20px;
	border-bottom-left-radius:20px;
	border-bottom-right-radius:20px;
	box-shadow:-50px 0px 50px 0px rgba(0,0,0,0.06);
	border-left-color:#007bff;
}

/* Button */
.ticket-item .ticket-reply-form .kaveh-add-message{
	display:inline-block;
	width:48%;
	margin-left:10px;
	margin-top:0px;
	border-top-left-radius:50px;
	border-top-right-radius:50px;
	border-bottom-left-radius:50px;
	border-bottom-right-radius:50px;
}

/* Button */
.ticket-item .ticket-reply-form .kaveh-close-ticket{
	display:inline-block;
	flex:0 0 auto;
	width:50%;
	border-top-left-radius:50px;
	border-top-right-radius:50px;
	border-bottom-left-radius:50px;
	border-bottom-right-radius:50px;
}

/* Ticket reply form */
.ticket-item .ticket-reply-form{
	transform:translatex(0px) translatey(0px);
	display:block;
	flex-direction:row;
}

/* Kaveh ticket dashboard */
.kaveh-ticket-dashboard{
	transform:translatex(0px) translatey(0px);
}

/* Text Area */
.ticket-item .ticket-reply-form textarea{
	background-color:#f2f2f2;
	border-style:none;
	padding-left:30px;
	padding-right:30px;
	padding-top:30px;
	padding-bottom:30px;
	border-top-left-radius:20px;
	border-top-right-radius:20px;
	border-bottom-left-radius:20px;
	border-bottom-right-radius:20px;
}

/* Ticket messages */
.ticket-item .ticket-messages{
	border-width:0px;
	padding-left:0px;
	padding-right:0px;
	padding-top:0px;
	padding-bottom:11px;
	margin-bottom:0px;
	transform:translatex(0px) translatey(0px);
}

/* Original ticket */
.ticket-item .ticket-messages .original-ticket{
	margin-bottom:0px;
	padding-bottom:10px;
	border-bottom-right-radius:20px;
	border-bottom-left-radius:20px;
	border-top-right-radius:20px;
	border-top-left-radius:20px;
}

/* Original ticket */
.kaveh-ticket-dashboard .ticket-list .ticket-item .ticket-content .ticket-messages .original-ticket{
	height:auto !important;
}

/* Ticket status */
.ticket-item .ticket-header .ticket-status{
	color:#000000;
}

/* Ticket priority */
.ticket-item .ticket-header .ticket-priority{
	border-top-left-radius:50px;
	border-top-right-radius:50px;
	border-bottom-left-radius:50px;
	border-bottom-right-radius:50px;
	padding-left:15px;
	padding-right:15px;
}

/* Ticket message */
.ticket-item .ticket-messages .ticket-message{
	margin-top:10px;
	border-top-left-radius:20px;
	border-top-right-radius:20px;
	border-bottom-right-radius:20px;
	border-bottom-left-radius:20px;
}

/* Ticket content */
.ticket-list .ticket-item .ticket-content{
	border-top-style:none;
}

@media (min-width:1200px){

	/* Heading */
	.kaveh-ticket-dashboard h3{
		font-size:24px;
	}
	
	/* Heading */
	.ticket-dashboard-stats .priority-breakdown h4{
		font-size:16px;
	}
	
}
/* Ticket title */
#ticket_title{
	border-top-left-radius:50px;
	border-top-right-radius:50px;
	border-bottom-left-radius:50px;
	border-bottom-right-radius:50px;
}

/* Ticket department */
#ticket_department{
	border-top-left-radius:50px;
	border-top-right-radius:50px;
	border-bottom-left-radius:50px;
	border-bottom-right-radius:50px;
	padding-top:14px;
	padding-bottom:14px;
}

/* Ticket priority */
#ticket_priority{
	border-top-left-radius:50px;
	border-top-right-radius:50px;
	border-bottom-left-radius:50px;
	border-bottom-right-radius:50px;
	padding-bottom:14px;
	padding-top:14px;
}

/* Ticket content */
#ticket_content{
	border-top-left-radius:20px;
	border-top-right-radius:20px;
	border-bottom-left-radius:20px;
	border-bottom-right-radius:20px;
}

/* Input */
#kaveh-ticket-form p input{
	border-top-left-radius:50px;
	border-top-right-radius:50px;
	border-bottom-left-radius:50px;
	border-bottom-right-radius:50px;
}

/* Input */
.kaveh-ticket-submission-form #kaveh-ticket-form p input{
	width:100% !important;
}

/* Heading */
.kaveh-ticket-submission-form h3{
	font-weight:700;
	
}

/* 1200px and larger screen sizes */
@media (min-width:1200px){

	/* Heading */
	.kaveh-ticket-submission-form h3{
		font-size:24px;
	}
	
}