/* index page start */
    :root {
    --primary-bg: #f9fafb;
    --white: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --accent: #007bff;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
.ticket-sec { background-color: var(--primary-bg); padding: 2rem; color: var(--text-main); }

.ticket-container { max-width: 1200px; margin: 0 auto; }

/* --- Ticket-Header Section --- */
.ticket-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.ticket-header h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.ticket-header p { color: var(--text-muted); font-size: 0.875rem; }
.btn-create { background: var(--accent); color: white; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-weight: 600; transition: 0.3s; }
.btn-create:hover { background: #574feb; }

/* --- Stats Grid --- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card { background: var(--white); padding: 1.5rem; border-radius: 12px; border: 1px solid var(--border-color); position: relative; overflow: hidden; }
.stat-card p { font-size: 0.875rem; color: var(--text-muted); font-weight: 500; }
.stat-card h2 { font-size: 2rem; font-weight: 700; margin-top: 5px; }
.stat-icon { position: absolute; right: 20px; bottom: 10px; opacity: 0.05; font-size: 3rem; }

/* --- Filters --- */
.filters { background: var(--white); padding: 1rem; border-radius: 12px; border: 1px solid var(--border-color); display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; margin-bottom: 1.5rem; }
.filter-group { flex: 1; min-width: 150px; }
.filter-group label { display: block; font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; margin-bottom: 5px; }
.filter-group select { w-width: 100%; width: 100%; padding: 8px; border: 1px solid var(--border-color); border-radius: 6px; background: #fefefe; font-size: 0.85rem; outline: none; }
.btn-reset { background: #efeffd; color: var(--accent); border: none; padding: 10px 20px; border-radius: 6px; font-weight: 600; cursor: pointer; }

/* --- Table Styling --- */
.table-container { background: var(--white); position: relative; z-index: 1; border-radius: 12px; border: 1px solid var(--border-color); overflow-x: auto; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th { background: #fafafa; padding: 15px; text-align: left; font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border-color); }
td { padding: 15px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }

.user-info { display: flex; align-items: center; gap: 12px; }
.user-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.ticket-title { font-weight: 600; font-size: 0.95rem; }
.ticket-id { color: var(--text-muted); font-weight: 400; }
.sub-text { font-size: 0.8rem; color: var(--accent); display: block; margin-top: 2px; }

.badge { padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 500; }
.badge-waiting { background: #fffbeb; color: #92400e; }
.badge-closed { background: #f0fdf4; color: #166534; }

.inline-select { border: none; background: #f3f4f6; font-size: 0.75rem; padding: 2px 6px; border-radius: 4px; color: var(--text-muted); }

/* --- Modal Popup --- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; visibility: hidden; opacity: 0; transition: 0.3s; z-index: 1000; }
.modal.active { visibility: visible; opacity: 1; }
.modal-content { background: white; width: 90%; max-width: 500px; padding: 2rem; border-radius: 16px; position: relative; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.close-modal { cursor: pointer; font-size: 2rem; color: var(--text-muted); }

.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 6px; }
.form-control { width: 100%; padding: 10px; border: 1px solid var(--border-color); border-radius: 8px; outline-color: var(--accent); }
textarea.form-control { resize: none; min-height: 100px; }

@media (max-width: 768px) {
    .ticket-sec { padding: 1rem; }
    .filters { flex-direction: column; align-items: stretch; }
}
.avatar-circle{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #6366f1;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #e5e7eb;
}

/* create Ticket start */
body{
    background:#f5f7fb;
    font-family:Arial, Helvetica, sans-serif;
}

.ticket-card{
    max-width:500px;
    margin:60px auto;
    background:#fff;
    padding:25px;
    border-radius:10px;
    box-shadow:0 8px 25px rgba(0,0,0,0.08);
}

.ticket-card label{
    display:block;
    margin-top:15px;
    font-size:14px;
    font-weight:500;
}

.ticket-card select,
.ticket-card textarea{
    width:100%;
    padding:10px;
    border:1px solid #ddd;
    border-radius:6px;
    margin-top:5px;
}

.ticket-card button{
    width:100%;
    margin-top:20px;
    padding:10px;
    border:none;
    background:#4f46e5;
    color:#fff;
    border-radius:6px;
    cursor:pointer;
}

/* Ticket Details  */

   * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

.ticket-dashboard{
     background-color: #f4f7f6;
    padding: 20px;
}

/* .container {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
} */

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 2px solid #eee;
    gap: 5px;
}

.ticket-header h1 {
    font-size: 1.4rem;
    color: #333;
}

.ticket-header h1 span {
    font-weight: normal;
    color: #666;
}


/* Main Content Layout */
.ticket-main-content {
    display: flex;
    flex-wrap: wrap; /* Responsive fix */
}

.titcket-sidebar {
    flex: 1;
    min-width: 250px;
    padding: 20px;
    border-right: 1px solid #eee;
}

.ticket-dashboard .info-box {
    border: 1px solid #ddd;
}

.ticket-dashboard .info-header {
    background: #56a8fe;
    color: white;
    padding: 10px;
    font-weight: bold;
}

.ticket-dashboard .info-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.ticket-dashboard .info-item label {
    display: block;
    font-weight: bold;
    color: #555;
}

.ticket-dashboard .email { color: #2980b9; }

.ticket-dashboard .chat-section {
    flex: 3;
    min-width: 300px;
    padding: 20px;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ticket-dashboard .chat-history {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.ticket-dashboard .message {
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 8px;
    max-width: 85%;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.ticket-dashboard .msg-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 5px;
}

.ticket-dashboard .time { color: #888; }

.ticket-dashboard .customer {
    background: #ffffff;
    align-self: flex-start;
    border-left: 5px solid #f39c12;
}

.ticket-dashboard .owner {
    background: #e1f5fe;
    align-self: flex-end;
    margin-left: auto;
    border-right: 5px solid #3498db;
}

.ticket-dashboard .reply-input textarea {
    width: 100%;
    height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: none;
}

.ticket-dashboard .send-btn {
    margin-top: 10px;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    float: right;
}

.ticket-dashboard .actions{
    display: flex;
    gap: 5px;
    align-items: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ticket-main-content {
        flex-direction: column;
    }
    .titcket-sidebar {
        border-right: none;
        border-bottom: 1px solid #eee;
    }
}

/* Responsive Design */
