/* Modern Conflict - Modern UI Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    font-family: 'Inter', sans-serif;
}

body {
    background-image: url('/images/bg.jpg');
    background-color: #272823;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
    pointer-events: none;
}

/* Liquid Glass Effect */
.glass-card {
    background: rgba(39, 40, 35, 0.35);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

.nav-item {
    position: relative;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    height: 60%;
    width: 2px;
    background: rgba(168, 152, 99, 0.6);
    transition: transform 0.2s ease;
    border-radius: 2px;
}

.nav-item:hover::before {
    transform: translateY(-50%) scaleY(1);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.stat-card {
    background: rgba(39, 40, 35, 0.4);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

.badge-notification {
    background: rgba(220, 38, 38, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.section-header {
    background: rgba(255, 255, 255, 0.03);
    border-left: 2px solid rgba(168, 152, 99, 0.5);
}

.content-card {
    background: rgba(39, 40, 35, 0.3);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(168, 152, 99, 0.3);
    border-radius: 5px;
    border: 2px solid rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 152, 99, 0.5);
}

/* Ensure content is above overlay but below mobile menu */
nav, .container-wrapper, footer {
    position: relative;
    z-index: 1;
}

/* Force mobile menu to be on top of EVERYTHING */
aside {
    position: relative;
    z-index: 1;
}

@media (max-width: 1023px) {
    aside {
        z-index: 999999 !important;
    }
}

/* Smokey glass for top nav */
nav.glass-card {
    background: rgba(20, 21, 19, 0.4);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 50;
}

/* Slim sticky bar */
.slim-sticky-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(15, 16, 14, 0.95);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.slim-sticky-bar.visible {
    transform: translateY(0);
}

.slim-stat {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    background: rgba(255, 255, 255, 0.03);
}

.slim-stat-value {
    font-weight: 600;
    font-size: 0.875rem;
}

.alert-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    animation: pulse-alert 2s ease-in-out infinite;
}

@keyframes pulse-alert {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Dropdown menu */
.dropdown {
    position: relative;
    z-index: 9999;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    min-width: 200px;
    background: rgba(20, 21, 19, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 9999;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 0.625rem 1rem;
    color: rgba(212, 207, 179, 0.9);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.15s ease;
    font-size: 0.875rem;
}

.dropdown-item:first-child {
    border-radius: 0.5rem 0.5rem 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 0.5rem 0.5rem;
}

.dropdown-item:hover {
    background: rgba(168, 152, 99, 0.15);
    color: rgba(232, 230, 216, 1);
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.25rem 0;
}

/* Progress bars */
.progress-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(168, 152, 99, 0.8), rgba(168, 152, 99, 1));
    border-radius: 3px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(168, 152, 99, 0.3);
}

.progress-fill.low {
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.8), rgba(220, 38, 38, 1));
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
}

.progress-fill.medium {
    background: linear-gradient(90deg, rgba(234, 179, 8, 0.8), rgba(234, 179, 8, 1));
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.3);
}

