/* Add this to your existing styles.css file */
/* ===================== */
/* Layout Consistency Fixes */
/* ===================== */

/* Ensure containers are consistent */
.container-fluid {
    max-width: 1400px; /* You can adjust this as needed */
    padding-left: 2rem;
    padding-right: 2rem;
}

@media (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Navbar full width fix */
.navbar .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
}

/* Main content containers - ensure consistency */
.container {
    max-width: 1400px !important; /* Match the navbar width */
    padding-left: 2rem;
    padding-right: 2rem;
}

/* For specific templates that need full width */
.container-full {
    width: 100%;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Ensure footer width matches navbar */
footer .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
}

/* ===================== */
/* Responsive Adjustments */
/* ===================== */

@media (max-width: 1200px) {
    .container-fluid, 
    .container,
    .navbar .container-fluid,
    footer .container-fluid {
        max-width: 100%;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container-fluid, 
    .container,
    .navbar .container-fluid,
    footer .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ===================== */
/* Navbar Enhancements */
/* ===================== */

.navbar {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 0.75rem !important;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

/* ===================== */
/* Footer Enhancements */
/* ===================== */

footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer a:hover {
    color: #0dcaf0 !important; /* Bootstrap's info color */
}

/* ===================== */
/* Content Spacing */
/* ===================== */

main {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

@media (max-width: 768px) {
    main {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
}

/* ===================== */
/* Card Width Consistency */
/* ===================== */

.card {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* ===================== */
/* Form Width Consistency */
/* ===================== */

form.needs-validation {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* ===================== */
/* Table Width Fix */
/* ===================== */

.table-responsive {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* ===================== */
/* Utility Classes */
/* ===================== */

.width-match-nav {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

@media (max-width: 768px) {
    .width-match-nav {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ===================== */
/* Table Enhancements */
/* ===================== */

/* Modern table styling */
.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    padding: 1rem 0.75rem;
    border-bottom-width: 1px;
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    color: #6c757d;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.03);
}

/* Sticky header for large tables */
.table-responsive {
    max-height: 600px;
    overflow-y: auto;
}

.table-responsive .table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f8f9fa;
}

/* Badge enhancements */
.badge {
    font-weight: 500;
    padding: 0.35em 0.75em;
}

.badge.bg-success {
    background-color: #198754 !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

/* Code/mono styling */
.font-monospace {
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
    font-size: 0.875rem;
}

/* Copy button styling */
.copy-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    transform: translateY(-1px);
}

/* Responsive table cells */
@media (max-width: 768px) {
    .table-responsive {
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody tr {
        display: block;
        border-bottom: 1px solid #dee2e6;
    }
    
    .table tbody tr:last-child {
        border-bottom: none;
    }
    
    .table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem;
        text-align: right;
        border: none;
    }
    
    .table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #495057;
        margin-right: 1rem;
    }
    
    .table tbody td.text-end {
        justify-content: flex-end;
    }
    
    .table tbody td.text-end::before {
        margin-right: auto;
    }
}

/* Card enhancements for tables */
.card-body.p-0 .table {
    border-radius: 0.375rem;
}

.card-body.p-0 .table thead th:first-child {
    border-top-left-radius: 0.375rem;
}

.card-body.p-0 .table thead th:last-child {
    border-top-right-radius: 0.375rem;
}

/* Alert enhancements */
.alert {
    border: none;
    border-radius: 0.5rem;
}

.alert .bi {
    font-size: 1.25rem;
}

/* Empty state styling */
.card .display-1 {
    opacity: 0.5;
}

/* Section spacing */
.py-4.py-lg-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

@media (min-width: 992px) {
    .py-4.py-lg-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
}

/* ===================== */
/* Tickets Specific Styles */
/* ===================== */

/* List group customization */
.list-group-item-action {
    transition: all 0.2s ease;
    border-left: none;
    border-right: none;
}

.list-group-item-action:hover {
    background-color: rgba(13, 110, 253, 0.05);
    transform: translateX(4px);
}

.list-group-item:first-child {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.list-group-item:last-child {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
}

/* Status badge enhancements */
.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000;
}

.badge.bg-info {
    background-color: #0dcaf0 !important;
}

.badge.bg-success {
    background-color: #198754 !important;
}

/* Line clamp for ticket descriptions */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Stats cards */
.bg-light .h3 {
    color: var(--bs-primary);
    font-weight: 600;
}

/* Help cards */
.card.bg-light {
    transition: transform 0.2s ease;
}

.card.bg-light:hover {
    transform: translateY(-4px);
}

.card.bg-light .bg-opacity-10 {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .list-group-item {
        padding: 1rem !important;
    }
    
    .list-group-item .row {
        flex-direction: column;
    }
    
    .list-group-item .col-md-8,
    .list-group-item .col-md-4 {
        width: 100%;
    }
    
    .d-flex.flex-wrap.gap-3 {
        gap: 0.75rem !important;
    }
}

/* Button group spacing */
.d-flex.gap-2 > * {
    margin-right: 0.5rem;
}

.d-flex.gap-2 > *:last-child {
    margin-right: 0;
}

/* Priority indicators */
[class*="priority-"]::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.priority-high::before {
    background-color: #dc3545;
}

.priority-medium::before {
    background-color: #fd7e14;
}

.priority-low::before {
    background-color: #198754;
}

/* Animation for new ticket button */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn-primary:focus {
    animation: pulse 0.5s ease;
}

/* Empty state styling */
.card .display-1 {
    opacity: 0.4;
    font-size: 4rem;
}

@media (min-width: 768px) {
    .card .display-1 {
        font-size: 5rem;
    }
}