html, body { 
    height: 100%; 
    margin: 0; 
    padding: 0; 
    overflow-x: hidden; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
    background-color: #000000; 
}

#app-container { 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; 
    background-color: #000000; 
}

/* HEADER APP */
.header-app { 
    background-color: #000000; 
    color: white; 
    padding: 1rem 1.5rem; 
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    border-bottom: 1px solid #333;
    flex-shrink: 0; 
}

.header-logo { 
    display: flex; 
    align-items: center; 
}

.header-logo-text { 
    font-weight: bold; 
    font-size: 1.25rem; 
    color: white; 
    text-transform: uppercase; 
}

/* MENUS (GRID) */
.main-menu-grid { 
    flex-grow: 1; 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 1rem; 
    padding: 1.5rem; 
    background-color: #000000; 
}

.menu-item { 
    background-color: #5a1a2e; 
    border-radius: 0.5rem; 
    padding: 1.5rem 1rem; 
    text-align: center; 
    color: white; 
    cursor: pointer; 
    transition: background-color 0.3s; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    font-weight: bold; 
    font-size: 1rem; 
    text-transform: uppercase;
    min-height: 140px;
}

.menu-item:hover { 
    background-color: #4e1628; 
}

.menu-item:active {
    transform: scale(0.98);
}

/* ESTILO PARA TUS ICONOS DE LA CARPETA ICONS */
.custom-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 0.75rem;
}

/* Iconos pequeños para header (libreta y casa) */
.header-icon-img {
    width: 38px; 
    height: 38px; 
    cursor: pointer;
}

.menu-item.full {
    grid-column: span 2;
}

/* FORMS & SCREENS */
.screen {
    animation: fadeIn 0.3s ease;
}

/* ESTILOS ESPECÍFICOS PARA LOGIN */
.login-screen-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 2rem;
    box-sizing: border-box;
    background-color: #000000;
}

.login-box {
    width: 100%;
    max-width: 350px;
}

.form-page { 
    flex-direction: column; 
    height: 100vh; 
    background-color: #ffffff; 
    display: flex;
}

.form-title-section { 
    background-color: #1f2937; 
    color: white; 
    padding: 1rem 1.5rem; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-shrink: 0; 
}

.header-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.form-title { 
    font-size: 1.25rem; 
    font-weight: bold; 
    text-transform: uppercase;
}

.form-container { 
    padding: 1.5rem; 
    flex-grow: 1; 
    overflow-y: auto; 
    background-color: #ffffff; 
}

/* INPUTS */
.input-group {
    margin-bottom: 1.2rem;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Estilo especial para labels en login (fondo negro) */
.login-label {
    color: #ffffff !important;
}

.form-input { 
    display: block; 
    width: 100%;
    padding: 0.75rem; 
    font-size: 1rem; 
    border: 1px solid #cbd5e1; 
    border-radius: 0.375rem;
    color: #1f2937;
    background-color: #ffffff; 
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-input:focus { 
    border-color: #5a1a2e; 
    box-shadow: 0 0 0 3px rgba(90, 26, 46, 0.1);
}

.form-input[readonly] {
    background-color: #f3f4f6;
    color: #6b7280;
    border-style: dashed;
}

/* BOTONES */
.btn-primary, .btn-save, .btn-secondary, .btn-clean {
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    width: 100%;
    font-size: 1rem;
    text-transform: uppercase;
    display: block;
    margin-top: 10px;
}

.btn-primary { 
    background-color: #5a1a2e; 
    color: white;
}
.btn-primary:hover { background-color: #4e1628; }
.btn-primary:disabled { background-color: #888; cursor: not-allowed; }

.btn-save { 
    background-color: #16a34a; 
    color: white;
}
.btn-save:hover { background-color: #128a3f; }

.btn-secondary {
    background-color: #4b5563;
    color: white;
}
.btn-secondary:hover { background-color: #374151; }

.btn-clean {
    background-color: transparent;
    color: #ef4444; 
    border: 2px solid #ef4444;
}
.btn-clean:hover {
    background-color: #ef4444;
    color: white;
}

/* BITÁCORAS (GALERÍAS) */
.gallery-container {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #f9fafb;
    height: 400px;
    overflow-y: auto;
}

.gallery-item {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: white;
}
.gallery-item:hover { background: #f3f4f6; }

.gallery-text h4 { margin: 0; font-size: 1rem; font-weight: bold; color: #111; }
.gallery-text p { margin: 4px 0 0 0; font-size: 0.85rem; color: #6b7280; }

.detail-view {
    margin-top: 1rem;
    padding: 1rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
}
.data-row { margin-bottom: 0.5rem; border-bottom: 1px solid #e5e7eb; padding-bottom: 0.25rem; }
.data-label { font-size: 0.75rem; font-weight: bold; color: #6b7280; text-transform: uppercase; }
.data-value { font-size: 1rem; font-weight: 500; color: #1f2937; }

/* MULTIMEDIA */
.photo-placeholder {
    width: 100%;
    height: 180px;
    border: 2px dashed #cbd5e1;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    cursor: pointer;
    background: #f9fafb;
    background-size: cover;
    background-position: center;
    position: relative;
    margin-top: 5px;
}
.photo-placeholder span { pointer-events: none; z-index: 10; background: rgba(255,255,255,0.8); padding: 5px 10px; border-radius: 5px; }

.signature-wrapper {
    height: 200px;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    background: white;
    position: relative;
}
.signature-wrapper canvas { width: 100%; height: 100%; }
.clear-sig { position: absolute; bottom: 5px; right: 5px; color: #ef4444; cursor: pointer; font-size: 1.2rem; }

/* MODALS */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 50;
    display: none; align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.active { display: flex; }
.modal-box { background: white; width: 100%; max-width: 400px; border-radius: 0.5rem; overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
.modal-header { background: #5a1a2e; color: white; padding: 1rem; display: flex; justify-content: space-between; align-items: center; font-weight: bold; }
.modal-body { padding: 1.5rem; }

/* ESTADOS */
.status-success { color: #16a34a; font-weight: bold; }
.status-error { color: #dc2626; font-weight: bold; }
.status-new { color: #2563eb; font-weight: bold; }

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