/* Variables */
:root {
    /* Colores principales */
    --primary-color: #F48120;
    --primary-dark: #e26125;
    --secondary-color: #444444;
    --accent-color: #2e9cca;
    
    /* Neutros */
    --dark: #333333;
    --medium: #666666;
    --light: #e0e0e0;
    --lighter: #f9f9f9;
    --white: #ffffff;
    
    /* Tamaños */
    --header-height: 6rem;
    --sidebar-width: 350px;
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
    
    /* Bordes */
    --border-radius-sm: 0.3rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 1rem;
    
    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    font-size: 62.5%; /* 1rem = 10px */
    height: 100%;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    color: var(--dark);
    line-height: 1.5;
    background-color: var(--lighter);
    min-height: 100%;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
}

/* Contenedor principal */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

@media (min-width: 992px) {
    .app-container {
        flex-direction: row;
    }
}

/* Sidebar */
.sidebar {
    background-color: var(--white);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    width: 100%;
    z-index: 10;
}

@media (min-width: 992px) {
    .sidebar {
        width: var(--sidebar-width);
        height: 100vh;
        overflow-y: auto;
        position: sticky;
        top: 0;
        display: flex;
        flex-direction: column;
    }
    
    .sidebar::-webkit-scrollbar {
        width: 5px;
    }
    
    .sidebar::-webkit-scrollbar-track {
        background: var(--lighter);
    }
    
    .sidebar::-webkit-scrollbar-thumb {
        background: var(--light);
        border-radius: 3px;
    }
    
    .sidebar::-webkit-scrollbar-thumb:hover {
        background: var(--medium);
    }
}

/* Logo */
.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.logo {
    max-width: 150px;
}

/* Títulos */
.title {
    font-size: 2.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    text-align: center;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--medium);
    margin-bottom: 3rem;
    text-align: center;
}

