/* Fujifilm Cloud - Component Enhancements */

/* Dashboard cards with Fujifilm branding */
.dashboard-card {
    background: linear-gradient(135deg, var(--fujifilm-white) 0%, var(--fujifilm-gray-light) 100%);
    border: 1px solid var(--fujifilm-border-color);
    border-left: 4px solid var(--fujifilm-green);
    border-radius: var(--fujifilm-border-radius);
    box-shadow: var(--fujifilm-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}

.dashboard-card:hover {
    box-shadow: var(--fujifilm-shadow-hover);
    transform: translateY(-2px);
    border-left-color: var(--fujifilm-green-light);
}

.dashboard-card-header {
    background: var(--fujifilm-gradient);
    color: var(--fujifilm-white);
    padding: 1.5rem;
    border-radius: var(--fujifilm-border-radius) var(--fujifilm-border-radius) 0 0;
    position: relative;
    overflow: hidden;
}

.dashboard-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: rotate(45deg) translate(50px, -50px);
}

.dashboard-card-icon {
    font-size: 2rem;
    margin-right: 1rem;
    opacity: 0.9;
}

.dashboard-card-body {
    padding: 1.5rem;
}

.dashboard-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--fujifilm-gray-dark);
}

.dashboard-card-subtitle {
    color: var(--fujifilm-gray);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.dashboard-card-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--fujifilm-green);
    margin-bottom: 0.5rem;
}

.dashboard-card-change {
    font-size: 0.875rem;
    font-weight: 500;
}

.dashboard-card-change.positive {
    color: var(--fujifilm-green);
}

.dashboard-card-change.negative {
    color: var(--fujifilm-red);
}

/* Data tables with Fujifilm styling */
.fujifilm-table {
    background: var(--fujifilm-white);
    border-radius: var(--fujifilm-border-radius);
    overflow: hidden;
    box-shadow: var(--fujifilm-shadow);
    border: 1px solid var(--fujifilm-border-color);
}

.fujifilm-table thead {
    background: var(--fujifilm-gradient);
    color: var(--fujifilm-white);
}

.fujifilm-table thead th {
    border: none;
    padding: 1.25rem 1rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    position: relative;
}

.fujifilm-table thead th:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.fujifilm-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--fujifilm-border-color);
    transition: all 0.2s ease;
}

.fujifilm-table tbody tr:nth-child(even) {
    background-color: rgba(0, 148, 90, 0.02);
}

.fujifilm-table tbody tr:hover {
    background-color: rgba(0, 148, 90, 0.08);
    transform: scale(1.005);
    transition: all 0.2s ease;
}

.fujifilm-table tbody tr:hover td {
    color: var(--fujifilm-green-dark);
}

/* Table actions */
.table-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

.table-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 4px;
}

/* Enhanced buttons */
.btn-fujifilm-outline {
    border: 2px solid var(--fujifilm-green);
    color: var(--fujifilm-green);
    background: transparent;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: var(--fujifilm-border-radius);
    position: relative;
    overflow: hidden;
}

.btn-fujifilm-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--fujifilm-gradient);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-fujifilm-outline:hover {
    color: var(--fujifilm-white);
    border-color: var(--fujifilm-green);
    box-shadow: 0 4px 12px rgba(0, 148, 90, 0.3);
}

.btn-fujifilm-outline:hover::before {
    left: 0;
}

.btn-fujifilm-gradient {
    background: var(--fujifilm-gradient);
    border: none;
    color: var(--fujifilm-white);
    font-weight: 600;
    box-shadow: var(--fujifilm-shadow);
    transition: all 0.3s ease;
    border-radius: var(--fujifilm-border-radius);
    position: relative;
    overflow: hidden;
}

.btn-fujifilm-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.btn-fujifilm-gradient:hover {
    background: linear-gradient(135deg, var(--fujifilm-green-dark) 0%, var(--fujifilm-green-darker) 100%);
    box-shadow: var(--fujifilm-shadow-hover);
    transform: translateY(-1px);
}

.btn-fujifilm-gradient:hover::before {
    transform: translateX(100%);
}

