/* Bring&Buy Webapp Styles */

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --success-color: #16a34a;
    --success-hover: #15803d;
    --danger-color: #dc2626;
    --danger-hover: #b91c1c;
    --secondary-color: #6b7280;
    --background: #f3f4f6;
    --card-background: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Pages */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
}

.login-box {
    background: var(--card-background);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 48px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-secondary);
    font-size: 24px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
}

/* Navbar */
.navbar {
    background: var(--card-background);
    padding: 15px 30px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.navbar h1 {
    font-size: 24px;
    color: var(--primary-color);
}

.navbar h2 {
    font-size: 20px;
    flex: 1;
    text-align: center;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-name {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

input[type="text"],
input[type="password"],
input[type="number"],
select,
.search-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: var(--success-hover);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-hover);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-back {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-back:hover {
    background: var(--primary-color);
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.dashboard-card {
    background: var(--card-background);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.dashboard-card h3 {
    margin-bottom: 12px;
    color: var(--text-primary);
}

.dashboard-card p {
    color: var(--text-secondary);
}

/* Search Section */
.search-section {
    background: var(--card-background);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.search-box {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

/* Seller Info */
.seller-info {
    background: #f0fdf4;
    border: 2px solid var(--success-color);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.seller-info h4 {
    margin-bottom: 12px;
    color: var(--success-color);
}

.seller-info p {
    margin: 8px 0;
}

/* Articles Section */
.articles-section {
    background: var(--card-background);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.articles-list {
    margin: 20px 0;
}

.article-item {
    background: var(--background);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.article-item.selected {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.article-item.accepted {
    background: #f0fdf4;
}

.article-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.article-info {
    flex: 1;
}

.article-info h4 {
    margin-bottom: 4px;
    color: var(--text-primary);
}

.article-info p {
    color: var(--text-secondary);
    font-size: 14px;
}

.article-price {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

.article-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-accepted {
    background: #d1fae5;
    color: #065f46;
}

.status-not-accepted {
    background: #fee2e2;
    color: #991b1b;
}

.status-sold {
    background: #e0e7ff;
    color: #3730a3;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.action-buttons .btn {
    flex: 1;
}

/* Cart Section */
.cart-section {
    background: var(--card-background);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.cart-items {
    margin: 20px 0;
    min-height: 200px;
}

.cart-item {
    background: var(--background);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item-info h4 {
    margin-bottom: 4px;
}

.cart-item-info p {
    color: var(--text-secondary);
    font-size: 14px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-item-price {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.remove-btn {
    background: transparent;
    border: none;
    color: var(--danger-color);
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
}

.remove-btn:hover {
    background: #fee2e2;
    border-radius: 4px;
}

.cart-summary {
    border-top: 2px solid var(--border-color);
    padding-top: 20px;
    margin-top: 20px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 24px;
}

.total-amount {
    color: var(--primary-color);
    font-weight: 700;
}

.payment-method {
    margin-bottom: 20px;
}

.payment-method label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.cart-summary .btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 12px;
}

/* Error Messages */
.error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: 6px;
    margin: 12px 0;
    display: none;
}

.error-message.show {
    display: block;
}

.success-message {
    background: #d1fae5;
    color: #065f46;
    padding: 12px;
    border-radius: 6px;
    margin: 12px 0;
    display: none;
}

.success-message.show {
    display: block;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }

    .navbar h2 {
        text-align: left;
    }

    .search-box {
        flex-direction: column;
    }

    .action-buttons {
        flex-direction: column;
    }

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

    .article-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .search-section {
        display: none;
    }
}