/* Secondary info bar */
.secondary-info-bar {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-group + .sidebar-group {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Modern Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid transparent;
}

.btn-primary {
    background: rgba(168, 152, 99, 0.9);
    color: #1a1f16;
    border-color: rgba(168, 152, 99, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    background: rgba(168, 152, 99, 1);
    box-shadow: 0 4px 12px rgba(168, 152, 99, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(69, 67, 56, 0.9);
    color: #d4cfb3;
    border: 1px solid rgba(168, 152, 99, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
    background: rgba(85, 77, 53, 0.9);
    border-color: rgba(168, 152, 99, 0.5);
    transform: translateY(-1px);
}

.btn-success {
    background: #6b9255 !important;
    color: #ffffff !important;
    border: 2px solid #7aa364 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    font-weight: 600;
}

.btn-success:hover {
    background: #7aa364 !important;
    box-shadow: 0 6px 20px rgba(107, 146, 85, 0.6);
    transform: translateY(-2px);
}

.btn-danger {
    background: #a0522d !important;
    color: #ffffff !important;
    border: 2px solid #b86438 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    font-weight: 600;
}

.btn-danger:hover {
    background: #b86438 !important;
    box-shadow: 0 6px 20px rgba(160, 82, 45, 0.6);
    transform: translateY(-2px);
}

.btn-tab {
    padding: 0.75rem 2rem;
    background: rgba(69, 67, 56, 0.9) !important;
    color: #bdb386 !important;
    border: 1px solid rgba(168, 152, 99, 0.3) !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0.5rem 0.5rem 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-tab:hover {
    background: rgba(85, 77, 53, 0.9) !important;
    color: #d4cfb3 !important;
    border-color: rgba(168, 152, 99, 0.5) !important;
}

.btn-tab.active {
    background: rgba(168, 152, 99, 0.4) !important;
    color: #e8e6d8 !important;
    border-color: rgba(168, 152, 99, 0.6) !important;
    border-bottom-color: rgba(168, 152, 99, 1) !important;
    box-shadow: 0 4px 12px rgba(168, 152, 99, 0.3);
}

/* Form Inputs */
.input-modern {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e8e6d8;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.input-modern:focus {
    outline: none;
    border-color: rgba(168, 152, 99, 0.5);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(168, 152, 99, 0.1);
}

.input-modern::placeholder {
    color: rgba(189, 179, 134, 0.5);
}

/* Checkboxes */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1rem;
    height: 1rem;
    border: 1px solid rgba(168, 152, 99, 0.4);
    border-radius: 0.25rem;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked {
    background: rgba(168, 152, 99, 0.8);
    border-color: rgba(168, 152, 99, 1);
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid #1a1f16;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:hover {
    border-color: rgba(168, 152, 99, 0.6);
}

/* Item Cards */
.item-card {
    background: rgba(39, 40, 35, 0.4);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.item-card:hover {
    border-color: rgba(168, 152, 99, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.item-card.locked {
    opacity: 0.6;
    border-color: rgba(255, 255, 255, 0.05);
}

.item-card.locked:hover {
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

/* Toast Notification Overlay */
.toast-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    pointer-events: none;
}

.toast-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.toast-overlay.show {
    opacity: 1;
}

.toast {
    background: rgba(20, 21, 19, 0.95);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    min-width: 400px;
    max-width: 600px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: all;
}

.toast.show {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.toast.error {
    border-color: rgba(160, 82, 45, 0.5);
    background: rgba(25, 20, 18, 0.95);
}

.toast.success {
    border-color: rgba(107, 146, 85, 0.5);
    background: rgba(20, 25, 19, 0.95);
}

.toast.info {
    border-color: rgba(168, 152, 99, 0.5);
    background: rgba(25, 24, 20, 0.95);
}

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

.toast-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast.error .toast-icon {
    background: rgba(160, 82, 45, 0.2);
    color: #f8b4ab;
}

.toast.success .toast-icon {
    background: rgba(107, 146, 85, 0.2);
    color: #bbf7d0;
}

.toast.info .toast-icon {
    background: rgba(168, 152, 99, 0.2);
    color: #e8e6d8;
}

.toast-title {
    font-weight: 700;
    font-size: 1rem;
    color: #e8e6d8;
}

.toast-message {
    color: #bdb386;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-left: 3.25rem;
}

.toast.error .toast-message {
    color: #f8b4ab;
}

.toast.success .toast-message {
    color: #bbf7d0;
}

.toast.info .toast-message {
    color: #d4cfb3;
}

.toast-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(189, 179, 134, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #d4cfb3;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.85) !important;
    z-index: 999997 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.mobile-menu-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
}

/* Mobile Sidebar Slide-out */
@media (max-width: 1023px) {
    aside {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        z-index: 999999 !important;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        overflow-x: hidden;
        padding-top: 0;
        margin: 0;
        pointer-events: all !important;
        -webkit-overflow-scrolling: touch;
    }

    aside.mobile-open {
        transform: translateX(0) !important;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.8) !important;
        pointer-events: all !important;
    }

    aside .glass-card {
        border-radius: 0 !important;
        height: auto !important;
        min-height: 100vh !important;
        background: #2d2e28 !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: none !important;
        box-shadow: none !important;
        pointer-events: all !important;
        padding: 1rem !important;
    }

    /* Override any glass effects on mobile sidebar */
    aside *, aside a, aside button, aside nav {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        pointer-events: all !important;
        cursor: pointer !important;
    }

    /* Ensure sidebar content is visible and clickable */
    aside .nav-item {
        pointer-events: all !important;
        cursor: pointer !important;
        display: flex !important;
    }

    aside h3, aside .sidebar-group {
        pointer-events: all !important;
    }

    /* Force links to be clickable */
    aside a {
        position: relative;
        z-index: 1;
    }
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.05);
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: #bdb386;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 1023px) {
    .hamburger {
        display: flex;
    }
}

/* Utility Classes */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hide-mobile {
    display: block;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }
}

.show-mobile {
    display: none;
}

@media (max-width: 768px) {
    .show-mobile {
        display: block;
    }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Ensure header stays below menu */
    nav.glass-card {
        position: sticky;
        top: 0;
        z-index: 50;
    }

    /* Ensure content stays below menu */
    main, .content-card, .container-wrapper {
        position: relative;
        z-index: 1;
    }

    /* Make stat cards stack */
    .slim-sticky-bar .flex {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Full width buttons on mobile */
    .btn {
        width: 100%;
        justify-content: center;
    }

    .btn-tab {
        flex: 1;
        min-width: 0;
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    /* Smaller text on mobile */
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    /* Make tables scrollable */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Stack grid columns on mobile */
    .grid {
        grid-template-columns: 1fr !important;
    }

    /* Adjust padding on mobile */
    .content-card {
        padding: 1rem;
    }

    /* Smaller progress bars */
    .progress-bar {
        height: 4px;
    }

    /* Adjust toast for mobile */
    .toast {
        min-width: 90vw;
        max-width: 90vw;
        margin: 0 1rem;
    }

    /* Make item cards stack better */
    .item-card {
        padding: 1rem;
    }

    .item-card .flex {
        flex-direction: column;
        text-align: center;
    }

    .item-card .flex-shrink-0 {
        margin: 0 auto;
    }

    /* Hide extra icons on mobile for cleaner look */
    .lg\:flex:not(.flex) svg:first-child {
        display: none;
    }

    /* Mobile navigation adjustments */
    .container-wrapper {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* Reduce gaps on mobile */
    .gap-4 {
        gap: 0.75rem;
    }

    .gap-6 {
        gap: 1rem;
    }

    /* Smaller stat values on mobile */
    .text-2xl {
        font-size: 1.25rem;
    }

    .text-3xl {
        font-size: 1.5rem;
    }

    /* Make dropdown menus full width on mobile */
    .dropdown-menu {
        left: 0;
        right: 0;
        min-width: 100%;
    }

    /* Stack action buttons vertically */
    .flex.items-center.gap-2 {
        flex-wrap: wrap;
    }
}

/* Tablet Responsive (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    /* 2 column grids instead of 3 or 4 */
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Reduce sidebar width slightly */
    aside {
        width: 200px;
    }

    /* Smaller padding on tablets */
    .content-card {
        padding: 1.5rem;
    }
}

/* Large screens */
@media (min-width: 1280px) {
    /* Wider max-width for larger screens */
    .max-w-7xl {
        max-width: 1400px;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    /* Increase touch targets */
    .btn {
        padding: 0.875rem 1.75rem;
        min-height: 44px;
    }

    .nav-item {
        padding: 0.75rem 1rem;
        min-height: 44px;
    }

    /* Remove hover states on touch devices */
    .nav-item:hover::before {
        transform: none;
    }

    /* Make dropdowns click-only */
    .dropdown:hover .dropdown-menu {
        opacity: 0;
        visibility: hidden;
    }

    .dropdown.active .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* Print styles */
@media print {
    /* Hide navigation elements when printing */
    nav, aside, footer, .slim-sticky-bar, .toast-overlay, .toast-container {
        display: none !important;
    }

    /* Full width content when printing */
    main {
        width: 100%;
    }

    /* Remove glass effects for printing */
    .glass-card, .content-card, .item-card {
        background: white;
        color: black;
        border: 1px solid #ccc;
    }
}