/* Formulario */
.form-container {
    margin-bottom: 2rem;
    flex: 1;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.input-group label {
    font-weight: 500;
    color: var(--medium);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.input-group label i {
    color: var(--primary-color);
}

.input-group input {
    padding: 1.2rem;
    border: 1px solid var(--light);
    border-radius: var(--border-radius-md);
    outline: none;
    font-size: 1.5rem;
    transition: border-color var(--transition-fast);
}

.input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(244, 129, 32, 0.2);
}

.input-error {
    color: #e74c3c;
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

/* Botones */
.btn {
    padding: 1.2rem 2rem;
    border: none;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 1.6rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

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

.btn-secondary {
    background-color: var(--lighter);
    color: var(--medium);
    border: 1px solid var(--light);
}

.btn-secondary:hover {
    background-color: var(--light);
    color: var(--dark);
}

.btn:disabled {
    cursor: auto;
    background-color: var(--lighter);
    color: var(--medium);
    opacity: 0.5;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--medium);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    color: var(--primary-color);
    background-color: rgba(244, 129, 32, 0.1);
}

/* Acciones */
.actions {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.actions .btn {
    width: 100%;
}

/* Contenido principal */
.main-content {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 992px) {
    .main-content {
        padding: 4rem;
        overflow-y: auto;
    }
}

/* Cabecera de previsualización */
.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.preview-header h2 {
    font-size: 2rem;
    color: var(--secondary-color);
}

.preview-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#zoom-level {
    font-size: 1.4rem;
    color: var(--medium);
    width: 5rem;
    text-align: center;
}

/* Contenedor de previsualización */
.preview-container {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    flex: 1;
    overflow: hidden;
}

.preview-wrapper {
    transform-origin: center;
    transition: transform var(--transition-fast);
}

/* Firma */
.signature-preview {
    background-color: var(--white);
    padding: 1rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
}

.signature-table {
    border-collapse: collapse;
    width: 100%;
}

.logo-cell {
    width: 180px;
}

.logo-cell .signature-logos_content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
    margin-right: 1rem;
}

table.signature-logos_content a > .company-logo {
    width: 130px !important;
}

.logo-cell table.signature-logos_content .social-container {
    display: flex;
    flex-direction: column;
    align-items: center !important;
    justify-content: center !important;

    margin-top: 0.5rem;
}

.social-container .social-title {
/*     width: 100%;
    font-size: 0.8rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    text-align: center;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; */
    font-size: 0.8rem;
    text-align: center;
    color: #000;
}

/* .signature-logos_content > tr:nth-child(2) > td {
    width: 100%;
}

.logo-cell .signature-logos_content > tr:nth-child(2) table tr:nth-child(2) {
    display: flex !important;
    justify-content: center !important;
}
 */

.social-icons {
    display: flex;
    justify-content: center;
}

.social-icons a {
    margin-right: -0.3rem;
}

.social-icons a:last-child {
    margin-right: 0;
}

.social-icons img {
    width: 2rem !important;
}

.info-cell {
    vertical-align: top;
    padding-left: 1rem;
    border-left: 1px solid var(--light);

    width: 210px !important;
}

.user-name {
    display: block;

    font-weight: 600;
    font-size: 1.4rem;
    color: var(--dark);
    font-family: Calibri, sans-serif;
}

.user-position {
    font-size: 1.3rem;
    color: var(--dark);
    margin-top: 0.3rem;
    margin-bottom: 1rem;
    font-family: Calibri, sans-serif;
}

.contact-cell {
    display: flex;
    flex-direction: column;

    padding-left: 1rem;
    border-left: 1px solid var(--light);
    padding-top: 1rem;
    border-top: 1px solid var(--light);
}

.contact-cell .contact-cell_email {
    /* display: flex;
    align-items: center;
    padding-left: 0.2rem;
    width: 100%; */
    color: #000;
    font-family: Calibri;
    font-size: 1rem !important;
}

/* .contact-cell .contact-item {
    display: flex;
    align-items: center;
    gap: 0.2rem;

    color: var(--dark);
    font-family: Calibri, sans-serif;
}

.contact-cell .contact-item .icon-desc-1 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    
    vertical-align: middle;
    width: 1.4rem;
} */

.contact-cell img {
    /*  width: 1.4rem;
    margin: auto;
    vertical-align: middle; */
    width: 1.5rem !important;
    margin-right: 0.57rem;
}

/* .contact-cell .contact-item .icon-desc-2 {
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;

    vertical-align: middle;
    font-size: 1rem;
} */

.contact-cell  p {
    /* margin-top: -0.3rem !important;
    vertical-align: middle; */
    margin-top: -0.5rem;
    font-size: 0.8rem !important;
}

/* Barra de acciones */
.action-bar {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.modal-content {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalOpen 0.3s ease;
}

@keyframes modalOpen {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--medium);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--dark);
}

.modal-body {
    padding: 2rem;
}

/* Pestañas */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--light);
    margin-bottom: 2rem;
}

.tab {
    padding: 1rem 2rem;
    background: none;
    border: none;
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--medium);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.tab.active {
    color: var(--primary-color);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Pasos */
.step {
    display: flex;
    margin-bottom: 3rem;
    gap: 2rem;
}

.step-number {
    background-color: var(--primary-color);
    color: var(--white);
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.step-content p {
    font-size: 1.5rem;
    color: var(--medium);
    margin-bottom: 1.5rem;
}

.step-content img {
    max-width: 100%;
    border: 1px solid var(--light);
    border-radius: var(--border-radius-md);
    margin-top: 1rem;
}

/* Información adicional */
.extra-info {
    background-color: var(--lighter);
    padding: 2rem;
    border-radius: var(--border-radius-md);
    margin-top: 3rem;
}

.extra-info h4 {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 2rem;
}

.extra-tip {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.extra-tip:last-child {
    margin-bottom: 0;
}

.extra-tip i {
    color: var(--primary-color);
    font-size: 2rem;
    flex-shrink: 0;
}

.extra-tip p {
    font-size: 1.5rem;
    color: var(--medium);
    margin-bottom: 1rem;
}

.extra-tip img {
    max-width: 100%;
    border: 1px solid var(--light);
    border-radius: var(--border-radius-md);
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 767px) {
    .preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .action-bar {
        flex-direction: column;
    }
    
    .action-bar .btn {
        width: 100%;
    }
    
    .preview-container {
        padding: 1.5rem;
    }
    
    .modal-content {
        max-height: 85vh;
    }
}
