/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* Навигация */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 15px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.navbar h1 {
    font-size: 1.5rem;
    margin: 0;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-links a:hover {
    background-color: rgba(255,255,255,0.1);
}

.nav-links span {
    color: #ecf0f1;
    font-weight: 500;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-primary {
    background-color: #27ae60;
}

.btn-primary:hover {
    background-color: #229954;
}

.btn-secondary {
    background-color: #95a5a6;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.9rem;
}

/* Карточки */
.card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* Формы */
.auth-form {
    max-width: 400px;
    margin: 50px auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.filter-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-form .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 200px;
}

/* Сообщения */
.error {
    background-color: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    border-left: 4px solid #c33;
}

.success {
    background-color: #efe;
    color: #3c3;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    border-left: 4px solid #3c3;
}

/* Таблицы */
.table-container {
    background: white;
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background-color: #34495e;
    color: white;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table tbody tr:hover {
    background-color: #f9f9f9;
}

table code {
    background-color: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Бейджи */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* Статистика */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 10px;
}

.stat-card p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Бонусы */
.bonus-display {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
    margin: 20px 0;
}

.bonus-amount {
    font-size: 4rem;
    font-weight: bold;
    display: block;
}

.bonus-label {
    font-size: 1.5rem;
    opacity: 0.9;
}

.points-positive {
    color: #27ae60;
    font-weight: bold;
}

/* QR коды */
.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.qr-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    page-break-inside: avoid;
}

.qr-code {
    margin: 0 auto 15px;
    display: flex;
    justify-content: center;
}

.qr-text {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    word-break: break-all;
    margin: 10px 0;
    color: #555;
}

.product-name {
    font-weight: bold;
    margin: 10px 0;
    color: #2c3e50;
}

.bonus-points {
    color: #27ae60;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Главная страница */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

.hero p {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.feature-card p {
    color: #7f8c8d;
    line-height: 1.8;
}

/* QR сканер */
#qr-reader {
    border: 2px solid #3498db;
    border-radius: 8px;
    overflow: hidden;
}

#qr-reader-results {
    margin-top: 20px;
}

#result-message {
    margin-top: 20px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .qr-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .filter-form {
        flex-direction: column;
    }
    
    .filter-form .form-group {
        width: 100%;
    }
}

@media print {
    .navbar,
    .btn,
    .filter-form {
        display: none;
    }
    
    .qr-item {
        page-break-inside: avoid;
    }
}