/* Form enhancements */
.form-fujifilm {
    background: var(--fujifilm-white);
    padding: 2rem;
    border-radius: var(--fujifilm-border-radius);
    box-shadow: var(--fujifilm-shadow);
    border-top: 4px solid var(--fujifilm-green);
    position: relative;
    overflow: hidden;
}

.form-fujifilm::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 148, 90, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.form-fujifilm .form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-fujifilm .form-label {
    font-weight: 600;
    color: var(--fujifilm-gray-dark);
    margin-bottom: 0.5rem;
    display: block;
}

.form-fujifilm .form-control {
    border: 2px solid var(--fujifilm-border-color);
    border-radius: var(--fujifilm-border-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--fujifilm-white);
}

.form-fujifilm .form-control:focus {
    border-color: var(--fujifilm-green);
    box-shadow: 0 0 0 0.2rem rgba(0, 148, 90, 0.25);
    outline: none;
}

.form-fujifilm .form-control:valid {
    border-color: var(--fujifilm-green);
}

.form-fujifilm .form-control:invalid {
    border-color: var(--fujifilm-red);
}

/* Input groups */
.input-group-fujifilm {
    position: relative;
    display: flex;
    align-items: center;
    border: 2px solid var(--fujifilm-border-color);
    border-radius: var(--fujifilm-border-radius);
    transition: all 0.3s ease;
    background: var(--fujifilm-white);
    overflow: hidden;
}

.input-group-fujifilm:focus-within {
    border-color: var(--fujifilm-green);
    box-shadow: 0 0 0 0.2rem rgba(0, 148, 90, 0.25);
}

.input-group-fujifilm .form-control {
    border: none;
    flex: 1;
    padding: 0.75rem;
    outline: none;
    background: transparent;
}

.input-group-fujifilm .input-group-text {
    background: var(--fujifilm-gradient);
    color: var(--fujifilm-white);
    border: none;
    padding: 0.75rem 1rem;
    font-weight: 600;
}

/* Status indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-indicator.online {
    background: linear-gradient(135deg, rgba(0, 148, 90, 0.1) 0%, rgba(0, 122, 77, 0.1) 100%);
    color: var(--fujifilm-green);
    border: 1px solid var(--fujifilm-green);
}

.status-indicator.offline {
    background: linear-gradient(135deg, rgba(229, 0, 18, 0.1) 0%, rgba(184, 0, 14, 0.1) 100%);
    color: var(--fujifilm-red);
    border: 1px solid var(--fujifilm-red);
}

.status-indicator.pending {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 143, 0, 0.1) 100%);
    color: #8B6914;
    border: 1px solid #FFC107;
}

.status-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Navigation enhancements */
.nav-fujifilm {
    background: var(--fujifilm-gradient);
    padding: 1rem;
    border-radius: var(--fujifilm-border-radius);
    box-shadow: var(--fujifilm-shadow);
}

.nav-fujifilm .nav-link {
    color: var(--fujifilm-white);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: var(--fujifilm-border-radius);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-fujifilm .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.nav-fujifilm .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--fujifilm-white);
    transform: translateY(-2px);
}

.nav-fujifilm .nav-link:hover::before {
    transform: translateX(0);
}

.nav-fujifilm .nav-link.active {
    background: var(--fujifilm-white);
    color: var(--fujifilm-green);
    font-weight: 600;
}

/* Navigation Menu Styles */
.fujifilm-nav-header {
    background: var(--fujifilm-gradient);
    border-bottom: 2px solid var(--fujifilm-green-light);
    padding: 1rem 0;
}

.logo-image {
    height: 40px;
    width: auto;
    border-radius: 4px;
}

.brand-text .navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--fujifilm-white);
    text-decoration: none;
}

.brand-text small {
    color: var(--fujifilm-green-light);
    font-size: 0.75rem;
}

.fujifilm-nav {
    background: linear-gradient(180deg, var(--fujifilm-white) 0%, var(--fujifilm-gray-light) 100%);
    min-height: calc(100vh - 80px);
}

