/* Inventory Management Styles */

.inventory-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

.inventory-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.inventory-hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
}

.hero-actions {
    margin-bottom: 3rem;
}

.hero-actions .btn {
    margin: 0 10px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

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

.inventory-dashboard {
    padding: 5rem 0;
    background: linear-gradient(180deg, rgba(var(--theme-inventory-rgb), 0.03) 0%, rgba(255, 255, 255, 1) 100%);
    position: relative;
}

.inventory-dashboard::before {
    content: "🧾";
    position: absolute;
    font-size: 20rem;
    opacity: 0.03;
    top: 5%;
    left: 5%;
    z-index: 0;
    transform: rotate(-5deg);
}

.dashboard-filters {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3.5rem;
    align-items: center;
    flex-wrap: wrap;
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(var(--theme-inventory-rgb), 0.1);
    position: relative;
    z-index: 1;
    border-top: 5px solid var(--theme-inventory);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--theme-inventory);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group:first-child label::before {
    content: "🗂️";
    font-size: 1rem;
}

.filter-group:nth-child(2) label::before {
    content: "📊";
    font-size: 1rem;
}

.filter-group select {
    padding: 0.8rem 1rem;
    border: 2px solid rgba(var(--theme-inventory-rgb), 0.2);
    border-radius: 10px;
    font-size: 0.95rem;
    background: white;
    min-width: 180px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ff5722'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 36px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--theme-inventory);
    box-shadow: 0 0 0 3px rgba(var(--theme-inventory-rgb), 0.2);
    transform: translateY(-2px);
}

.search-box {
    position: relative;
    margin-left: auto;
    flex-grow: 1;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--theme-inventory);
    font-size: 1rem;
}

.search-box input {
    padding: 0.9rem 1rem 0.9rem 3.2rem;
    border: 2px solid rgba(var(--theme-inventory-rgb), 0.2);
    border-radius: 30px;
    font-size: 0.95rem;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(var(--theme-inventory-rgb), 0.08);
}

.search-box input:focus {
    outline: none;
    border-color: var(--theme-inventory);
    box-shadow: 0 0 0 4px rgba(var(--theme-inventory-rgb), 0.15);
    transform: translateY(-2px);
}

.search-box::after {
    content: "Press Enter to search";
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-box:focus-within::after {
    opacity: 1;
}

.category-section {
    margin-bottom: 5rem;
    position: relative;
    z-index: 1;
}

.category-section h2 {
    font-size: 1.7rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(var(--theme-inventory-rgb), 0.1), rgba(var(--theme-inventory-rgb), 0.05));
    border-left: 5px solid var(--theme-inventory);
    display: inline-block;
    box-shadow: 0 5px 15px rgba(var(--theme-inventory-rgb), 0.08);
}

.category-section h2 i {
    margin-right: 0.8rem;
    color: var(--theme-inventory);
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    padding: 0.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.inventory-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.inventory-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(var(--theme-inventory-rgb), 0.08);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    border: 0;
}

.inventory-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 8px;
    background: var(--success-color);
}

.inventory-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(var(--theme-inventory-rgb), 0.15);
}

.inventory-card.in-stock::before {
    background: linear-gradient(to bottom, var(--success-color), var(--success-color));
}

.inventory-card.low-stock::before {
    background: linear-gradient(to bottom, var(--warning-color), var(--warning-color));
}

.inventory-card.out-of-stock::before {
    background: linear-gradient(to bottom, var(--error-color), var(--error-color));
}

.inventory-card.expired::before {
    background: linear-gradient(to bottom, #8b5cf6, #7c3aed);
}

.card-header {
    padding: 1.8rem 1.8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    background: linear-gradient(to right, rgba(var(--theme-inventory-rgb), 0.03), rgba(var(--theme-inventory-rgb), 0));
    border-bottom: 1px dashed rgba(var(--theme-inventory-rgb), 0.1);
}

.card-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    flex: 1;
    position: relative;
    padding-left: 32px;
}

