/* Reset and Base Styles - Updated: 2024-01-15 - Modern Tickets UI Applied */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #ffffff; /* White background to match all content */
    color: #333;
    line-height: 1.6;
}

/* App Wrapper */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: #ffffff; /* White background to match all content */
}

/* Sidebar Styles - Exact Design from Image */
.sidebar {
    width: 280px;
    background: rgba(28, 27, 31, 1); /* Dark background from image */
    color: #ffffff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    box-shadow: none; /* Remove shadow for seamless merge */
    border-radius: 0 24px 24px 0; /* More pronounced rounded corners on entire right side */
    overflow: hidden; /* Ensure content doesn't overflow rounded corners */
}

.sidebar-header {
    padding: 20px;
    background: #000000; /* Black background */
    border-radius: 0 24px 0 0; /* Match the sidebar's top-right radius */
    margin: 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: #000000; /* Black background to match header */
    border-radius: 8px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.logo-icon i {
    font-size: 1.5rem;
    color: white;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 0.8rem;
    color: #ffffff;
    font-weight: 400;
    line-height: 1.2;
}


/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-list {
    list-style: none;
    padding: 0 20px;
}

.nav-item {
    margin-bottom: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
    margin: 4px 0;
    transform: translateX(0); /* Default position */
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateX(2px); /* Slight outward movement on hover */
}

.nav-link:focus {
    outline: none; /* Remove blue glow effect */
}

.nav-link.active {
    background: #ffffff; /* White background to match main content */
    color: #007EE5; /* Blue text for active state */
    box-shadow: none; /* Remove shadow for seamless sync */
    border-radius: 12px 0 0 12px; /* Rounded corners only on left side, straight right edge */
    font-weight: 600;
    transform: translateX(12px); /* Extend further beyond sidebar */
    margin-right: -12px; /* Compensate for the outward movement */
    border: none; /* No border for cleaner look */
    z-index: 10; /* Ensure it appears above other elements */
    position: relative;
    padding: 12px 16px; /* Standard padding */
    margin-left: -12px; /* Extend to the left edge of sidebar */
    width: calc(100% + 24px); /* Extend further beyond sidebar width */
}

.nav-link.active i {
    color: #007EE5; /* Blue icon for active state */
}

.nav-link i {
    width: 20px;
    margin-right: 0.75rem;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.nav-link.active .fa-chevron-down {
    color: #007EE5; /* Blue chevron for active dropdown */
}

/* Active submenu styling - white background for submenu items */
.nav-sublink.active {
    background: #ffffff;
    color: #007EE5;
    font-weight: 600;
    border-radius: 8px;
    margin: 2px 8px;
    padding: 8px 12px;
}

.nav-sublink.active i {
    color: #007EE5;
}

/* When parent nav item is active, show submenu with white background */
.nav-item:has(.nav-link.active) .nav-sublist {
    background: #ffffff;
    border-radius: 0 0 12px 12px;
    margin-top: 4px;
    padding: 8px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 5;
}

/* Ensure Knowledge Base dropdown gets same white background treatment */
.nav-item:has(.nav-link.active) .nav-sublist.show {
    background: #ffffff;
    border-radius: 0 0 12px 12px;
    margin-top: 4px;
    padding: 8px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 5;
}

.nav-link span {
    flex: 1;
}

.nav-link .fa-chevron-down {
    margin-left: auto;
    font-size: 0.875rem;
    transition: transform 0.3s ease;
}

/* Remove focus effects from dropdown toggles */
.nav-link.dropdown-toggle:focus {
    outline: none;
    box-shadow: none;
}

/* Remove all focus effects from sidebar navigation */
.sidebar-nav *:focus {
    outline: none !important;
    box-shadow: none !important;
}

.nav-link[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

.nav-sublist {
    list-style: none;
    padding: 0.5rem 0 0 2rem;
    margin-top: 0.5rem;
}

.nav-subitem {
    margin-bottom: 0.25rem;
}

.nav-sublink {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #888;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.nav-sublink:hover {
    background-color: transparent;
    color: #007EE5;
}

.nav-sublink:hover i {
    color: #007EE5;
}

.nav-sublink i {
    width: 16px;
    margin-right: 0.5rem;
    font-size: 0.875rem;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid #333;
    text-align: center;
}

.footer-text {
    color: #666;
}

.footer-label {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.footer-brand {
    font-size: 0.875rem;
    font-weight: 600;
    color: #a0a0a0;
}

/* Logout Button */
.sidebar-logout {
    padding: 20px;
    margin-bottom: 20px;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 20px;
    background: #007EE5; /* Blue background from image */
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    gap: 10px;
}

.logout-btn:hover {
    background: #0056b3;
    color: #ffffff;
    text-decoration: none;
}

.logout-btn i {
    font-size: 1rem;
}

/* Synctric Logo Footer */
.sidebar-footer {
    padding: 0 20px 20px 20px;
    text-align: center;
    border-top: none;
}

.footer-text {
    color: #ffffff;
}

.footer-label {
    font-size: 0.75rem;
    margin-bottom: 8px;
    color: #ffffff;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #3399FF; /* Blue color to match image */
}

.synctric-logo-img {
    height: 24px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

.synctric-logo {
    position: relative;
    width: 18px;
    height: 18px;
}

.s-shape {
    width: 18px;
    height: 18px;
    border: 2px solid #3399FF; /* Blue color from image */
    border-radius: 50%;
    position: relative;
}

.s-shape::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid #3399FF;
    border-radius: 50%;
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
}

.s-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.dot {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #3399FF;
    border-radius: 50%;
}

.dot:nth-child(1) {
    top: 1px;
    left: 1px;
}

.dot:nth-child(2) {
    bottom: 1px;
    right: 1px;
}

.synctric-text {
    color: #3399FF; /* Blue text to match image */
    font-weight: 600;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 268px; /* More overlap to accommodate extended active nav items */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    border-radius: 24px 0 0 24px; /* Rounded corners on left side, straight right edge */
    background-color: #ffffff; /* White background to match active nav item */
    overflow: hidden; /* Ensure content doesn't overflow rounded corners */
    position: relative;
    z-index: 5; /* Behind active nav items but above sidebar */
}

/* Create cutout effect in sidebar background */
.sidebar-nav {
    position: relative;
}

/* Create a white cutout element that extends from the active nav */
.nav-item:has(.nav-link.active)::after {
    content: '';
    position: absolute;
    top: 0;
    right: -16px;
    width: 16px;
    height: 100%;
    background: #ffffff;
    border-radius: 0 12px 12px 0;
    z-index: 1;
}

/* Knowledge Base - make the entire nav item behave like Dashboard/Tickets */
.nav-item:has(.nav-link.active) {
    background: #ffffff !important;
    border-radius: 12px 0 0 12px !important;
    transform: translateX(12px) !important;
    margin-right: -12px !important;
    z-index: 10 !important;
    position: relative !important;
    box-shadow: none !important;
    border: none !important;
    width: calc(100% + 24px) !important;
    margin-left: -12px !important;
}

/* Knowledge Base main link - get white background when clicked */
.nav-item .nav-link.active[href="#kbSubmenu"] {
    background: #ffffff !important;
    color: #007EE5 !important;
    box-shadow: none !important;
    border-radius: 12px 0 0 12px !important;
    font-weight: 600 !important;
    transform: translateX(12px) !important;
    margin-right: -12px !important;
    z-index: 10 !important;
    position: relative !important;
    border: none !important;
    padding: 12px 16px !important;
    margin-left: -12px !important;
    width: calc(100% + 24px) !important;
}

.nav-item .nav-link.active[href="#kbSubmenu"] i {
    color: #007EE5 !important;
}

/* Knowledge Base dropdown - fully covered with white background */
.nav-item:has(.nav-link.active) .nav-sublist {
    background: #ffffff !important;
    border-radius: 0 0 12px 12px !important;
    margin-top: 0 !important;
    padding: 8px 0 !important;
    box-shadow: none !important;
    position: relative !important;
    z-index: 10 !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Alternative selector for better browser support */
.nav-item .nav-link.active + .nav-sublist,
.nav-item .nav-link.active + .nav-sublist.show {
    background: #ffffff !important;
    border-radius: 0 0 12px 12px !important;
    margin-top: 0 !important;
    padding: 8px 0 !important;
    box-shadow: none !important;
    position: relative !important;
    z-index: 10 !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Specific Knowledge Base styling - ensure it gets full white background */
.nav-item .nav-link.active[href="#kbSubmenu"] + .nav-sublist {
    background: #ffffff !important;
    border-radius: 0 0 12px 12px !important;
    margin-top: 0 !important;
    padding: 8px 0 !important;
    box-shadow: none !important;
    position: relative !important;
    z-index: 10 !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Force Knowledge Base submenu to have full white background */
.nav-item:has(.nav-link.active) .nav-sublist#kbSubmenu {
    background: #ffffff !important;
    border-radius: 0 0 12px 12px !important;
    margin-top: 0 !important;
    padding: 8px 0 !important;
    box-shadow: none !important;
    position: relative !important;
    z-index: 10 !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Ensure the sidebar background shows through around the cutout */
.sidebar-nav::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 16px;
    height: 100%;
    background: rgba(28, 27, 31, 1);
    z-index: 0;
}

/* Top Banner */
.top-banner {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 20px 24px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.banner-content .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.banner-content .user-avatar {
    width: 48px;
    height: 48px;
    background: #6c757d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
}

.banner-content .user-details {
    display: flex;
    flex-direction: column;
}

.welcome-text {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    line-height: 1.2;
}

.banner-content .user-name {
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    line-height: 1.2;
}

.banner-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.theme-toggle-btn,
.banner-controls .notification-btn {
    width: 40px;
    height: 40px;
    background: #007EE5;
    border: none;
    border-radius: 50%; /* Make it circular */
    color: #ffffff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover,
.banner-controls .notification-btn:hover {
    background: #0056b3;
    transform: scale(1.05); /* Slight scale effect on hover */
}

.header-left {
    display: flex;
    align-items: center;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background-color: #f3f4f6;
    color: #333;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: #333;
    font-size: 0.875rem;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #666;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
}

.action-btn:hover {
    background-color: #e5e7eb;
    color: #333;
}

.notification-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* Page Content */
.page-content {
    flex: 1;
    padding: 2rem;
    background-color: #ffffff; /* White background to match all content */
}

.messages-container {
    margin-bottom: 1.5rem;
}

/* Dashboard Specific Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.dashboard-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin: 0.5rem 0 0 0;
}

.dashboard-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-btn {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.refresh-btn {
    background: #007EE5;
    border: 1px solid #007EE5;
    color: #ffffff;
    padding: 0;
    margin: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 40px;
    width: 40px;
}

.refresh-btn:hover {
    background: #0056b3;
    border-color: #0056b3;
    color: #ffffff;
}

/* Metric Cards */
.metric-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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


.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
}

.metric-icon.blue { background: #3b82f6; }
.metric-icon.green { background: #10b981; }
.metric-icon.yellow { background: #f59e0b; }
.metric-icon.purple { background: #8b5cf6; }

.metric-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1;
}

/* Agent Table */
.agent-table-container {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.agent-table-header {
    background: #f9fafb;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.agent-table-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.agent-table {
    width: 100%;
    border-collapse: collapse;
}

.agent-table th {
    background: #f9fafb;
    color: #374151;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.agent-table td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    vertical-align: middle;
}

.agent-table tbody tr:hover {
    background: #f9fafb;
}

.agent-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.agent-email {
    font-size: 0.875rem;
    color: #6b7280;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
}

.status-badge.blue { background: #3b82f6; }
.status-badge.green { background: #10b981; }
.status-badge.red { background: #ef4444; }
.status-badge.yellow { background: #f59e0b; }
.status-badge.gray { background: #6b7280; }

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background: #10b981;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.time-badge {
    background: #f3f4f6;
    color: #374151;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #e5e7eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .dashboard-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .metric-cards {
        grid-template-columns: 1fr;
    }
    
    .agent-table {
        font-size: 0.875rem;
    }
    
    .agent-table th,
    .agent-table td {
        padding: 0.75rem 0.5rem;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-muted { color: #6b7280; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }

/* Alert Styles */
.alert {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
    font-size: 0.875rem;
}

.alert-success {
    background-color: #f0fdf4;
    border-left-color: #10b981;
    color: #065f46;
}

.alert-danger {
    background-color: #fef2f2;
    border-left-color: #ef4444;
    color: #991b1b;
}

.alert-warning {
    background-color: #fffbeb;
    border-left-color: #f59e0b;
    color: #92400e;
}

.alert-info {
    background-color: #eff6ff;
    border-left-color: #3b82f6;
    color: #1e40af;
}

/* Button Styles */
.btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

/* Dropdown Menu Styling */
.dropdown-menu {
    background: #ffffff !important;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 16px;
    min-width: 200px;
}

.dropdown-menu .form-label {
    color: #000000 !important;
}

.dropdown-menu .filter-option {
    color: #000000 !important;
}

.dropdown-menu .filter-option:hover {
    background: #f8f9fa !important;
    color: #007EE5 !important;
}

.dropdown-menu .filter-option.active {
    background: #007EE5 !important;
    color: #ffffff !important;
}

.btn-outline-primary {
    background: transparent;
    border-color: #3b82f6;
    color: #3b82f6;
}

.btn-outline-primary:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.btn-outline-danger {
    background: transparent;
    border-color: #ef4444;
    color: #ef4444;
}

.btn-outline-danger:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

/* Form Styles */
.form-control {
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    background-color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    color: #374151;
    outline: none;
}

.form-label {
    color: #374151;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* Table Styles */
.table {
    background-color: #ffffff;
    color: #374151;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.table th {
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
    font-weight: 600;
    padding: 1rem;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.table td {
    border-bottom: 1px solid #f3f4f6;
    padding: 1rem;
    vertical-align: middle;
    color: #374151;
    font-size: 0.875rem;
}

.table tbody tr:hover {
    background-color: #f9fafb;
}

/* Badge Styles */
.badge {
    padding: 0.375rem 0.75rem;
    font-weight: 500;
    border-radius: 6px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bg-primary { background-color: #3b82f6 !important; }
.bg-success { background-color: #10b981 !important; }
.bg-warning { background-color: #f59e0b !important; }
.bg-danger { background-color: #ef4444 !important; }
.bg-info { background-color: #06b6d4 !important; }
.bg-secondary { background-color: #6b7280 !important; }

/* Modern Tickets UI Styles */
.tickets-container {
    padding: 0;
    background: #ffffff;
    width: 100%;
    margin: 0;
}

/* Tickets Header */
.tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    gap: 20px;
}

.tickets-title-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tickets-title {
    font-size: 28px;
    font-weight: 700;
    color: #000000;
    margin: 0;
    line-height: 1.2;
}

.tickets-count {
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
}

.tickets-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Search Form */
.search-form {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    color: #9ca3af;
    font-size: 14px;
    z-index: 2;
}

.search-input {
    width: 280px;
    height: 40px;
    padding: 0 16px 0 40px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #f9fafb;
    font-size: 14px;
    color: #374151;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input::placeholder {
    color: #9ca3af;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.dropdown {
    position: relative;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    min-width: 100px;
}

.filter-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

.filter-btn i:first-child {
    font-size: 14px;
}

.filter-btn .fa-chevron-down {
    font-size: 12px;
    margin-left: 4px;
}

.filter-dropdown {
    min-width: 280px;
    max-width: 320px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    background: #ffffff;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    margin-top: 8px;
    transform: translateX(0);
}

/* Ensure dropdown stays within viewport */
@media (max-width: 1200px) {
    .filter-dropdown {
        right: auto;
        left: 0;
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .filter-dropdown {
        position: fixed;
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        width: 90vw;
        max-width: 400px;
        margin: 0;
    }
}

.filter-section {
    margin-bottom: 12px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-section .form-control,
.filter-section .form-select {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
}

.refresh-btn {
    width: 40px;
    height: 40px;
    background: #007EE5;
    border: 1px solid #007EE5;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.refresh-btn:hover {
    background: #0056b3;
    border-color: #0056b3;
    color: #ffffff;
}

.raise-ticket-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 20px;
    background: #3b82f6;
    border: none;
    border-radius: 20px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
}

.raise-ticket-btn:hover {
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
}

/* Tickets Table */
.tickets-table-container {
    background: #ffffff;
    border-radius: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    margin: 0 20px;
}

.tickets-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    min-width: 1000px;
}

.tickets-table thead {
    background: #1f2937;
}

.tickets-table th {
    padding: 16px 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: none;
    white-space: nowrap;
}

/* Column widths */
.tickets-table th:nth-child(1), .tickets-table td:nth-child(1) { width: 140px; min-width: 140px; } /* Created */
.tickets-table th:nth-child(2), .tickets-table td:nth-child(2) { width: 80px; min-width: 80px; }  /* Ticket No */
.tickets-table th:nth-child(3), .tickets-table td:nth-child(3) { width: 300px; min-width: 200px; } /* Title */
.tickets-table th:nth-child(4), .tickets-table td:nth-child(4) { width: 150px; min-width: 120px; } /* IG Username */
.tickets-table th:nth-child(5), .tickets-table td:nth-child(5) { width: 150px; min-width: 120px; } /* User ID */
.tickets-table th:nth-child(6), .tickets-table td:nth-child(6) { width: 150px; min-width: 120px; } /* Agent Name */
.tickets-table th:nth-child(7), .tickets-table td:nth-child(7) { width: 100px; min-width: 80px; }  /* Priority */
.tickets-table th:nth-child(8), .tickets-table td:nth-child(8) { width: 100px; min-width: 80px; }  /* Status */
.tickets-table th:nth-child(9), .tickets-table td:nth-child(9) { width: 100px; min-width: 80px; }  /* Actions */

.tickets-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.tickets-table tbody tr:hover {
    background: #f9fafb;
}

.tickets-table tbody tr:last-child {
    border-bottom: none;
}

.tickets-table td {
    padding: 12px 8px;
    vertical-align: middle;
    font-size: 13px;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Allow text wrapping for title column */
.tickets-table td:nth-child(3) {
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.3;
    max-width: 300px;
}

/* Table Cell Styles */
.created-cell {
    min-width: 120px;
}

.created-date {
    font-weight: 500;
    color: #374151;
    margin-bottom: 2px;
}

.created-time {
    font-size: 12px;
    color: #6b7280;
}

.ticket-no {
    font-weight: 600;
    color: #374151;
    min-width: 80px;
}

.user-info-cell {
    min-width: 200px;
}

.username {
    font-weight: 500;
    color: #374151;
    margin-bottom: 2px;
}

.user-id {
    font-size: 12px;
    color: #6b7280;
}

.agent-name {
    font-weight: 500;
    color: #374151;
    min-width: 150px;
}

.action-cell {
    min-width: 180px;
}

/* Priority Badges */
.priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    min-width: 70px;
    white-space: nowrap;
    height: 32px;
}

.priority-low {
    background: #10b981;
    color: #ffffff;
}

.priority-medium {
    background: #f59e0b;
    color: #ffffff;
}

.priority-high {
    background: #ef4444;
    color: #ffffff;
}

.priority-urgent {
    background: #dc2626;
    color: #ffffff;
}

.priority-na {
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 18px;
    min-width: 70px;
    height: 32px;
    border-radius: 20px;
    background: #f3f4f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-align: center;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
    min-width: 100px;
    white-space: nowrap;
    height: 40px;
}

.status-open {
    background: #ffffff;
    color: #dc2626;
    border: 2px solid #dc2626;
}

.status-in_progress {
    background: #ffffff;
    color: #f59e0b;
    border: 2px solid #f59e0b;
}

.status-resolved {
    background: #ffffff;
    color: #10b981;
    border: 2px solid #10b981;
}

.status-closed {
    background: #ffffff;
    color: #10b981;
    border: 2px solid #10b981;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    min-width: 60px;
    justify-content: center;
    height: 32px;
}

.view-btn {
    background: #007EE5;
    color: #ffffff;
    border: 1px solid #007EE5;
}

.view-btn:hover {
    background: #0056b3;
    color: #ffffff;
    text-decoration: none;
    border-color: #0056b3;
}

.edit-btn {
    background: #ffffff;
    color: #007EE5;
    border: 1px solid #007EE5;
}

.edit-btn:hover {
    background: #f0f8ff;
    color: #007EE5;
    text-decoration: none;
    border-color: #0056b3;
}

/* No Tickets State */
.no-tickets {
    text-align: center;
    padding: 48px 16px;
}

.no-tickets-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: #6b7280;
}

.no-tickets-content i {
    font-size: 48px;
    color: #d1d5db;
}

.no-tickets-content p {
    font-size: 16px;
    margin: 0;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.pagination-info {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    background: #ffffff;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 12px;
}

.pagination-btn:hover:not(.disabled) {
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
}

.pagination-btn.disabled {
    background: #f8f9fa;
    color: #d1d5db;
    border-color: #e5e7eb;
    cursor: not-allowed;
}

.pagination-btn.disabled:hover {
    background: #f8f9fa;
    border-color: #e5e7eb;
    color: #d1d5db;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 8px;
}

.page-number {
    width: 32px;
    height: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    background: #ffffff;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.page-number:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #374151;
    text-decoration: none;
}

.page-number.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.page-number.active:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.page-ellipsis {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 12px;
}

/* Go to Page Styling */
.go-to-page {
    display: flex;
    align-items: center;
    gap: 8px;
}

.go-to-input {
    width: 100px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
    font-size: 12px;
    color: #374151;
    transition: all 0.2s ease;
}

.go-to-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.go-to-input::placeholder {
    color: #9ca3af;
    font-size: 12px;
}

.go-to-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    background: #ffffff;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.go-to-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

/* 2. Ticket Detail Page Styles */
.ticket-detail-page {
    background: #f9fafb;
    min-height: 100vh;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Align existing sections with main content */
.ticket-detail-page .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    width: 100%;
}

.ticket-detail-page .row {
    margin: 0;
}

.ticket-detail-page .col-md-8 {
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    max-width: none;
}

.top-details-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
    width: 100%;
}

.ticket-detail-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.ticket-detail-header {
    background: #1f2937;
    padding: 20px 24px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-detail-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.ticket-detail-actions {
    display: flex;
    gap: 12px;
}

.ticket-detail-actions .edit-btn {
    padding: 8px 16px;
    background: #007EE5;
    color: #ffffff;
    border: 1px solid #007EE5;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ticket-detail-actions .edit-btn:hover {
    background: #0056b3;
    color: #ffffff;
    text-decoration: none;
    border-color: #0056b3;
}

.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.export-btn {
    background: #3b82f6;
    color: #ffffff;
    border: none;
}

.export-btn:hover {
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
}

.ticket-detail-body {
    padding: 32px;
}

.ticket-info-section {
    margin-bottom: 32px;
}

.ticket-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 0;
}

.info-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 2px;
}

.info-value {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
}

/* Description Section */
.description-section {
    margin-bottom: 32px;
}

.description-title {
    color: #3b82f6;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.description-subtitle {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 20px 0;
}

.description-content {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    min-height: 120px;
}

/* Chat History Box */
.chat-history-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #007EE5;
    margin-top: 12px;
}

.chat-message {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.chat-message:last-child {
    margin-bottom: 0;
}

.chat-label {
    font-weight: 600;
    min-width: 50px;
    flex-shrink: 0;
}

.user-label {
    color: #007EE5;
}

.bot-label {
    color: #6b7280;
}

.chat-text {
    color: #6b7280;
    line-height: 1.5;
    flex: 1;
}

/* Customer Details Section */
.customer-details-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.customer-details-header {
    background: #1f2937;
    padding: 20px 24px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.customer-details-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.customer-edit-btn {
    background: #3b82f6;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.customer-edit-btn:hover {
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
}

.customer-details-body {
    padding: 24px;
}

.customer-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
}

.customer-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.customer-info-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.customer-info-value {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
}

/* Chat History Section */
.chat-history-section {
    margin-bottom: 24px;
}

.chat-history-title {
    color: #3b82f6;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px 0;
}

.chat-container {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
}

.chat-message {
    margin-bottom: 12px;
}

.user-message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.bot-message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-left: 20px;
    position: relative;
}

.bot-message::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #3b82f6;
}

.message-label {
    font-size: 14px;
    font-weight: 600;
    min-width: 50px;
}

.user-message .message-label {
    color: #3b82f6;
}

.bot-message .message-label {
    color: #10b981;
}

.message-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
    flex: 1;
}

.system-message {
    text-align: center;
    margin: 8px 0;
}

.system-message .message-text {
    background: #f3f4f6;
    color: #6b7280;
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 12px;
    display: inline-block;
}

/* Edit Ticket Page Styles */
.edit-ticket-page {
    background: #f9fafb;
    min-height: 100vh;
    padding: 20px;
    max-width: 1800px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Form Errors */
.form-errors {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    list-style: none;
    padding: 0;
}

.form-errors li {
    margin: 2px 0;
}

.page-header {
    margin-bottom: 24px;
    text-align: left;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    margin: 0;
    line-height: 1.4;
}

/* Edit Ticket Form Styles */
.edit-ticket-container {
    width: 100%;
    margin: 0 0 0 40px;
    display: flex;
    justify-content: flex-start;
}

.edit-ticket-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 1200px;
}

.edit-ticket-header {
    background: #1f2937;
    padding: 20px 24px;
    border-radius: 12px 12px 0 0;
}

.edit-ticket-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.edit-ticket-body {
    padding: 28px;
}

.edit-ticket-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.edit-ticket-form input[type="text"],
.edit-ticket-form input[type="email"],
.edit-ticket-form select,
.edit-ticket-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    font-size: 14px;
    color: #374151;
    transition: all 0.2s ease;
    font-family: inherit;
}

.edit-ticket-form input[type="text"]:focus,
.edit-ticket-form input[type="email"]:focus,
.edit-ticket-form select:focus,
.edit-ticket-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.edit-ticket-form textarea {
    min-height: 200px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.edit-ticket-form select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 14px;
    justify-content: flex-end;
    margin-top: 22px;
}

.save-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    min-width: 80px;
}

.save-btn:hover {
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
}

.cancel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: #ffffff;
    color: #3b82f6;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    min-width: 80px;
}

.cancel-btn:hover {
    background: #f8fafc;
    color: #2563eb;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .tickets-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .tickets-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .search-form {
        flex: 1;
        max-width: 400px;
    }
    
    .top-details-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .ticket-info-grid,
    .customer-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .edit-ticket-container {
        justify-content: center;
    }
    
    .edit-ticket-card {
        max-width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .tickets-title {
        font-size: 24px;
    }
    
    .search-input {
        width: 150px;
    }
    
    .tickets-table {
        font-size: 12px;
    }
    
    .tickets-table th,
    .tickets-table td {
        padding: 12px 8px;
    }
    
    .pagination-container {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}
