* {
    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;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    padding: 20px;
}

.auth-form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
    font-weight: 300;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

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

button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.auth-link a:hover {
    text-decoration: underline;
}

.welcome-page {
    background: white;
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.welcome-page h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: 36px;
    font-weight: 300;
}

.welcome-page p {
    color: #666;
    margin-bottom: 30px;
    font-size: 18px;
}

.user-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: left;
}

.user-info .logout-btn,
.user-info .settings-btn {
    display: inline-block;
    width: auto;
    margin-top: 15px;
}

.user-info p {
    margin-bottom: 10px;
    font-size: 16px;
}

.user-info span {
    font-weight: 600;
    color: #333;
}

.logout-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    max-width: 200px;
}

.logout-btn:hover {
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.settings-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    max-width: 200px;
    margin-left: 10px;
}

.settings-btn:hover {
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.profile-settings {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin: 30px 0;
    text-align: left;
    transition: all 0.3s ease;
}

.profile-settings h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 300;
    text-align: center;
}

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

.profile-settings .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.profile-settings .form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

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

.profile-settings .form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.profile-settings button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 12px 30px;
    margin-top: 10px;
}

.profile-settings button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.profile-settings button:active {
    transform: translateY(0);
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    border-left: 4px solid #c62828;
}

.success-message {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    border-left: 4px solid #2e7d32;
}

.check-scanner {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin: 30px 0;
    text-align: left;
}

.check-scanner h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 300;
    text-align: center;
}

.check-scanner p {
    color: #666;
    margin-bottom: 20px;
    text-align: center;
}

.check-results {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
}

.check-results h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

.check-data {
    font-size: 14px;
    line-height: 1.6;
}

.check-summary {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #2196f3;
}

.check-summary h5 {
    color: #1976d2;
    margin-bottom: 10px;
    font-size: 16px;
}

.check-summary p {
    margin-bottom: 5px;
    color: #333;
}

.check-items {
    margin-top: 20px;
}

.check-item {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #4caf50;
}

.check-item h6 {
    color: #2e7d32;
    margin-bottom: 8px;
    font-size: 14px;
}

.check-item p {
    margin-bottom: 5px;
    color: #333;
}

.loading {
    text-align: center;
    color: #666;
    font-style: italic;
}

.error-results {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #c62828;
}

.receipts-history {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin: 30px 0;
    text-align: left;
}

.receipts-history h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 300;
    text-align: center;
}

/* Стили для фильтров */
.receipts-filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group label {
    font-weight: 500;
    color: #555;
    white-space: nowrap;
}

.project-select {
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    min-width: 200px;
    transition: border-color 0.3s ease;
}

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

.clear-filter-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.clear-filter-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(255, 107, 107, 0.3);
}

.receipts-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.receipt-row {
    border-bottom: 1px solid #e1e5e9;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.receipt-row:hover {
    background-color: #f8f9fa;
}

.receipt-row.expanded {
    background-color: #e3f2fd;
}

.receipt-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.receipt-info {
    flex: 1;
}

.receipt-info h4 {
    color: #333;
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 500;
}

.receipt-info p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

.receipt-summary {
    text-align: right;
    margin-left: 20px;
}

.receipt-summary .total-sum {
    font-size: 18px;
    font-weight: 600;
    color: #2e7d32;
}

.receipt-summary .points-awarded {
    font-size: 16px;
    font-weight: 600;
    color: #ff6b35;
    margin: 5px 0;
}

.receipt-summary .date-time {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.expand-icon {
    font-size: 20px;
    color: #666;
    transition: transform 0.2s ease;
    margin-left: 15px;
}

.expand-icon.expanded {
    transform: rotate(180deg);
}

.receipt-items {
    background: #f5f5f5;
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.receipt-items.expanded {
    max-height: 1000px;
    padding: 20px;
}

.item-row {
    background: white;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 4px solid #4caf50;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.item-details {
    font-size: 12px;
    color: #666;
}

.item-price {
    text-align: right;
    font-weight: 600;
    color: #2e7d32;
}

.no-receipts {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Стили для пагинации */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 15px;
}

.pagination-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.pagination-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.pagination-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.page-info {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

/* Стили для статусов товаров */
.status-accounted {
    border-left: 4px solid #4caf50 !important;
    background-color: #e8f5e8 !important;
}

.status-not-accounted {
    border-left: 4px solid #f44336 !important;
    background-color: #ffebee !important;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.status-accounted {
    background-color: transparent;
    color: #4caf50;
}

.status-badge.status-not-accounted {
    background-color: transparent;
    color: #f44336;
}

/* Стили для результатов проверки чека */
.check-item.status-accounted {
    border-left: 4px solid #4caf50;
    background-color: #e8f5e8;
}

.check-item.status-not-accounted {
    border-left: 4px solid #f44336;
    background-color: #ffebee;
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .auth-form, .welcome-page {
        padding: 30px 20px;
    }
    
    .welcome-page h1 {
        font-size: 28px;
    }
}