.card-header h3::before {
    content: "📦";
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

.inventory-card:nth-child(2) .card-header h3::before {
    content: "🌱";
}

.inventory-card:nth-child(3) .card-header h3::before {
    content: "🌽";
}

.status-badge {
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.status-badge::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    z-index: 1;
}

.status-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.status-badge.in-stock {
    background: var(--success-color);
    color: white;
}

.status-badge.in-stock::before {
    content: "✓";
    margin-right: 2px;
}

.status-badge.low-stock {
    background: var(--warning-color);
    color: white;
}

.status-badge.low-stock::before {
    content: "⚠";
    margin-right: 2px;
}

.status-badge.out-of-stock {
    background: var(--error-color);
    color: white;
}

.status-badge.out-of-stock::before {
    content: "✗";
    margin-right: 2px;
}

.status-badge.expired {
    background: #8b5cf6;
    color: white;
}

.status-badge.expired::before {
    content: "⌛";
    margin-right: 2px;
}

.card-content {
    padding: 1.5rem 1.8rem 1.8rem;
}

.quantity-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(var(--theme-inventory-rgb), 0.05), rgba(var(--theme-inventory-rgb), 0.02));
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(var(--theme-inventory-rgb), 0.1);
}

.quantity-info::after {
    content: "";
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--theme-inventory-rgb), 0.1) 0%, rgba(var(--theme-inventory-rgb), 0) 70%);
    top: -50px;
    right: -50px;
}

.inventory-card.in-stock .quantity-info {
    background: linear-gradient(135deg, rgba(var(--success-color-rgb), 0.05), rgba(var(--success-color-rgb), 0.02));
    border-color: rgba(var(--success-color-rgb), 0.2);
}

.inventory-card.low-stock .quantity-info {
    background: linear-gradient(135deg, rgba(var(--warning-color-rgb), 0.05), rgba(var(--warning-color-rgb), 0.02));
    border-color: rgba(var(--warning-color-rgb), 0.2);
}

.inventory-card.out-of-stock .quantity-info {
    background: linear-gradient(135deg, rgba(var(--error-color-rgb), 0.05), rgba(var(--error-color-rgb), 0.02));
    border-color: rgba(var(--error-color-rgb), 0.2);
}

.quantity-info .current {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
}

.inventory-card.in-stock .quantity-info .current {
    color: var(--success-color);
}

.inventory-card.low-stock .quantity-info .current {
    color: var(--warning-color);
}

.inventory-card.out-of-stock .quantity-info .current {
    color: var(--error-color);
}

.quantity-info .current::before {
    content: "📊";
    font-size: 1.3rem;
    margin-right: 8px;
}

.quantity-info .minimum,
.quantity-info .condition {
    font-size: 0.9rem;
    color: var(--text-light);
    background: rgba(255,255,255,0.8);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.item-details {
    margin-bottom: 1.8rem;
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(var(--theme-inventory-rgb), 0.08);
    padding: 1rem 1.2rem;
}

.item-details p {
    margin: 0.8rem 0;
    font-size: 0.95rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
}

.item-details p:not(:last-child) {
    border-bottom: 1px dashed rgba(var(--theme-inventory-rgb), 0.08);
    padding-bottom: 0.8rem;
}

.item-details strong {
    color: var(--text-dark);
    width: 110px;
    display: inline-block;
    position: relative;
}

.item-details strong::after {
    content: ":";
    position: absolute;
    right: 5px;
}

.card-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.btn-small {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(var(--theme-inventory-rgb), 0.1);
}

.btn-small::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: -100%;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.2), rgba(255,255,255,0));
    transition: all 0.6s ease;
}

.btn-small:hover::after {
    left: 100%;
}

.btn-small.btn-primary {
    background: var(--theme-inventory);
    color: white;
}

.btn-small.btn-primary:hover {
    background: #ff4500;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(var(--theme-inventory-rgb), 0.2);
}

.btn-small.btn-primary::before {
    content: "↻";
    font-size: 1rem;
}

.inventory-card.low-stock .btn-small.btn-primary::before {
    content: "⟲";
    font-size: 1rem;
}

.btn-small.btn-secondary {
    background: white;
    color: var(--text-dark);
    border: 1px solid rgba(var(--theme-inventory-rgb), 0.2);
}

.btn-small.btn-secondary:hover {
    background: #f9f9f9;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.05);
    border-color: var(--theme-inventory);
}

.btn-small.btn-secondary::before {
    content: "🛠️";
    font-size: 0.9rem;
}

.quick-actions {
    padding: 4rem 0;
    background: white;
}

.quick-actions h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: #374151;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.action-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #10b981;
}

.action-card i {
    font-size: 3rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.action-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #374151;
}

.action-card p {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #374151;
}

.close {
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.3s ease;
}

.close:hover {
    color: #374151;
}

.add-item-form {
    padding: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #10b981;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .inventory-hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        margin-left: 0;
    }
    
    .search-box input {
        min-width: auto;
        width: 100%;
    }
    
    .inventory-cards {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
}
