/**
 * LMP System Custom CSS
 */

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f5f5f5;
}

/* Tire status colors */
.bg-orange {
    background-color: #fd7e14;
    color: white;
}

/* Asset List Action Buttons */
.action-buttons {
    white-space: nowrap;
}

.action-btn {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    margin-right: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: none;
}

.view-btn {
    background-color: #00c4ff;
}

.view-btn:hover {
    background-color: #00b0e6;
    color: white;
}

.edit-btn {
    background-color: #ffcc00;
}

.edit-btn:hover {
    background-color: #e6b800;
    color: white;
}

.delete-btn {
    background-color: #ff3333;
}

.delete-btn:hover {
    background-color: #e60000;
    color: white;
}

.verify-btn {
    background-color: #4caf50;
}

.verify-btn:hover {
    background-color: #3e8e41;
    color: white;
}

/* Top Navbar Styling */
.top-navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: #fff !important;
    padding: 0.5rem 1rem;
}

.top-navbar .navbar-brand {
    font-weight: bold;
    color: #333;
}

.top-navbar .nav-link {
    color: #555;
    font-weight: 500;
    padding: 0.8rem 1rem;
    transition: all 0.3s ease;
}

.top-navbar .nav-link:hover,
.top-navbar .nav-link.active {
    color: #007bff;
}

.top-navbar .dropdown-menu {
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.top-navbar .dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.top-navbar .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

/* Dashboard Styles */
.dashboard-title {
    margin-bottom: 2rem;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1rem;
}

.stat-card {
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: white;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.stat-card .card-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-card .card-title {
    text-transform: uppercase;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.stat-card .card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.stat-card.blue {
    background-color: #4285F4;
}

.stat-card.green {
    background-color: #34A853;
}

.stat-card.yellow {
    background-color: #FBBC05;
}

.stat-card.red {
    background-color: #EA4335;
}

.stat-card.purple {
    background-color: #8E44AD;
}

.view-details {
    margin-top: auto;
    text-align: right;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.view-details:hover {
    color: white;
    text-decoration: underline;
}

/* Main Menu Buttons */
.main-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.menu-button {
    flex: 1;
    min-width: 250px;
    text-align: center;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 1.5rem;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

/* Import Data Grid Layout */
.import-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    align-items: start;
}

.import-grid .card {
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

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

.import-grid .card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 280px;
}

.import-grid .card-header {
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
}

.import-grid .btn-group-import {
    margin-top: auto;
    padding-top: 1rem;
}

.import-grid .btn-group-import .btn {
    min-width: 120px;
}

.import-grid form {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.import-grid .alert {
    margin-bottom: 1rem;
}

/* Responsive adjustments for Import Grid */
@media (max-width: 768px) {
    .import-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .import-grid .card-body {
        min-height: auto;
    }
    
    .import-grid .btn-group-import {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .import-grid .btn-group-import .btn {
        width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .import-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1201px) {
    .import-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 1200px;
        margin: 2rem auto 0;
    }
}

.menu-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

.menu-button .icon {
    font-size: 2rem;
    color: #007bff;
    margin-bottom: 1rem;
}

.menu-button .title {
    font-weight: bold;
    font-size: 1.2rem;
    color: #333;
}

.menu-button.active {
    border-color: #007bff;
    background-color: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.menu-button.active .icon {
    color: #0056b3;
}

.menu-button.active .title {
    color: #0056b3;
    font-weight: bold;
}

.submenu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.submenu-button {
    flex: 1;
    min-width: 200px;
    text-align: center;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    background-color: white;
    transition: all 0.2s ease;
}

.submenu-button:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
}

.submenu-button .icon {
    font-size: 1.5rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.submenu-button .title {
    font-weight: 500;
    font-size: 1rem;
    color: #555;
}

/* Main content area */
main {
    min-height: 100vh;
    padding-bottom: 60px;
}

/* Card customization */
.card {
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-header {
    font-weight: bold;
}

/* Form customization */
.form-label {
    font-weight: 500;
}

.required-field::after {
    content: " *";
    color: red;
}

/* Table styles */
.table-responsive {
    overflow-x: auto;
}

.asset-table th {
    background-color: #f8f9fa;
    white-space: nowrap;
}

.asset-table img {
    max-width: 100px;
    max-height: 100px;
    object-fit: cover;
}

/* Status badges */
.status-active {
    background-color: #28a745;
}

.status-inactive {
    background-color: #dc3545;
}

.status-maintenance {
    background-color: #ffc107;
    color: #212529;
}

.status-retired {
    background-color: #6c757d;
}

/* Dashboard statistics */
.stat-card {
    border-radius: 10px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .icon {
    font-size: 48px;
    opacity: 0.8;
}

/* ID Card styling */
.id-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background-color: #f8f9fa;
}

.id-card .card-header {
    background-color: #343a40;
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 5px 5px 0 0;
}

.id-card img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* Responsive media queries */
@media (max-width: 768px) {
    #sidebar {
        min-width: 250px;
        max-width: 250px;
        margin-left: -250px;
        position: fixed;
        z-index: 999;
        height: 100%;
    }
    
    #sidebar.active {
        margin-left: 0;
    }
    
    #content {
        width: 100%;
    }
    
    .stat-card {
        margin-bottom: 20px;
    }
}

/* Photo previews */
.img-thumbnail {
    border: 2px solid #ddd;
}

/* Animation for loading indicators */
@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spinner 0.6s linear infinite;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 0;
    color: #6c757d;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
}

/* Notification styles */
.notification-dropdown {
    width: 350px;
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
}

.notification-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.notification-message {
    font-size: 0.9rem;
    margin-right: 8px;
    line-height: 1.4;
}

.notification-time {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Bell icon styling */
#notificationDropdown {
    color: #555;
    transition: color 0.2s ease;
}

#notificationDropdown:hover {
    color: #007bff;
}

/* Journey Manager Styles */
.journey-manager-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.journey-sub-button {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.journey-sub-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 1);
    border-color: #667eea;
}

.journey-sub-button .icon {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.journey-sub-button:hover .icon {
    color: #764ba2;
}

.journey-sub-button .title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    text-align: center;
    line-height: 1.2;
}

.journey-sub-button:hover .title {
    color: #222;
}

/* Animation for Journey Manager toggle */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.journey-manager-section.show {
    animation: slideDown 0.4s ease;
}

/* Responsive adjustments for Journey Manager */
@media (max-width: 768px) {
    .journey-sub-button {
        height: 100px;
        padding: 15px 10px;
    }
    
    .journey-sub-button .icon {
        font-size: 2rem;
        margin-bottom: 8px;
    }
    
    .journey-sub-button .title {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .journey-manager-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .journey-sub-button {
        height: 90px;
        padding: 10px;
    }
    
    .journey-sub-button .icon {
        font-size: 1.8rem;
        margin-bottom: 6px;
    }
    
    .journey-sub-button .title {
        font-size: 0.75rem;
    }
}

/* Print styles */
@media print {
    #sidebar, .btn-toolbar, .no-print, .journey-manager-section {
        display: none !important;
    }
    
    main {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}