:root {
    --bg-main: #f5f7fa;
    --bg-panel: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --primary: #4361ee;
    --primary-hover: #3a56d4;
    --secondary: #e0e4f0;
    --secondary-hover: #d1d8e8;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --transition: 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.app-container {
    display: flex;
    width: 95vw;
    height: 95vh;
    background-color: var(--bg-panel);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Panel Izquierdo */
.panel-left {
    width: 320px;
    background-color: #f8fafc;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px;
    z-index: 10;
}

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

.app-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 10px;
}

.logo-container h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.logo-container .subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 15px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 10px 5px;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

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

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 500;
}

.tab-content-container {
    flex: 1;
    overflow-y: auto;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
}

.custom-select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: white;
    font-size: 0.95rem;
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
    cursor: pointer;
}

.custom-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.radio-group, .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label, .checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
}

.radio-label input, .checkbox-label input {
    display: none;
}

.custom-radio {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 50%;
    margin-right: 10px;
    display: inline-block;
    position: relative;
    transition: var(--transition);
}

.radio-label input:checked + .custom-radio {
    border-color: var(--primary);
}

.radio-label input:checked + .custom-radio::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
}

.custom-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    margin-right: 10px;
    display: inline-block;
    position: relative;
    transition: var(--transition);
}

.checkbox-label input:checked + .custom-checkbox {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input:checked + .custom-checkbox::after {
    content: '✓';
    position: absolute;
    top: -1px;
    left: 3px;
    color: white;
    font-size: 12px;
}

/* Report Box */
.report-box {
    background-color: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    margin-top: 10px;
    font-size: 0.85rem;
    height: 110px;
    overflow-y: auto;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

/* Buttons */
.action-buttons {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.primary-btn:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.secondary-btn {
    background-color: var(--secondary);
    color: var(--text-main);
}

.secondary-btn:hover:not(:disabled) {
    background-color: var(--secondary-hover);
}

/* Panel Derecho */
.panel-right {
    flex: 1;
    background-color: #eef2f6;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.view-container {
    display: none;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.view-container.active {
    display: flex;
}

.presentation-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.canvas-wrapper {
    background-color: white;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 95%;
    max-height: 90%;
    overflow: auto;
}

canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.download-hint {
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.8);
    padding: 5px 15px;
    border-radius: 20px;
}

/* Responsividad para Móviles */
@media (max-width: 768px) {
    body {
        height: auto;
        overflow: auto;
        padding: 10px;
        align-items: flex-start;
    }
    .app-container {
        flex-direction: column;
        width: 100%;
        height: auto;
        overflow: visible;
    }
    .panel-left {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .panel-right {
        min-height: 50vh;
        padding: 20px 0;
    }
    .canvas-wrapper {
        padding: 10px;
        max-width: 100%;
    }
    .report-box {
        height: auto;
        max-height: 200px;
    }
}
