/* Bill Content */
.bill-content, .dashboard-content {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 
        0 24px 48px rgba(0, 0, 0, 0.08),
        0 8px 24px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
}

.bill-content::before, .dashboard-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
}

.receipt-info {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.receipt-image img {
    max-width: 300px;
    max-height: 400px;
    border-radius: 8px;
    border: 2px solid #e1e8ed;
}

.receipt-details h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.receipt-details p {
    color: #7f8c8d;
    margin-bottom: 5px;
}

/* Items */
.items-list, .items-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.item-card {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    padding: 24px 28px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    display: grid;
    grid-template-columns: 1fr 200px 120px;
    align-items: start;
    gap: 24px;
    min-height: 88px;
    position: relative;
    overflow: hidden;
}

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.item-card:hover {
    border-color: rgba(0, 122, 255, 0.4);
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px) scale(1.01);
    box-shadow: 
        0 16px 40px rgba(0, 122, 255, 0.12),
        0 4px 16px rgba(0, 122, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.item-card.selected {
    border-color: rgba(52, 199, 89, 0.6);
    background: rgba(52, 199, 89, 0.15);
    backdrop-filter: blur(30px) saturate(200%);
    box-shadow: 
        0 16px 40px rgba(52, 199, 89, 0.2),
        0 4px 16px rgba(52, 199, 89, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.item-card.paid {
    background: #f8d7da;
    border-color: #e74c3c;
    cursor: not-allowed;
    opacity: 0.7;
}

.item-card.editable {
    cursor: default;
}

.item-card.editable:hover {
    border-color: #e67e22;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    width: 100%;
}

.item-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}

.item-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 4px;
    word-wrap: break-word;
    line-height: 1.3;
}

.item-description {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
    max-width: 25%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.item-paid-by {
    font-size: 0.8rem;
    color: #667eea;
    font-style: italic;
    margin-top: 4px;
    text-align: right;
    width: 100%;
}

.item-price-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    text-align: right;
}

.item-price-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}

.item-price {
    font-weight: 700;
    font-size: 1.3rem;
    color: #667eea;
    position: relative;
}

.item-price.editable {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px dashed #f39c12;
    border-radius: 8px;
    padding: 4px 8px;
    cursor: text;
    transition: all 0.3s ease;
}

.item-price.editable:hover {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border-color: #e67e22;
    transform: scale(1.05);
}

.item-quantity {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.item-quantity.editable {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px dashed #f39c12;
    border-radius: 6px;
    padding: 2px 6px;
    cursor: text;
    transition: all 0.3s ease;
}

.item-quantity.editable:hover {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border-color: #e67e22;
    transform: scale(1.05);
}

.item-status-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.item-status {
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 500;
    text-align: center;
    min-width: 100px;
    white-space: nowrap;
}

.item-status.available {
    background: linear-gradient(135deg, #d5f4e6 0%, #a8e6cf 100%);
    color: #27ae60;
}

.item-status.paid {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #e74c3c;
}

.item-status.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Editable indicators */
.editable-indicator {
    position: relative;
}

.editable-indicator::after {
    content: "✏️";
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.7rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.editable-indicator:hover::after {
    opacity: 1;
}

/* Item layout improvements */
.item-info .item-name {
    margin-bottom: 6px;
}

.item-info .item-description {
    margin-bottom: 8px;
}

.item-price-section .item-price {
    margin-bottom: 4px;
}

.item-price-section .item-quantity::before {
    content: "Qty: ";
    font-weight: 600;
    color: #2c3e50;
}

/* Better spacing for paid by text */
.item-card .item-paid-by {
    grid-column: 1 / -1;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
    font-size: 0.8rem;
    color: #667eea;
    font-style: italic;
    text-align: right;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .item-card {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: left;
    }
    
    .item-price-section {
        align-items: flex-start;
        text-align: left;
    }
    
    .item-status-section {
        align-items: flex-start;
    }
    
    .item-description {
        max-width: 100%;
    }
}

.item-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.item-actions button {
    padding: 4px 8px;
    font-size: 12px;
}

/* Extra stuff */
.split-status {
    color: #28a745;
    font-weight: 500;
    margin-top: 5px;
}

.paid-by {
    color: #6c757d;
    font-size: 0.9em;
    margin-top: 3px;
}

.remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.remove-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Item actions */
.item-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    animation: slideDown 0.2s ease-out;
}

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

/* Quantity selection styles */
.quantity-options {
    margin: 15px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.quantity-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.quantity-btn {
    padding: 8px 12px;
    border: 2px solid #007bff;
    background-color: white;
    color: #007bff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background-color: #007bff;
    color: white;
}

.quantity-btn:active {
    transform: scale(0.98);
}

.select-btn, .split-btn {
    flex: 1;
    padding: 8px 16px;
    border: 2px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.select-btn:hover, .split-btn:hover {
    background: #007bff;
    color: white;
}

.select-btn.active, .split-btn.active {
    background: #007bff;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-primary {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-full {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.btn-full:hover {
    background: #218838;
}

