/* wwwroot/css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

    .header h1 {
        margin-bottom: 0.5rem;
        font-size: 1.8rem;
    }

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

    .nav-link:hover,
    .nav-link.active {
        background-color: rgba(255,255,255,0.2);
    }

/* Main content */
.welcome-section {
    text-align: center;
    padding: 3rem 0;
    background: white;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.page-header {
    padding: 2rem 0;
    text-align: center;
}

    .page-header h1 {
        color: #333;
        margin-bottom: 0.5rem;
    }

    .page-header p {
        color: #666;
        font-size: 1.1rem;
    }

/* Dashboard */
.dashboard {
    margin: 2rem 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.dashboard-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

    .dashboard-card h3 {
        margin-bottom: 1.5rem;
        color: #333;
        border-bottom: 2px solid #667eea;
        padding-bottom: 0.5rem;
    }

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

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

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

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

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

/* Forms */
.config-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

    .form-section h3 {
        margin-bottom: 1rem;
        color: #333;
        margin-top: 0;
        color: #495057;
        border-bottom: 2px solid #007bff;
        padding-bottom: 10px;
    }

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

    .form-control:focus {
        outline: none;
        border-color: #667eea;
    }

.form-help {
    font-size: 12px;
    color: #666;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 5px;
    font-style: italic;
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    font-weight: 500;
}

    .checkbox-label input[type="checkbox"] {
        display: none;
        margin-right: 10px;
    }

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

    .checkbox-label input[type="checkbox"]:checked + .checkmark::after {
        content: '✓';
        color: white;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 12px;
        font-weight: bold;
    }

/* Orders & Kiosks Common Styles */
.orders-list,
.kiosks-list {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #dee2e6;
}

.orders-container,
.kiosks-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.kiosks-container {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
}

.order-item,
.kiosk-item {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .order-item:hover,
    .kiosk-item:hover {
        background: #e9ecef;
        border-color: #007bff;
        transform: translateY(-2px);
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

.order-number,
.kiosk-name {
    font-weight: bold;
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.order-info,
.kiosk-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.kiosk-info {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 10px;
}

.kiosk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.kiosk-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.detail-label {
    color: #666;
    font-weight: 500;
}

.detail-value {
    color: #333;
}

/* Status Styles */
.order-status,
.kiosk-status,
.status-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.kiosk-status,
.status-badge {
    padding: 4px 8px;
}

.status-badge {
    font-size: 11px;
    border-radius: 8px;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-processing,
.status-disabled {
    background: #fff3cd;
    color: #856404;
}

.status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.status-new {
    background: #cce7ff;
    color: #004085;
}

/* Loading & Messages */
.loading,
.no-orders,
.no-data,
.error {
    text-align: center;
    padding: 20px;
    font-size: 16px;
    color: #666;
}

.loading {
    color: #007bff;
}

.error {
    color: #dc3545;
}

.no-orders,
.no-data {
    color: #6c757d;
}

/* Kiosk Action */
.kiosk-action {
    text-align: center;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

.action-text {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Quick actions */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.operations-panel,
.actions-panel {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.button-group,
.buttons-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

/* Search */
.search-section {
    margin: 1rem 0;
}

.search-input {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23666"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>');
    background-repeat: no-repeat;
    background-position: 12px center;
    background-size: 16px;
    padding-left: 40px;
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Result messages */
.result-message {
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    padding: 12px;
    margin: 20px 0;
    border-radius: 4px;
    font-weight: bold;
}

.result-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Password */
.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

    .password-container .form-control {
        padding-right: 40px;
    }

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    padding: 5px;
    border: none;
    background: none;
    color: #666;
    transition: color 0.2s;
}

    .password-toggle:hover {
        color: #007bff;
    }

.eye-icon {
    font-size: 16px;
    user-select: none;
}

.password-container.showing .eye-icon {
    color: #007bff;
}

/* Help button */
.header-with-help {
    display: flex;
    align-items: center;
    gap: 15px;
}

.help-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #007bff;
    background: white;
    color: #007bff;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

    .help-button:hover {
        background: #007bff;
        color: white;
        transform: scale(1.1);
        box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
    }

.help-icon {
    display: block;
    line-height: 1;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

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

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

    .button-group,
    .form-actions {
        flex-direction: column;
    }

    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .header-with-help {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .help-button {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .orders-container,
    .kiosks-container {
        grid-template-columns: 1fr;
    }


}
/* Стили для валидации */
.form-control.success {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-control.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* Подсветка проблемных полей */
.form-control.error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.phone-field {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

    .phone-field::placeholder {
        font-family: inherit;
        color: #6c757d;
    }

    /* Стили для состояний валидации */
    .phone-field.success {
        border-color: #28a745;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right calc(0.375em + 0.1875rem) center;
        background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    }

    .phone-field.error {
        border-color: #dc3545;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right calc(0.375em + 0.1875rem) center;
        background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    }