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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    padding: 30px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.header h1 {
    color: #333;
    font-size: 28px;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-secondary {
    background: #48bb78;
    color: white;
}

.btn-danger {
    background: #f56565;
    color: white;
}

.btn-success {
    background: #38a169;
    color: white;
}

.btn-warning {
    background: #ed8936;
    color: white;
}

/* Form */
.add-product-form, .filter-section {
    background: #f7fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.add-product-form h2, .filter-section h2, .product-list h2 {
    margin-bottom: 15px;
    color: #4a5568;
    font-size: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

input, select {
    padding: 10px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

input:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.product-card h3 {
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 18px;
}

.product-card .price {
    font-size: 24px;
    color: #667eea;
    font-weight: bold;
    margin: 10px 0;
}

.product-card .info {
    color: #718096;
    font-size: 14px;
    margin: 5px 0;
}

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

.product-actions button {
    flex: 1;
    padding: 8px;
    font-size: 12px;
}

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

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    position: relative;
    animation: slideDown 0.3s;
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    cursor: pointer;
    color: #a0aec0;
}

.close:hover {
    color: #f56565;
}

.modal-content input, .modal-content select {
    width: 100%;
    margin-bottom: 15px;
}

.link-btn {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    margin-top: 10px;
    text-decoration: underline;
    font-size: 14px;
}

.link-btn:hover {
    color: #764ba2;
}

/* Messages */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    animation: slideIn 0.3s;
    z-index: 1001;
}

.message.success {
    background: #48bb78;
}

.message.error {
    background: #f56565;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideIn {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .filter-controls {
        flex-direction: column;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}