.nav-section {
    padding: 1rem 0;
}

.fujifilm-nav .nav-link {
    color: var(--fujifilm-gray-dark);
    font-weight: 500;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    border-radius: var(--fujifilm-border-radius);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fujifilm-nav .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: var(--fujifilm-gradient);
    transition: width 0.3s ease;
    z-index: -1;
}

.fujifilm-nav .nav-link:hover {
    color: var(--fujifilm-white);
    background: var(--fujifilm-gradient);
    transform: translateX(8px);
}

.fujifilm-nav .nav-link:hover::before {
    width: 100%;
}

.fujifilm-nav .nav-link.active {
    color: var(--fujifilm-white);
    background: var(--fujifilm-gradient);
    font-weight: 600;
    box-shadow: var(--fujifilm-shadow);
}

.nav-icon {
    color: var(--fujifilm-green);
    transition: all 0.3s ease;
}

.nav-link:hover .nav-icon {
    color: var(--fujifilm-white);
}

.nav-link.active .nav-icon {
    color: var(--fujifilm-white);
}

.nav-text {
    transition: all 0.3s ease;
}

.nav-divider {
    border-color: var(--fujifilm-border-color);
    margin: 1rem 1.5rem;
}

.nav-section-title {
    color: var(--fujifilm-gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
    margin-left: 1rem;
}

.btn-logout {
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
}

.btn-logout:hover {
    color: var(--fujifilm-white);
    background: var(--fujifilm-gradient);
}

/* Breadcrumbs */
.breadcrumb-fujifilm {
    background: var(--fujifilm-white);
    padding: 1rem;
    border-radius: var(--fujifilm-border-radius);
    box-shadow: var(--fujifilm-shadow);
    margin-bottom: 2rem;
}

.breadcrumb-fujifilm .breadcrumb-item {
    color: var(--fujifilm-gray);
}

.breadcrumb-fujifilm .breadcrumb-item.active {
    color: var(--fujifilm-green);
    font-weight: 600;
}

.breadcrumb-fujifilm .breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    color: var(--fujifilm-gray);
    margin: 0 0.5rem;
}

/* Timeline component */
.timeline-fujifilm {
    position: relative;
    padding: 2rem 0;
}

.timeline-fujifilm::before {
    content: '';
    position: absolute;
    left: 2rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--fujifilm-gradient);
}

.timeline-item {
    position: relative;
    padding-left: 4rem;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    background: var(--fujifilm-gradient);
    border-radius: 50%;
    border: 3px solid var(--fujifilm-white);
    box-shadow: 0 0 0 3px var(--fujifilm-border-color);
}

.timeline-content {
    background: var(--fujifilm-white);
    padding: 1.5rem;
    border-radius: var(--fujifilm-border-radius);
    box-shadow: var(--fujifilm-shadow);
    border-left: 4px solid var(--fujifilm-green);
}

.timeline-date {
    color: var(--fujifilm-gray);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--fujifilm-green);
    margin-bottom: 0.5rem;
}

.timeline-description {
    color: var(--fujifilm-gray-dark);
    line-height: 1.6;
}

/* Statistics cards */
.stat-card {
    background: var(--fujifilm-white);
    padding: 2rem;
    border-radius: var(--fujifilm-border-radius);
    box-shadow: var(--fujifilm-shadow);
    text-align: center;
    transition: all 0.3s ease;
    border-top: 4px solid var(--fujifilm-green);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--fujifilm-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--fujifilm-shadow-hover);
}

