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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

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

.header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.logo { font-size: 2.5rem; margin-bottom: 10px; }
.subtitle { font-size: 1rem; opacity: 0.9; }

.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab.active {
    color: #3498db;
    background: white;
    border-bottom: 3px solid #3498db;
}

.content {
    padding: 30px;
}

.form-container {
    display: none;
    animation: fadeIn 0.3s ease;
}

.form-container.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-title {
    text-align: center;
    margin-bottom: 25px;
    color: #2c3e50;
}

.form-group { margin-bottom: 20px; }
.form-label { 
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}
.form-label .required { color: #e74c3c; }

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}
.form-input:focus {
    outline: none;
    border-color: #3498db;
}

.phone-input { display: flex; }
.phone-prefix {
    background: #e9ecef;
    padding: 12px 15px;
    border: 2px solid #dee2e6;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-weight: 600;
}
.phone-input .form-input { border-radius: 0 8px 8px 0; }

.password-input { position: relative; }
.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
}

.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

.btn {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.message {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    display: none;
}
.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}
.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.footer {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-size: 0.9rem;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
}

.password-requirements {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 5px;
}

.role-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.role-btn {
    flex: 1;
    padding: 15px 10px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s;
    text-align: center;
}

.role-btn.active {
    border-color: #3498db;
    background: #3498db;
    color: white;
}

.role-btn .icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
    display: block;
}