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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    display: flex;
    overflow: hidden;
}

.login-wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* Sidebar esquerda - Formulário */
.login-sidebar {
    width: 400px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 60px 80px;
    overflow-y: auto;
}

.login-logo {
    margin-bottom: 60px;
}

.login-logo img {
    max-width: 180px;
    height: auto;
}

.login-logo-text {
    font-size: 16px;
    color: #666;
    margin-top: 8px;
    font-weight: 400;
}

.login-title {
    font-size: 15px !important;
    font-weight: 700;
    text-transform: uppercase;
    color: #1a1a1a;
    margin-bottom: 40px;
}

.login-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.login-section {
    margin-bottom: 30px;
}

.login-section-label {
    font-size: 14px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 500;
}

.login-section-label .required {
    color: #e74c3c;
}

.input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 50px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    background: #fafafa;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #4a90e2;
    background: #ffffff;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #999;
    pointer-events: none;
}

.forgot-password {
    text-align: right;
    margin-top: 8px;
}

.forgot-password a {
    color: #4a90e2;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}

.forgot-password a:hover {
    color: #357abd;
    text-decoration: underline;
}

.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    margin-top: 8px;
}

.btn-primary:hover {
    background: #357abd;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

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

.btn-primary svg {
    width: 18px;
    height: 18px;
}

.btn-secondary {
    width: 100%;
    padding: 12px 24px;
    background: #ffffff;
    color: #4a90e2;
    border: 1px solid #4a90e2;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    transition: all 0.3s;
    margin-top: 12px;
    text-decoration: none;
}

.btn-secondary svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.btn-secondary .btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.3;
}

.btn-secondary:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.2);
}

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

.separator {
    display: flex;
    align-items: center;
    margin: 40px 0;
    text-align: center;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.separator span {
    padding: 0 20px;
    color: #999;
    font-size: 14px;
}

.login-link {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.login-link a {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover {
    text-decoration: underline;
}

.login-footer {
    margin-top: auto;
    padding-top: 40px;
    text-align: center;
    font-size: 12px;
    color: #999;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

/* Background image direita */
.login-background {
    flex: 1;
    background: url('../images/bg-login.jpg') center center;
    background-size: cover;
    position: relative;
    filter: grayscale(30%) brightness(0.9);
}

.login-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

/* Responsivo */
@media (max-width: 1024px) {
    .login-sidebar {
        width: 100%;
        min-width: auto;
        padding: 40px;
    }

    .login-background {
        display: none;
    }
}

@media (max-width: 600px) {
    .login-sidebar {
        padding: 30px 20px;
    }

    .login-title {
        font-size: 24px;
    }
}

/* ============================================
   CSS para página de editar cliente
   ============================================ */

.page-title-box {
    padding: 10px 1.5rem;
    background-color: #FFF;
    border-bottom: 1px solid #e9ebec;
}

.page-title-box .breadcrumb {
    background-color: transparent;
    padding: 0;
}

.page-title-box h4 {
    font-weight: 700;
    font-size: 15px !important;
    text-transform: uppercase;
}

.form-cliente {
    background: white;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    min-width: auto;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    text-align: left;
}

.form-group label.required::after {
    content: ' *';
    color: #e74c3c;
}

.form-group .form-input,
.form-group .form-select {
    width: 100%;
}

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

.form-row .form-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 20px;
}

.form-row .form-group label {
    min-width: auto;
    text-align: left;
}

.form-row .form-group .form-input,
.form-row .form-group .form-select {
    width: 100%;
}

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

.form-label.required::after {
    content: ' *';
    color: #e74c3c;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #2196f3;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group .form-select {
    flex-shrink: 0;
    width: 80px;
    min-width: 80px;
    max-width: 80px;
}

.input-group .form-input {
    flex: 1;
    min-width: 200px;
}

.radio-group {
    display: flex;
    gap: 30px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

.radio-label input[type="radio"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.form-section-title {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.form-section-title svg {
    margin-right: 8px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.btn-cancel {
    padding: 12px 24px;
    background: #ffc107;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-cancel:hover {
    background: #ffb300;
}

.btn-save {
    padding: 12px 24px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

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

/* Radio group special layout */
.radio-group-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.radio-group-wrapper label {
    min-width: auto;
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.radio-group-wrapper .radio-group {
    display: flex;
    gap: 30px;
}

/* Section wrapper for endereço */
.form-section-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-section-wrapper > .form-section-title {
    margin-bottom: 0;
}

.form-section-wrapper .form-row {
    margin-top: 0;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .form-cliente {
        padding: 20px;
    }

    .form-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-group label {
        min-width: auto;
        text-align: left;
    }

    .radio-group-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .radio-group-wrapper label {
        min-width: auto;
        text-align: left;
    }
}