.stat-card:hover::before {
    opacity: 0.05;
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--fujifilm-green);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--fujifilm-gray-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.stat-change {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.stat-change.positive {
    color: var(--fujifilm-green);
}

.stat-change.negative {
    color: var(--fujifilm-red);
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .dashboard-card {
        margin-bottom: 1.5rem;
    }
    
    .dashboard-card-header {
        padding: 1rem;
    }
    
    .dashboard-card-body {
        padding: 1rem;
    }
    
    .dashboard-card-value {
        font-size: 2rem;
    }
    
    .fujifilm-table {
        font-size: 0.875rem;
    }
    
    .form-fujifilm {
        padding: 1.5rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-value {
        font-size: 2.5rem;
    }
    
    .timeline-item {
        padding-left: 3rem;
    }
}

.form-group-fujifilm {
    margin-bottom: 1.5rem;
}

.form-group-fujifilm label {
    color: #00945A;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.form-control-fujifilm {
    border: 2px solid #E1E8EB;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control-fujifilm:focus {
    border-color: #00945A;
    box-shadow: 0 0 0 0.2rem rgba(0, 148, 90, 0.25);
    outline: none;
}

/* Status indicators with animations */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge-online {
    background: linear-gradient(90deg, #00945A 0%, #00EF79 100%);
    color: white;
    animation: pulse-green 2s infinite;
}

.status-badge-offline {
    background: linear-gradient(90deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.status-badge-warning {
    background: linear-gradient(90deg, #ffc107 0%, #e0a800 100%);
    color: #333;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(0, 148, 90, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(0, 148, 90, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 148, 90, 0); }
}

/* Navigation enhancements */
.nav-item-enhanced {
    position: relative;
    margin: 0.25rem 0;
}

.nav-link-enhanced {
    border-radius: 8px;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
}

.nav-link-enhanced:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.nav-link-enhanced.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #00EF79;
    border-radius: 0 4px 4px 0;
}

/* Search and filter components */
.search-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-input {
    padding-left: 3rem;
    border: 2px solid #E1E8EB;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #00945A;
    box-shadow: 0 0 0 0.2rem rgba(0, 148, 90, 0.25);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #00945A;
    font-size: 1.1rem;
}

/* Loading states */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 148, 90, 0.1);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-fujifilm {
    text-align: center;
    color: #00945A;
}

.loading-fujifilm .spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #E1E8EB;
    border-top: 4px solid #00945A;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* Modal enhancements */
.modal-fujifilm .modal-header {
    background: linear-gradient(90deg, #00945A 0%, #007A4D 100%);
    color: white;
    border-bottom: none;
}

.modal-fujifilm .modal-header .btn-close {
    filter: invert(1);
}

.modal-fujifilm .modal-footer {
    border-top: 1px solid #E1E8EB;
    background: #f8f9fa;
}

/* Notification toasts */
.toast-fujifilm {
    border-left: 4px solid #00945A;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-fujifilm.toast-success {
    border-left-color: #00945A;
}

.toast-fujifilm.toast-error {
    border-left-color: #dc3545;
}

.toast-fujifilm.toast-warning {
    border-left-color: #ffc107;
}

/* Progress bars */
.progress-fujifilm {
    height: 8px;
    background: #E1E8EB;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fujifilm .progress-bar {
    background: linear-gradient(90deg, #00945A 0%, #00EF79 100%);
    transition: width 0.3s ease;
}

/* Chart containers */
.chart-container {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-top: 4px solid #00945A;
}

.chart-title {
    color: #00945A;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

/* Sidebar enhancements */
.sidebar-brand {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .dashboard-card {
        margin-bottom: 1rem;
    }
    
    .chart-container {
        padding: 1rem;
    }
    
    .form-fujifilm {
        padding: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .fujifilm-table {
        font-size: 0.875rem;
    }
    
    .fujifilm-table thead th {
        padding: 0.75rem 0.5rem;
    }
    
    .fujifilm-table tbody td {
        padding: 0.75rem 0.5rem;
    }
    
    .status-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Print styles */
@media print {
    .sidebar,
    .btn,
    .nav-item,
    .top-row {
        display: none !important;
    }
    
    .page {
        display: block !important;
    }
    
    main {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .fujifilm-table {
        box-shadow: none;
        border: 1px solid #333;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible for keyboard navigation */
.btn:focus-visible,
.form-control:focus-visible,
.nav-link:focus-visible {
    outline: 2px solid #00945A;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-fujifilm {
        border: 2px solid currentColor;
    }
    
    .dashboard-card {
        border: 2px solid currentColor;
    }
    
    .fujifilm-table {
        border: 2px solid currentColor;
    }
}
