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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #22577a 0%, #38a3a5 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #38a3a5 0%, #57cc99 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

.logo-container {
    margin-bottom: 20px;
}

.logo {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.step {
    padding: 40px;
    display: none;
}

.step.active {
    display: block;
}

.step h2 {
    color: #22577a;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: #f5f5f5;
    border-radius: 10px;
    margin-bottom: 25px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background: #38a3a5;
}

.status-dot.error {
    background: #ff4444;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 320px;
    margin: 30px 0;
    background: #f9f9f9;
    border-radius: 15px;
    padding: 20px;
}

.qr-placeholder {
    text-align: center;
}

#qr-code {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.instructions {
    background: #f0f9ff;
    border-left: 4px solid #38a3a5;
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
}

.instructions h3 {
    color: #22577a;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.instructions ol {
    margin-left: 20px;
}

.instructions li {
    margin: 8px 0;
    line-height: 1.6;
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
}

.group-select {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1em;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.group-select:hover {
    border-color: #38a3a5;
}

.group-select:focus {
    outline: none;
    border-color: #38a3a5;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.helper-text {
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #57cc99 0%, #38a3a5 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(87, 204, 153, 0.4);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 2px solid #ddd;
}

.btn-secondary:hover {
    background: #e9e9e9;
    border-color: #ccc;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: 2px solid #dc3545;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
}

.results-container {
    text-align: center;
}

.success-message {
    background: #f0fdf4;
    border: 2px solid #38a3a5;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.success-icon {
    display: inline-block;
    width: 60px;
    height: 60px;
    background: #38a3a5;
    color: white;
    border-radius: 50%;
    line-height: 60px;
    font-size: 2em;
    margin-bottom: 15px;
}

.success-message h3 {
    color: #22577a;
    margin-bottom: 10px;
}

.preview-container {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.preview-container h4 {
    color: #22577a;
    margin-bottom: 15px;
}

.contacts-preview {
    max-height: 300px;
    overflow-y: auto;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

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

.contact-item:last-child {
    border-bottom: none;
}

.contact-name {
    font-weight: 600;
    color: #333;
}

.contact-phone {
    color: #666;
    font-family: monospace;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #38a3a5;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

footer {
    text-align: center;
    color: white;
    padding: 20px;
    font-size: 0.9em;
    opacity: 0.9;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-logo {
    margin-bottom: 5px;
}

.footer-logo-img {
    height: 30px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer-text {
    font-size: 0.9em;
    margin: 5px 0;
}

.footer-brand {
    font-size: 1em;
    margin: 5px 0;
    color: #c7f9cc;
}

.footer-brand strong {
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    .step {
        padding: 25px;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
