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

:root {
    --bg-color: #f3ecdd;
    --primary-color: #ff4d00;
    --text-color: #333;
    --white: #ffffff;
    --gray-light: #e0d5c7;
    --gray-medium: #b8ab9a;
}

body {
    font-family: 'Fredoka', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.4;
    min-height: 100vh;
    padding: 10px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 15px;
    padding: 15px 10px;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--gray-light);
}

.logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 8px;
}

h1 {
    color: var(--primary-color);
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 0.95em;
    color: var(--gray-medium);
    font-weight: 400;
}

.header-actions {
    margin-top: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.status-indicator {
    font-size: 0.8em;
    color: var(--gray-medium);
}

.status-badge {
    font-size: 1em;
    margin-right: 3px;
}

.btn-refresh {
    background: #4caf50;
    color: var(--white);
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-family: 'Fredoka', sans-serif;
    font-size: 0.75em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-refresh:hover {
    background: #45a049;
}

.btn-refresh:active {
    transform: translateY(0);
}

.status-badge.online {
    color: #4caf50;
}

.status-badge.offline {
    color: #f44336;
}

.pending-banner {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    font-family: 'Fredoka', sans-serif;
    font-weight: 500;
}

.quote-form {
    background: var(--white);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--gray-light);
}

.salesperson-selector {
    background: rgba(33, 150, 243, 0.08);
    border: 1px solid #2196f3;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
}

.salesperson-selector label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9em;
    color: #2196f3;
}

.salesperson-selector select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--gray-light);
    border-radius: 4px;
    font-family: 'Fredoka', sans-serif;
    font-size: 0.9em;
    background: var(--white);
    cursor: pointer;
    transition: border-color 0.3s;
}

.salesperson-selector select:focus {
    outline: none;
    border-color: #2196f3;
}

.form-section {
    margin-bottom: 12px;
    padding: 12px;
    background: var(--bg-color);
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.form-section h2 {
    color: var(--primary-color);
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.7em;
    font-weight: 700;
    flex-shrink: 0;
}

.section-icon {
    font-size: 1em;
    flex-shrink: 0;
}

.section-contact {
    border-left-color: #2196f3;
}

.section-contact h2 {
    color: #2196f3;
}

.section-contact .section-number {
    background: #2196f3;
}

.section-event {
    border-left-color: #4caf50;
}

.section-event h2 {
    color: #4caf50;
}

.section-event .section-number {
    background: #4caf50;
}

.section-technical {
    border-left-color: #9c27b0;
}

.section-technical h2 {
    color: #9c27b0;
}

.section-technical .section-number {
    background: #9c27b0;
}

.section-supports {
    border-left-color: #ff9800;
}

.section-supports h2 {
    color: #ff9800;
}

.section-supports .section-number {
    background: #ff9800;
}

.section-comments {
    border-left-color: #607d8b;
}

.section-comments h2 {
    color: #607d8b;
}

.section-comments .section-number {
    background: #607d8b;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 0.85em;
    color: var(--text-color);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
textarea {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--gray-light);
    border-radius: 4px;
    font-family: 'Fredoka', sans-serif;
    font-size: 0.9em;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea {
    resize: vertical;
}

input[type="file"] {
    width: 100%;
    padding: 6px;
    border: 1px dashed var(--gray-light);
    border-radius: 4px;
    font-family: 'Fredoka', sans-serif;
    font-size: 0.8em;
    cursor: pointer;
    transition: border-color 0.3s;
}

input[type="file"]:hover {
    border-color: var(--primary-color);
}

small {
    display: block;
    margin-top: 2px;
    color: var(--gray-medium);
    font-size: 0.75em;
}

.price-info {
    color: var(--primary-color);
    font-weight: 500;
}

.radio-group,
.checkbox-group-multi {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 8px;
    border: 1px solid var(--gray-light);
    border-radius: 4px;
    transition: border-color 0.3s;
    font-size: 0.9em;
}

.radio-label:hover,
.checkbox-label:hover {
    border-color: var(--primary-color);
}

.radio-label input,
.checkbox-label input {
    margin-right: 6px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.terminals-total {
    background: var(--bg-color);
    padding: 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.terminals-total strong {
    color: var(--primary-color);
    font-size: 1.1em;
}

.quote-summary {
    background: var(--white);
    border-radius: 6px;
    padding: 10px !important;
    border: 1px solid var(--primary-color);
    margin-top: 12px !important;
}

.quote-summary h2 {
    border-bottom: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 0.95em;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding-bottom: 5px;
}

.quote-details {
    font-size: 0.8em;
    margin-top: 8px;
}

.quote-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid var(--gray-light);
}

.quote-line:last-child {
    border-bottom: none;
}

.quote-line.total {
    font-size: 0.95em;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 5px;
    padding: 6px 5px;
    border-top: 1px solid var(--primary-color);
    background: rgba(255, 77, 0, 0.05);
    border-radius: 4px;
}

.quote-prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 100px;
}

.quote-prices strong {
    font-size: 0.85em;
    color: var(--primary-color);
}

.quote-line.total .quote-prices strong {
    font-size: 1em;
}

.ht-price {
    font-size: 0.7em;
    color: var(--gray-medium);
    font-weight: normal;
}

.form-actions {
    margin-top: 15px;
    text-align: center;
}

.btn-primary,
.btn-secondary {
    padding: 8px 20px;
    font-family: 'Fredoka', sans-serif;
    font-size: 0.9em;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

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

.btn-primary:hover {
    background: #e64400;
}

.btn-primary:disabled {
    background: var(--gray-medium);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    background: var(--gray-light);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: var(--gray-medium);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 10px;
}

.modal-content {
    background: var(--white);
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--gray-light);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-light);
}

.modal-header h2 {
    color: var(--primary-color);
    font-size: 1em;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5em;
    color: var(--gray-medium);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

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

.pending-list {
    padding: 10px 12px;
    overflow-y: auto;
    flex: 1;
}

.pending-item {
    background: var(--bg-color);
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 8px;
}

.pending-item h3 {
    color: var(--primary-color);
    margin-bottom: 4px;
    font-size: 0.9em;
}

.pending-item p {
    font-size: 0.75em;
    color: var(--gray-medium);
    margin: 2px 0;
}

.pending-item-actions {
    margin-top: 6px;
    display: flex;
    gap: 6px;
}

.btn-small {
    padding: 4px 8px;
    font-family: 'Fredoka', sans-serif;
    font-size: 0.75em;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s;
}

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

.btn-delete {
    background: #f44336;
    color: var(--white);
}

.btn-small:hover {
    opacity: 0.8;
}

.modal-actions {
    padding: 10px 12px;
    border-top: 1px solid var(--gray-light);
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.success-message {
    position: fixed;
    top: 10px;
    right: 10px;
    background: #4caf50;
    color: var(--white);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
    z-index: 2000;
    animation: slideIn 0.3s ease-out;
}

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

@media (max-width: 600px) {
    body {
        padding: 5px;
    }

    .logo {
        max-width: 150px;
    }

    h1 {
        font-size: 1.5em;
    }

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

    .quote-form {
        padding: 10px;
    }

    .salesperson-selector {
        padding: 8px;
    }

    .salesperson-selector label {
        font-size: 0.85em;
    }

    .form-section {
        padding: 8px;
    }

    .form-section h2 {
        font-size: 1em;
        flex-wrap: wrap;
    }

    .section-number {
        width: 20px;
        height: 20px;
        font-size: 0.65em;
    }

    .btn-primary,
    .btn-secondary {
        padding: 6px 15px;
        font-size: 0.85em;
    }

    .modal-actions {
        flex-direction: column;
    }
}
