html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 80px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f8fafc;
    color: #334155;
}

/* Enhanced Focus States */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #4f46e5;
}

/* Header Styles */
.modern-header {
    background: black;
    border-bottom: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.modern-navbar {
    padding: 1rem 0;
    background: transparent;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: #C0A466 !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

    .navbar-brand:hover {
        color: #D4B876 !important;
        transform: translateY(-1px);
    }

    .navbar-brand i {
        font-size: 1.8rem;
        background: linear-gradient(45deg, #C0A466, #D4B876);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

.navbar-toggler {
    border: 2px solid rgba(192, 164, 102, 0.2);
    border-radius: 8px;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

    .navbar-toggler:hover {
        background-color: rgba(192, 164, 102, 0.1);
        border-color: rgba(192, 164, 102, 0.3);
    }

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28192, 164, 102, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Navigation Links */
.navbar-nav .nav-link {
    color: rgba(192, 164, 102, 0.9) !important;
    font-weight: 500;
    padding: 0.75rem 1.25rem !important;
    border-radius: 8px;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .navbar-nav .nav-link:hover {
        color: #C0A466 !important;
        background-color: rgba(192, 164, 102, 0.15);
        transform: translateY(-2px);
    }

    .navbar-nav .nav-link.active {
        background-color: rgba(192, 164, 102, 0.2);
        color: #C0A466 !important;
    }

    .navbar-nav .nav-link::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background: linear-gradient(90deg, #C0A466, #D4B876);
        transition: all 0.3s ease;
        transform: translateX(-50%);
    }

    .navbar-nav .nav-link:hover::before,
    .navbar-nav .nav-link.active::before {
        width: 80%;
    }

/* User Dropdown Styles */
.user-dropdown {
    margin-left: auto;
}

    .user-dropdown .dropdown-toggle {
        background: rgba(192, 164, 102, 0.1);
        border: 2px solid rgba(192, 164, 102, 0.2);
        color: #C0A466;
        border-radius: 25px;
        padding: 0.5rem 1rem;
        font-weight: 500;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

        .user-dropdown .dropdown-toggle:hover,
        .user-dropdown .dropdown-toggle:focus {
            background: rgba(192, 164, 102, 0.2);
            border-color: rgba(192, 164, 102, 0.3);
            color: #C0A466;
            box-shadow: 0 4px 15px rgba(192, 164, 102, 0.1);
            transform: translateY(-1px);
        }

        .user-dropdown .dropdown-toggle::after {
            margin-left: 0.5rem;
        }

    .user-dropdown .dropdown-menu {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border: none;
        border-radius: 12px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        margin-top: 0.5rem;
        min-width: 160px;
    }

    .user-dropdown .dropdown-item {
        color: #374151;
        font-weight: 500;
        padding: 0.75rem 1.25rem;
        border-radius: 8px;
        margin: 0.25rem;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

        .user-dropdown .dropdown-item:hover {
            background: black;
            color: #C0A466;
            transform: translateX(4px);
        }

        .user-dropdown .dropdown-item i {
            font-size: 1rem;
            width: 16px;
            text-align: center;
        }

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(45deg, #C0A466, #D4B876);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .user-dropdown {
        margin-left: 0;
        margin-top: 1rem;
    }
}

/* Main Content */
.main-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
    padding: 2rem;
    min-height: calc(100vh - 300px);
}

/* Footer */
.modern-footer {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #cbd5e1;
    border-top: none;
    padding: 2rem 0;
    margin-top: 3rem;
    position: absolute;
    bottom: 0;
    width: 100%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    margin-left: 1rem;
    transition: color 0.3s ease;
}

    .footer-links a:hover {
        color: #e2e8f0;
    }

.company-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-container {
    animation: fadeInUp 0.6s ease-out;
}

/* Mobile Optimizations */
@media (max-width: 767px) {
    .modern-navbar {
        padding: 0.75rem 0;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .main-container {
        margin-top: 1rem;
        padding: 1.5rem;
        border-radius: 12px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .footer-links a {
        margin: 0 0.5rem;
    }
}

/* Loading Animation for Nav Items */
.navbar-nav .nav-item {
    animation: fadeInUp 0.4s ease-out forwards;
}

    .navbar-nav .nav-item:nth-child(1) {
        animation-delay: 0.1s;
    }

    .navbar-nav .nav-item:nth-child(2) {
        animation-delay: 0.2s;
    }

    .navbar-nav .nav-item:nth-child(3) {
        animation-delay: 0.3s;
    }

.product-form-container {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.product-type-section {
    background-color: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.product-type-header {
    background: #ddd;
    color: #333;
    padding: 1rem;
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    border-radius: 6px 6px 0 0;
    font-weight: 600;
    text-align: center;
    font-size: 1.1rem;
}

.product-details-section {
    background-color: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    margin-left: 1rem;
}

.product-details-header {
    background: #ddd;
    color: #333;
    padding: 1rem;
    margin: -2rem -2rem 2rem -2rem;
    border-radius: 6px 6px 0 0;
    font-weight: 600;
    text-align: center;
    font-size: 1.1rem;
}

.form-check {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f4;
}

    .form-check:last-child {
        border-bottom: none;
    }

.form-check-input {
    margin-top: 0.125rem;
    transform: scale(1.2);
}

.form-check-label {
    font-weight: 500;
    color: #495057;
    margin-left: 0.5rem;
    cursor: pointer;
}

.form-check-input:checked + .form-check-label {
    color: #007bff;
    font-weight: 600;
}

.form-row {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 0.75rem;
    transition: all 0.3s ease;
    background-color: white;
}

    .form-control:focus {
        border-color: #007bff;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
        background-color: white;
    }

.col-form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
}

    .btn-primary:hover {
        background: linear-gradient(135deg, #0056b3, #004085);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
    }

.product-details-container {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

    .product-details-container.active {
        display: block;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.submit-section {
    border-top: 2px solid #e9ecef;
    padding-top: 2rem;
    margin-top: 2rem;
    text-align: right;
}

.container-fluid {
    max-width: 1400px;
}

.row {
    margin-bottom: 1rem;
}

input[type="file"] {
    padding: 0.5rem;
}

input[type="date"] {
    padding: 0.75rem;
}

@media (max-width: 768px) {
    .product-form-container {
        padding: 1rem;
    }

    .product-details-section {
        margin-left: 0;
        margin-top: 1rem;
    }

    .col-auto {
        margin-bottom: 1rem;
    }
}