/*
 * Modern Design System for Mente Navi
 */

:root {
    --primary: #10B981; /* Mint Green from the reference image */
    --primary-hover: #059669;
    --secondary: #8B5CF6; /* Lavender accent */
    --accent: #3B82F6; /* Sky blue */
    --bg-color: #F0F4FC;
    --surface: rgba(255, 255, 255, 0.7);
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --border: rgba(255, 255, 255, 0.3);
    --border-radius-xl: 32px;
    --border-radius-lg: 24px;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Blobs */
body::before,
body::after {
    content: '';
    position: fixed;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    z-index: -1;
    filter: blur(100px);
    opacity: 0.5;
    pointer-events: none;
}

body::before {
    top: -20vw;
    right: -10vw;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, transparent 70%);
    animation: float 20s infinite alternate ease-in-out;
}

body::after {
    bottom: -10vw;
    left: -10vw;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    animation: float 25s infinite alternate-reverse ease-in-out;
}

@keyframes float {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(5%, 5%) scale(1.1); }
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    padding: 1rem 1.5rem 1rem 0; /* Left is 0 because of sidebar, right and top/bottom reduced */
    gap: 1rem;
}

/* Sidebar Styling */
.sidebar-container {
    width: 280px;
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-xl);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.25rem;
    height: calc(100vh - 3rem);
    position: sticky;
    top: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.sidebar-header {
    margin-bottom: 3rem;
    padding: 0 0.75rem;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    background: transparent;
    border: none;
    width: 100%;
    cursor: pointer;
    text-align: left;
}

.nav-item i {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateX(4px);
    text-decoration: none;
    color: var(--primary);
}

.nav-item:hover i {
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.25);
}

.nav-item.active i {
    color: white;
}

.logout-btn:hover {
    color: #EF4444;
}

.logout-btn:hover i {
    color: #EF4444;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.user-card-mini {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
}

.user-avatar {
    width: 44px;
    height: 44px;
    background: var(--secondary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}

.user-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.app-main {
    flex: 1;
    max-width: none; /* Expand to full width */
    padding: 1rem 2rem 1rem 1rem;
    overflow-y: auto;
}

/* Navigation Helpers */
.back-nav {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.back-link {
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.back-link:hover {
    color: var(--primary);
    text-decoration: none;
}

.nav-divider {
    color: var(--border);
}

/* Components */
.card {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-lg);
    border-color: var(--glass-border);
}

/* Glass Utility */
.glass {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border) !important;
}

/* Buttons */
button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 16px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    box-shadow: 0 8px 20px -6px rgba(16, 185, 129, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -6px rgba(16, 185, 129, 0.5);
    filter: brightness(1.05);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Forms */
input[type="text"],
input[type="file"],
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--surface);
}

input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

form div {
    margin-bottom: 1.5rem;
}

form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

/* Modern Upload Area */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    background-color: #F9FAFB;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    margin-bottom: 1rem;
}

.upload-zone:hover {
    border-color: var(--primary);
    background-color: #EEF2FF;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.upload-icon {
    font-size: 2.2rem;
    margin-bottom: 0.25rem;
}

