/* Custom Styles for ICOM CMS */
body {
    background-color: #f5f7fb;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

.main-content {
    padding: 90px 15px 15px;
    box-sizing: border-box;
    min-height: calc(100vh - 60px);
    margin: 0 auto;
    max-width: 1400px; /* Slightly wider for better use of screen space on larger displays */
}

@media (max-width: 992px) {
    .main-content {
        padding: 75px 10px 10px;
        max-width: 100%; /* Use full width on medium and smaller screens for better readability */
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 65px 5px 5px; /* Reduced padding for very small screens */
    }
}

/* Navbar styles */
.navbar {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

/* Mobile menu toggle button */
.navbar-toggler {
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.navbar-brand img {
    max-height: 40px;
}

/* Mobile menu toggle button */
.navbar-toggler {
    z-index: 102;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    background-color: #4361ee;
    color: white;
    font-weight: bold;
    border-radius: 10px 10px 0 0;
}

.card-body {
    background-color: white;
    padding: 25px;
}

.btn-primary {
    background-color: #3a56d4;
    border: none;
    padding: 10px 20px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #3147b3;
}

.btn-warning {
    background-color: #f39c12;
    border: none;
    transition: background-color 0.3s;
}

.btn-warning:hover {
    background-color: #e67e22;
}

.btn-danger {
    background-color: #e74c3c;
    border: none;
    transition: background-color 0.3s;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.table {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
}

.table th {
    background-color: #ecf0f1;
    color: #2c3e50;
    font-weight: 600;
}

.table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.table tr:hover {
    background-color: #eef2f7;
}

/* Responsive navbar behavior */
.navbar-nav .nav-link {
    padding: 0.5rem 1.5rem;
    color: white;
    transition: background-color 0.3s;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.3);
    font-weight: bold;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 0.25rem;
    }
}

.form-control, .form-select {
    border-radius: 5px;
    border: 1px solid #dcdcdc;
    padding: 10px;
    transition: border-color 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: #3a56d4;
    box-shadow: 0 0 0 0.2rem rgba(58, 86, 212, 0.25);
    outline: none;
}

.dashboard-stats {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.dashboard-stats .card {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    margin-bottom: 20px;
    min-width: 200px;
    flex: 1 1 calc(16.66% - 15px); /* Adjust width to fit 6 cards in a row on larger screens */
    margin-right: 15px;
}

.dashboard-stats .card:last-child {
    margin-right: 0;
}

@media (max-width: 1200px) {
    .dashboard-stats .card {
        flex: 1 1 calc(33.33% - 15px); /* 3 cards per row on medium screens */
    }
}

@media (max-width: 768px) {
    .dashboard-stats .card {
        flex: 1 1 calc(50% - 15px); /* 2 cards per row on smaller screens */
        margin-right: 15px;
    }
    .dashboard-stats .card:nth-child(2n) {
        margin-right: 0;
    }
}

@media (max-width: 576px) {
    .dashboard-stats .card {
        flex: 1 1 100%; /* 1 card per row on very small screens */
        margin-right: 0;
    }
}

.dashboard-stats .card-body {
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.dashboard-stats h3 {
    margin: 0;
    font-size: 2.5rem;
}

.dashboard-stats p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

.ticket-status-open {
    background-color: #e74c3c;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8em;
}

.ticket-status-in_progress {
    background-color: #f39c12;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8em;
}

.ticket-status-closed {
    background-color: #2ecc71;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8em;
}

.notification-icon {
    position: relative;
    cursor: pointer;
}

.notification-icon .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 3px 6px;
    font-size: 0.7em;
}

.ticket-status-assigned {
    background-color: #3498db;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8em;
}

.ticket-status-resolved {
    background-color: #2ecc71;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8em;
}

.notification-dropdown {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: none;
    position: absolute;
    right: 0;
    top: 35px;
    width: 300px;
    z-index: 1000;
}

.notification-dropdown.show {
    display: block;
}

.notification-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: #f9f9f9;
}

.notification-item .title {
    font-weight: bold;
    color: #2c3e50;
}

.notification-item .time {
    font-size: 0.8em;
    color: #7f8c8d;
}

/* Company Branding Footer */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-top: auto;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
}

footer .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

footer .company-info {
    text-align: left;
    flex: 1;
    min-width: 300px;
    margin-bottom: 20px;
}

footer .social-links {
    flex: 1;
    min-width: 300px;
    margin-bottom: 20px;
}

footer .social-links a {
    color: white;
    font-size: 1.5rem;
    margin: 0 10px;
    transition: transform 0.3s;
}

footer .social-links a:hover {
    transform: translateY(-5px);
    color: #f8f9fa;
}

footer .copyright {
    flex: 0 0 100%;
    margin-top: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
}
