/* Conscribo Portal Styles - Mobile First */

.conscribo-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Login Section */
.login-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 0 auto;
}

.login-card h2 {
    margin: 0 0 24px 0;
    font-size: 24px;
    color: #333;
    text-align: center;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
    height: 48px;
}

.form-group input:focus {
    outline: none;
    border-color: #4CAF50;
}

.btn-primary,
.btn-secondary {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

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

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

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

.btn-secondary:hover {
    background: #da190b;
}

.error-message {
    color: #f44336;
    font-size: 14px;
    margin-top: 10px;
    padding: 10px;
    background: #ffebee;
    border-radius: 6px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Dashboard Section */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.dashboard-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

#logout-btn {
    width: auto;
    padding: 10px 20px;
    margin: 0;
}

.welcome-card {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.welcome-card h3 {
    margin: 0 0 12px 0;
    font-size: 22px;
}

.welcome-card p {
    margin: 0;
    opacity: 0.95;
    font-size: 15px;
}

.dashboard-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-height: 200px;
    margin-bottom: 24px;
}

.loading-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.loading-message p {
    margin: 0;
    font-size: 16px;
}

#relations-data h4 {
    margin: 0 0 16px 0;
    color: #333;
    font-size: 18px;
}

#relations-response {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.relation-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
}

.relation-field {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.relation-field:last-child {
    border-bottom: none;
}

.field-label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.field-value {
    color: #333;
    font-size: 14px;
    text-align: right;
}

@media (max-width: 480px) {
    .relation-field {
        flex-direction: column;
        gap: 4px;
    }

    .field-value {
        text-align: left;
    }
}

/* Tablet and Desktop */
@media (min-width: 768px) {
    .conscribo-container {
        padding: 40px 20px;
    }

    .login-card {
        padding: 40px 30px;
    }

    .login-card h2 {
        font-size: 28px;
    }

    .dashboard-header h2 {
        font-size: 28px;
    }

    .welcome-card {
        padding: 24px 30px;
    }

    .welcome-card h3 {
        font-size: 26px;
    }

    .dashboard-content {
        padding: 30px;
    }
}

@media (min-width: 1024px) {
    .conscribo-container {
        max-width: 1200px;
    }
}

/* Loading State */
.btn-loader {
    display: inline-block;
}

button:disabled .btn-text {
    display: none;
}

button:disabled .btn-loader {
    display: inline-block !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portal-section {
    animation: fadeIn 0.3s ease-out;
}

/* Declaration Form */
.declaration-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.declaration-card h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
}

.photo-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.btn-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 16px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

.btn-photo:hover {
    border-color: #4CAF50;
    background: #f0f7f1;
    color: #4CAF50;
}

.btn-photo svg {
    color: #4CAF50;
}

.btn-photo:hover svg {
    color: #45a049;
}

.btn-photo span {
    text-align: center;
}

#photo-preview {
    position: relative;
    margin-top: 12px;
}

#preview-image {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.btn-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(244, 67, 54, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-remove:hover {
    background: rgba(244, 67, 54, 1);
}

select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
    height: 48px;
    box-sizing: border-box;
}

select:focus {
    outline: none;
    border-color: #4CAF50;
}

.amount-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.currency-symbol {
    font-weight: 600;
    color: #555;
    font-size: 16px;
    flex-shrink: 0;
}

.amount-input-wrapper input {
    flex: 1;
    height: 48px !important;
}

textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
    box-sizing: border-box;
    margin-bottom: 0;
}

textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

@media (min-width: 768px) {
    .declaration-card {
        padding: 32px 30px;
    }

    .declaration-card h3 {
        font-size: 22px;
    }
}