.upload-text {
    font-weight: 600;
    color: var(--text-main);
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.image-preview-wrapper {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: center;
}

.image-preview {
    max-width: 100%;
    max-height: 250px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 4px solid white;
    transform: rotate(-1deg);
    transition: var(--transition);
}

.image-preview:hover {
    transform: rotate(0deg) scale(1.02);
}

.file-input-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

input[type="submit"] {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: auto;
}

input[type="submit"]:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

.flash {
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    animation: slideDown 0.3s ease-out;
}

.flash-notice {
    background-color: #ECFDF5;
    color: #065F46;
    border-color: #A7F3D0;
}

.flash-alert {
    background-color: #FEF2F2;
    color: #991B1B;
    border-color: #FECACA;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Products List */
.product-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 0;
}

.product-item {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.product-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
}

.product-item-link {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.75rem;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none !important;
}

.product-image-box {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 8px 16px -4px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.product-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-item:hover .product-image-box {
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}

.product-item:hover .product-image-box img {
    transform: scale(1.1);
}

.product-info .product-name {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
}

.product-info small {
    color: var(--text-muted);
    display: block;
    line-height: 1.5;
    font-size: 0.85rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title {
    margin: 0;
    font-size: 2rem;
}

/* Progress Bars */
.maintenance-progress-container {
    width: 100%;
    height: 8px;
    background-color: var(--border);
    border-radius: 4px;
    margin: 0.75rem 0;
    overflow: hidden;
}

.maintenance-progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease, background-color 0.4s ease;
}

.maintenance-progress-bar.good {
    background-color: #10B981; /* Green */
}

.maintenance-progress-bar.warning {
    background-color: #F59E0B; /* Orange */
}

.maintenance-progress-bar.danger {
    background-color: #EF4444; /* Red */
}

.maintenance-item-status {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Utility */
.d-none {
    display: none !important;
}

.spinner {
    width: 1.2rem;
    height: 1.2rem;
    border: 3px solid rgba(79, 70, 229, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

/* Responsive Grids */
.product-details-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    /* align-items: stretch (default) for equal height columns */
}

.product-info-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1.25rem 2rem;
    margin-bottom: 1rem;
}

.product-info-grid span {
    font-weight: 500;
    color: var(--text-muted);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .app-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .app-main {
        padding: 1.5rem 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .product-list {
        grid-template-columns: 1fr;
    }

    .product-details-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .product-info-grid {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .product-item-link {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .card {
        padding: 1.5rem;
    }

    input[type="submit"],
    .btn {
        width: 100%;
    }
}

/* Full Screen Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loading-overlay.active {
    display: flex;
}

.overlay-content {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
}

.pulse-emoji {
    font-size: 5rem;
    margin-bottom: 2rem;
    animation: heartpulse 2s infinite ease-in-out;
}

@keyframes heartpulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.loading-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.loading-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
}
/* Timeline styles */
.timeline-item {
    position: relative;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.timeline-dot {
    position: absolute;
    left: -1.5rem;
    width: 10px;
    height: 10px;
    background: var(--secondary);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--secondary);
    z-index: 1;
    top: 50%;
    transform: translateY(-50%);
}

.timeline-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.timeline-item:hover .timeline-content {
    border-color: var(--secondary);
    transform: translateX(4px);
}

.timeline-date {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
}

.timeline-tag {
    font-size: 0.7rem;
    color: var(--secondary);
    font-weight: 700;
}

/* Glassmorphism utility */
.glass {
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.history-timeline {
    position: relative;
    padding-left: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.history-timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: var(--border);
    border-radius: 1px;
}

/* Error styles */
.error-card {
    background-color: #FEF2F2;
    border-color: #FECACA;
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.error-title {
    color: #991B1B;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}
.error-list {
    color: #991B1B;
    padding-left: 1.5rem;
    margin: 0;
}

/* Maintenance Card */
.maintenance-card {
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1.75rem;
    background: var(--surface);
    backdrop-filter: blur(8px);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}

.maintenance-card:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.maintenance-title {
    margin-bottom: 1rem;
    color: var(--text-main);
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.maintenance-meta {
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.maintenance-item-status {
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.status-danger { color: #EF4444; }
.status-warning { color: #F59E0B; }
.status-good { color: var(--text-muted); }

.status-badge-danger { background-color: #FEE2E2; color: #991B1B; }
.status-badge-warning { background-color: #FEF3C7; color: #92400E; }
.status-badge-good { background-color: #DCFCE7; color: #166534; }

/* Empty Placeholder */
.empty-image-placeholder {
    background-color: var(--bg-color);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-image-placeholder::before {
    content: "📷";
    font-size: 1.5rem;
    opacity: 0.5;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Additional Layouts */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.step-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), #3B82F6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
}

.timeline-content {
    background: var(--surface);
    transition: var(--transition);
}

.timeline-item:hover .timeline-content {
    background: #F8FAFF;
}

/* Premium Image Hero */
.image-hero-wrapper {
    position: relative;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    height: 100%;
    background: radial-gradient(circle at center, rgba(79, 70, 229, 0.08) 0%, transparent 70%);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.image-hero-wrapper::before {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background: var(--primary);
    filter: blur(80px);
    opacity: 0.15;
    z-index: 0;
}

.image-hero-frame {
    z-index: 1;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg), 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.image-hero-frame:hover {
    transform: scale(1.02) rotate(1deg);
}

.image-hero-frame img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 12px;
}

/* Card Meta Tags */
.category-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: #EEF2FF;
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.model-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Rich Manual Management Section */
.manual-rich-zone {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #F9FAFB 0%, #F5F3FF 100%);
    border-radius: var(--border-radius);
    border: 1px solid rgba(79, 70, 229, 0.1);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.manual-rich-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.manual-rich-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.02em;
}

.manual-status-badge {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
    background: white;
    border: 1px solid var(--border);
}

.manual-status-badge.verified {
    background: #ECFDF5;
    color: #10B981;
    border-color: #A7F3D0;
}

/* Custom Upload UI */
.custom-file-upload {
    display: block;
    cursor: pointer;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px dashed #DDD6FE;
    text-align: center;
    transition: var(--transition);
}

.custom-file-upload:hover {
    border-color: var(--primary);
    background: #FDFEFE;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.upload-icon-circle {
    width: 40px;
    height: 40px;
    background: #F5F3FF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.25rem;
    color: var(--primary);
}

/* Hidden File Input */
.manual-file-input {
    display: none;
}

.manual-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none !important;
    transition: var(--transition);
}

.manual-btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #3B82F6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.manual-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.35);
    filter: brightness(1.1);
}

.manual-btn-outline {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.manual-btn-outline:hover {
    background: #F9FAFB;
    border-color: var(--primary);
}

/* --- Modern Bento Dashboard Styles --- */

:root {
    --bento-peach: #FFF0ED;
    --bento-peach-text: #FF6B4A;
    --bento-lavender: #F5F3FF;
    --bento-lavender-text: #8B5CF6;
    --bento-mint: #ECFDF5;
    --bento-mint-text: #10B981;
    --bento-sky: #EFF6FF;
    --bento-sky-text: #3B82F6;
    --bento-bg: #F8F9FE;
    --bento-radius: 32px;
}

body {
    background-color: var(--bento-bg);
}

.bento-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(100px, auto);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.bento-card {
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--bento-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.bento-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

/* Card Sizes */
.bento-main { grid-column: span 9; grid-row: span 4; position: relative; }
.bento-stat { grid-column: span 3; grid-row: span 2; }
.bento-action { display: none; } /* Removed as requested */
.bento-wide { grid-column: span 12; }

/* Product Visual Card */
.bento-visual-content {
    display: flex;
    gap: 3rem;
    height: 100%;
    align-items: center;
}

.bento-specs-section {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 3rem;
    padding-left: 3rem;
    border-left: 1px solid var(--glass-border);
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.spec-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.spec-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.bento-card-actions {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    display: flex;
    gap: 0.75rem;
}

.action-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    cursor: pointer;
}

.action-icon-btn:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.action-icon-btn.btn-delete:hover {
    color: #EF4444;
}

.bento-main-image {
    max-width: 80%;
    max-height: 400px;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.1));
}

.bento-product-info {
    margin-top: 2rem;
    text-align: center;
}

.bento-brand {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.bento-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

/* Colorful Status Cards */
.card-peach { background-color: var(--bento-peach); border-color: #FED7D7; }
.card-lavender { background-color: var(--bento-lavender); border-color: #DDD6FE; }
.card-mint { background-color: var(--bento-mint); border-color: #A7F3D0; }
.card-sky { background-color: var(--bento-sky); border-color: #BFDBFE; }

.stat-value {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    margin: 0.5rem 0;
    font-family: 'Outfit', sans-serif;
}

.peach-text { color: var(--bento-peach-text); }
.lavender-text { color: var(--bento-lavender-text); }
.mint-text { color: var(--bento-mint-text); }
.sky-text { color: var(--bento-sky-text); }

.stat-label {
    font-size: 0.9rem;
    font-weight: 700;
    opacity: 0.8;
}

/* Bento Action Buttons */
.bento-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    width: 100%;
}

.bento-btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.2);
}

.bento-btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.3);
}

.bento-btn-ghost {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

/* Viewer Card */
.bento-viewer {
    grid-column: span 12;
    padding: 0;
    overflow: hidden;
    height: 800px;
    background: black;
    border: 2px solid var(--glass-border);
}

.bento-viewer iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.hidden {
    display: none !important;
}

/* Manual Thumbnail Link Styles */
.manual-thumbnail-link .manual-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(16, 185, 129, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.manual-thumbnail-link:hover .manual-preview-img {
    transform: scale(1.05);
}

.manual-thumbnail-link:hover .manual-hover-overlay {
    opacity: 1;
    visibility: visible;
}

/* Bento Hero Icon Styles */
.bento-hero-icon-container {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFF, #F0F4FF);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    box-shadow: 
        0 20px 40px -10px rgba(79, 70, 229, 0.1),
        inset 0 -8px 16px -4px rgba(0, 0, 0, 0.05);
    position: relative;
    border: 8px solid white;
}

.bento-hero-icon-inner {
    font-size: 8rem;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bento-hero-icon-container:hover .bento-hero-icon-inner {
    transform: scale(1.1) rotate(5deg);
}

/* Optional Thumbnail Overlay if image exists */
.bento-thumbnail-overlay {
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: var(--shadow-lg);
    background: white;
}

.bento-thumbnail-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Bento Upload Card - Fixed to Right Column */
.bento-upload { 
    grid-column: 10 / 13; 
    grid-row: 1 / 5; 
    position: relative;
}

.upload-zone-premium {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border);
    border-radius: 24px;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
    gap: 1rem;
}

.upload-zone-premium:hover {
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.05);
    transform: translateY(-2px);
}

.upload-icon-box {
    width: 64px;
    height: 64px;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    color: var(--primary);
}

.upload-zone-premium span {
    font-weight: 700;
    color: var(--text-main);
}

.upload-zone-premium small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.hidden-input {
    display: none;
}

/* Count Badge for Detail Headers */
.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 12px;
    padding: 0.25rem 0.85rem;
    font-size: 1.25rem;
    font-weight: 850;
    margin-left: 1rem;
    color: var(--text-main);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.05);
}

.count-badge-peach { background: var(--bento-peach); color: var(--bento-peach-text); }
.count-badge-mint { background: var(--bento-mint); color: var(--bento-mint-text); }
/* Responsive Grid */
@media (max-width: 1024px) {
    .bento-container {
        grid-template-columns: 1fr;
    }
    .bento-main, .bento-stat, .bento-action, .bento-upload {
        grid-column: span 1;
        grid-row: auto;
    }
    .bento-hero-icon-container {
        width: 180px;
        height: 180px;
    }
    .bento-hero-icon-inner {
        font-size: 6rem;
    }
}
